(svn r25671) -Codechange: Pass character and key code separately to the keyboard handler.

This commit is contained in:
michi_cc
2013-08-05 20:36:36 +00:00
parent 270d8aa639
commit 019984a14f
6 changed files with 25 additions and 20 deletions

View File

@@ -267,7 +267,7 @@ static uint32 QZ_MapKey(unsigned short sym)
if (_current_mods & NSAlternateKeyMask) key |= WKC_ALT;
if (_current_mods & NSCommandKeyMask) key |= (_settings_client.gui.right_mouse_btn_emulation != RMBE_CONTROL ? WKC_META : WKC_CTRL);
return key << 16;
return key;
}
static void QZ_KeyEvent(unsigned short keycode, unsigned short unicode, BOOL down)
@@ -289,8 +289,8 @@ static void QZ_KeyEvent(unsigned short keycode, unsigned short unicode, BOOL dow
}
if (down) {
uint32 pressed_key = QZ_MapKey(keycode) | unicode;
HandleKeypress(pressed_key);
uint32 pressed_key = QZ_MapKey(keycode);
HandleKeypress(pressed_key, unicode);
DEBUG(driver, 2, "cocoa_v: QZ_KeyEvent: %x (%x), down, mapping: %x", keycode, unicode, pressed_key);
} else {
DEBUG(driver, 2, "cocoa_v: QZ_KeyEvent: %x (%x), up", keycode, unicode);