Bug 478007

Summary: "Extend selection" series of text field shortcuts do not respect navigation shortcuts set in System Settings
Product: [Frameworks and Libraries] frameworks-kglobalaccel Reporter: Marco Rebhan <me>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate
Priority: NOR    
Version: 5.112.0   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marco Rebhan 2023-12-03 19:00:15 UTC
SUMMARY
The "extend selection" shortcuts in Qt text input controls (except for certain applications which implement it themselves such as Kate) are always mapped to ctrl+shift+left and ctrl+shift+right (and shift+pos1/shift+end and so on). This works fine as long as you keep the default bindings for text movement (ctrl+left/right, pos1/end, ...). However, if you rebind them to e.g. alt+left/right and meta+left/right, the extend selection shortcuts no longer match up and as far as I can tell there is no way to rebind these separately.

STEPS TO REPRODUCE
1. Bind "Backward Word" and "Forward Word" to alt+left and alt+right (in Shortcuts -> Navigation)
2. Select a normal Qt input field
3. Try alt+shift+left to extend selection backwards a word

OBSERVED RESULT
Nothing happens, as ctrl+shift+left is still the shortcut for that action

EXPECTED RESULT
alt+shift+left selects backwards a word, or there is a separate shortcut you can set for that like in Kate

SOFTWARE/OS VERSIONS
Operating System: NixOS 23.11
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.1.63 (64-bit)
Graphics Platform: Wayland
Processors: 24 × 13th Gen Intel® Core™ i7-13700F
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-12-12 23:18:37 UTC
Indeed, We can't override the basic shortcuts for Qt's text input controls here, but we can overlay our own on top ot replace them in custom subclasses, which is what apps like Kate can do. I'm afraid Qt changes would be required to be able to do what you;re asking for.