summaryrefslogtreecommitdiffstats
path: root/src/newt/native/WindowsWindow.c
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-31 21:52:21 +0100
committerSven Gothel <[email protected]>2012-10-31 21:52:21 +0100
commitc135d638fe820457977747e3d45960da64038d53 (patch)
treed06c63ff10944d91fa2427f9a03c0e39e4dc562f /src/newt/native/WindowsWindow.c
parent40090a5fe7f5b42c2212d9dd5351730e0f38d601 (diff)
NEWT Windows KeyEvent: We have to store the keyChar for typed events, since keyChar from pressed/released may be wrong (Uppercase: SHIFT-1, etc ..)
Partially reverts commit: b62e1d027c289877686d6008ea8dd40e4e1541ec
Diffstat (limited to 'src/newt/native/WindowsWindow.c')
-rw-r--r--src/newt/native/WindowsWindow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c
index 2152166e4..e3d5cffa0 100644
--- a/src/newt/native/WindowsWindow.c
+++ b/src/newt/native/WindowsWindow.c
@@ -557,7 +557,7 @@ static int WmChar(JNIEnv *env, jobject window, UINT character, WORD repCnt, BYTE
}
static int WmKeyDown(JNIEnv *env, jobject window, UINT wkey, WORD repCnt, BYTE scanCode, BYTE flags, BOOL system) {
- UINT modifiers = 0, jkey = 0, character = -1;
+ UINT modifiers = 0, jkey = 0, character = 0;
if (wkey == VK_PROCESSKEY) {
return 1;
}
@@ -584,7 +584,7 @@ static int WmKeyDown(JNIEnv *env, jobject window, UINT wkey, WORD repCnt, BYTE s
(*env)->CallVoidMethod(env, window, sendKeyEventID,
(jint) EVENT_KEY_TYPED,
modifiers,
- (jint) -1,
+ (jint) 0,
(jchar) '\177');
}
@@ -592,7 +592,7 @@ static int WmKeyDown(JNIEnv *env, jobject window, UINT wkey, WORD repCnt, BYTE s
}
static int WmKeyUp(JNIEnv *env, jobject window, UINT wkey, WORD repCnt, BYTE scanCode, BYTE flags, BOOL system) {
- UINT modifiers = 0, jkey = 0, character = -1;
+ UINT modifiers = 0, jkey = 0, character = 0;
if (wkey == VK_PROCESSKEY) {
return 1;
}