From fea528c39d3af1b8a877d9e0a9c9f927136944a9 Mon Sep 17 00:00:00 2001 From: TingPing Date: Sun, 11 May 2014 04:29:06 -0400 Subject: [PATCH] Don't ignore command key in keybindings on OSX --- src/fe-gtk/fkeys.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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