diff src/video/uikit/SDL_uikitview.m @ 4560:95352c671a6e

Added support for keyboard repeat (only tested on Windows so far)
author Sam Lantinga <slouken@libsdl.org>
date Tue, 20 Jul 2010 23:25:24 -0700
parents 06c7423f8c60
children e2d46c5c7483
line wrap: on
line diff
--- a/src/video/uikit/SDL_uikitview.m	Tue Jul 20 00:57:01 2010 -0700
+++ b/src/video/uikit/SDL_uikitview.m	Tue Jul 20 23:25:24 2010 -0700
@@ -245,8 +245,8 @@
 	
 	if ([string length] == 0) {
 		/* it wants to replace text with nothing, ie a delete */
-		SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_DELETE);
-		SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_DELETE);
+		SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_DELETE, SDL_FALSE);
+		SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_DELETE, SDL_FALSE);
 	}
 	else {
 		/* go through all the characters in the string we've been sent
@@ -272,14 +272,14 @@
 			
 			if (mod & KMOD_SHIFT) {
 				/* If character uses shift, press shift down */
-				SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LSHIFT);
+				SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LSHIFT, SDL_FALSE);
 			}
 			/* send a keydown and keyup even for the character */
-			SDL_SendKeyboardKey(SDL_PRESSED, code);
-			SDL_SendKeyboardKey(SDL_RELEASED, code);
+			SDL_SendKeyboardKey(SDL_PRESSED, code, SDL_FALSE);
+			SDL_SendKeyboardKey(SDL_RELEASED, code, SDL_FALSE);
 			if (mod & KMOD_SHIFT) {
 				/* If character uses shift, press shift back up */
-				SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LSHIFT);
+				SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LSHIFT, SDL_FALSE);
 			}			
 		}
 	}