summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyboard.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-03-05 15:55:30 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-03-05 15:55:30 (GMT)
commitd026ad4f562d8572acf51a3bdb885fde7cb1ffa7 (patch)
tree9e31a00b0b01d2e82771b72f4398ee338f05780c /macosx/tkMacOSXKeyboard.c
parentf23de34de213e70ce30c6d47877d240034172ff5 (diff)
downloadtk-d026ad4f562d8572acf51a3bdb885fde7cb1ffa7.zip
tk-d026ad4f562d8572acf51a3bdb885fde7cb1ffa7.tar.gz
tk-d026ad4f562d8572acf51a3bdb885fde7cb1ffa7.tar.bz2
Fix for keyboard modifier events, thanks to Trevor Williams for patch
Diffstat (limited to 'macosx/tkMacOSXKeyboard.c')
-rw-r--r--macosx/tkMacOSXKeyboard.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index 54f99d3..7ac087d 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -734,7 +734,8 @@ TkpGetKeySym(
*/
if (eventPtr->xany.send_event == -1) {
- int modifier = eventPtr->xkey.keycode;
+
+ int modifier = eventPtr->xkey.keycode & NSDeviceIndependentModifierFlagsMask;
if (modifier == NSCommandKeyMask) {
return XK_Meta_L;