Skip to content

Global keyboard shortcuts involving Numpad no longer working in 4.18.5

I have a few hotkeys in "Xfce Settings Manager -> Keyboard -> Application Shortcuts" that use the Numpad, e.g. Super+KP 8. They no longer work after upgrading to libxfce4ui 4.18.5 on my Arch Linux machine. Other hotkeys like Super+A work fine though.

git bisect tells me:

1afd424c43779e983860d3f0a1f084d9dbde589f is the first bad commit
commit 1afd424c43779e983860d3f0a1f084d9dbde589f
Author: Gaël Bonithon <gael@xfce.org>
Date:   Wed Sep 6 13:01:31 2023 +0200

    shortcuts-grabber: Fix filtering by level

    a0203505 introduced a regression, see
    https://gitlab.xfce.org/xfce/libxfce4ui/-/merge_requests/104#note_79217

    It seems that a reliable way to filter by level, taking into account the
    modifiers from gtk_accelerator_parse(), is to apply the inverse
    transformation to gdk_keymap_get_entries_for_keyval(), i.e.
    gdk_keymap_translate_keyboard_state(), and see if the keyval matches.

    Fixes: a0203505201af43a8ccc063e536f1353b8c5daa4
    Related: xfce4-settings#442
    (cherry picked from commit b2e1dac24e4393badbf0d9ede344f1096b5d8c82)

 libxfce4kbd-private/xfce-shortcuts-grabber.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)