Bug 346806

Summary: KDE not honouring keypad modifier in shortcuts
Product: [Frameworks and Libraries] frameworks-kconfig Reporter: Luis Lezcano Airaldi <luislezcair>
Component: generalAssignee: Matthew Dawson <matthew>
Status: REPORTED ---    
Severity: major CC: andydecleyre, bugs.kde.pistos, kdebugs, kdelibs-bugs, rdieter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=357133
Latest Commit: Version Fixed In:

Description Luis Lezcano Airaldi 2015-04-27 17:40:08 UTC
I'm not sure if this is the right component where to post this bug.

I was experiencing this issue in Kate https://bugs.kde.org/show_bug.cgi?id=345504 (Keypad keys not working) and I was able to track down what I think is the problem.

I think some components (the shortcuts configuration dialog in systemsettings, Kate and other apps) are ignoring the Keypad modifier from Qt (Qt::KeypadModifier).

To test this I downloaded the KTextEditor source code and replaced the default shortcut for PageUp with "Qt::KeypadModifier + Qt::Key_PageUp" in src/view/kateview.cpp, like this:

a = ac->addAction(QLatin1String("scroll_page_up"));                         
a->setText(i18n("Scroll Page Up"));                                         
ac->setDefaultShortcut(a, QKeySequence(Qt::KeypadModifier + Qt::Key_PageUp));                                                                                                          
connect(a, SIGNAL(triggered(bool)), SLOT(pageUp()));                        
m_editActions << a;

Now it works as expected. Also, in the shortcut configuration dialog it shows up as "Num + PageUp", instead of just "PageUp" as before.
Of course, the same applies for the other keypad keys: Home, End, Insert, Del and PageDown.

Another thing: I am also having this bug https://bugs.kde.org/show_bug.cgi?id=343665, but I can't tell if it is related or not.
Comment 1 Luis Lezcano Airaldi 2015-04-27 17:52:21 UTC
I forgot to mention I'm running ArchLinux with KDE Frameworks 5.9.0 and Qt 5.4.1
Comment 2 Luis Lezcano Airaldi 2015-04-27 19:24:21 UTC
No need to modify source code. As a temporary workaround I manually sanitized ~/.config/kdeglobals (which is getting malformed because of Bug #343665) and added "Num+" in keypad bindings like this:


Now it works as expected with no code change required.
Comment 3 Pistos 2015-10-21 19:19:51 UTC
Possible duplicate of https://bugs.kde.org/show_bug.cgi?id=183458 .
Comment 4 Justin Zobel 2021-03-09 05:53:53 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.