diff options
author | TingPing <tingping@tingping.se> | 2014-05-11 04:29:06 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-05-11 04:48:44 -0400 |
commit | fea528c39d3af1b8a877d9e0a9c9f927136944a9 (patch) | |
tree | 94d5782496ac840c82cd0bc1dd2b7980dca642d2 /src/fe-gtk/fkeys.c | |
parent | 9599c29c465cf8b0ac64969152e645ed09fef1d0 (diff) |
Don't ignore command key in keybindings on OSX
Diffstat (limited to 'src/fe-gtk/fkeys.c')
-rw-r--r-- | src/fe-gtk/fkeys.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index 016a1178..fad52dce 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -287,8 +287,16 @@ key_free (gpointer data) static inline GdkModifierType key_modifier_get_valid (GdkModifierType mod) { + GdkModifierType ret; + +#ifdef __APPLE__ + ret = mod & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_META_MASK); +#else /* These masks work on both Windows and Unix */ - return mod & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK); + ret = mod & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK); +#endif + + return ret; } gboolean |