Numpad "home" and "end" keys behave differently than "home" and "end" keys when combined with shift
Steps to reproduce
- open a GNOME app (gtk3 or gtk4 -- e.g. Text Editor, Apostrophe, Gedit)
- enter some text and place the cursor somewhere in the middle of a line
- make sure numlock is disabled and press shift+<numpad home> or shift+<numpad end>
Current behavior
shift+<numpad home> just moves the cursor to the beginning of the line. Likewise, shift+<numpad end> just moves the cursor to the end of the line.
Expected outcome
Aside from moving the cursor, the text from the cursor position until the beginning/end of the line should have been selected, as it happens when shift is combined with "real" home and end keys.
Version information
- gtk4-4.14.3-1
- Fedora 40 (GNOME 46)
Additional information
Non-gtk apps (e.g. Firefox, Telegram, Chrome) behave as expected, and so does "real" home
and end
keys on gtk apps. The problem can also be reproduced on the text fields on the "GTK Demo" app. evemu-record
shows what seems to be correct scan codes:
- Home = 199
- End = 207
- KP_Home = KP_7 = 71
- KP_End = KP_1 = 79
This has been reproduced by at least one other user (see discussion on GNOME Discourse)
Also, this is not a new bug: it has been happening at least since GNOME 45 (can't recall exactly when it was introduced, though).