Bug 478007 - "Extend selection" series of text field shortcuts do not respect navigation shortcuts set in System Settings
Summary: "Extend selection" series of text field shortcuts do not respect navigation s...
Status: RESOLVED UPSTREAM
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.112.0
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-03 19:00 UTC by Marco Rebhan
Modified: 2023-12-12 23:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.