[Xfce4-commits] <libxfce4ui:jeromeg/keyboard-shortcuts> Fix keyboard shortcuts with keypad (bug #4178).
Jérôme Guelfucci
noreply at xfce.org
Thu Dec 20 10:36:02 CET 2012
Updating branch refs/heads/jeromeg/keyboard-shortcuts
to 4c2a8a1dd003091288f4b86521ae8f3ff7359370 (commit)
from f48c83b67cb46f7b64d4d5cd3bb474e7ee4e9b8b (commit)
commit 4c2a8a1dd003091288f4b86521ae8f3ff7359370
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date: Thu Dec 20 10:34:23 2012 +0100
Fix keyboard shortcuts with keypad (bug #4178).
To do so, we also grab all shortcuts with the numlock modifier.
libxfce4kbd-private/xfce-shortcuts-grabber.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 0d816a2..dcfc235 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -276,6 +276,10 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
return;
}
+ numlock_modifier =
+ XkbKeysymToModifiers (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+ GDK_KEY_Num_Lock);
+
for (i = 0; i < n_keys; i ++)
{
/* Grab all hardware keys generating keyval */
@@ -291,12 +295,19 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
guint mod_masks [] = {
0,
GDK_MOD2_MASK,
+ numlock_modifier | GDK_MOD2_MASK,
GDK_LOCK_MASK,
+ numlock_modifier | GDK_LOCK_MASK,
GDK_MOD5_MASK,
+ numlock_modifier | GDK_MOD5_MASK,
GDK_MOD2_MASK | GDK_LOCK_MASK,
+ numlock_modifier | GDK_MOD2_MASK | GDK_LOCK_MASK,
GDK_MOD2_MASK | GDK_MOD5_MASK,
+ numlock_modifier | GDK_MOD2_MASK | GDK_MOD5_MASK,
GDK_LOCK_MASK | GDK_MOD5_MASK,
+ numlock_modifier | GDK_LOCK_MASK | GDK_MOD5_MASK,
GDK_MOD2_MASK | GDK_LOCK_MASK | GDK_MOD5_MASK,
+ numlock_modifier | GDK_MOD2_MASK | GDK_LOCK_MASK | GDK_MOD5_MASK,
};
#if GTK_CHECK_VERSION (3, 0, 0)
More information about the Xfce4-commits
mailing list