[Xfce4-commits] <libxfce4ui:xfce-4.10> Fix keyboard shortcuts with keypad (bug #4178).
Jérôme Guelfucci
noreply at xfce.org
Sat May 4 12:10:08 CEST 2013
Updating branch refs/heads/xfce-4.10
to 202442c762894e2eabfc9e8953a64674a6a2b6f7 (commit)
from a43f8e098cbef25ea0fd042c64e367aedf205397 (commit)
commit 202442c762894e2eabfc9e8953a64674a6a2b6f7
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 9b0947c..5728dda 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 */
@@ -292,12 +296,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,
};
/* Retrieve the root window of the screen */
More information about the Xfce4-commits
mailing list