Bug 434228 - Can't invoke shortcuts which require holding a key while using non US layouts
Summary: Can't invoke shortcuts which require holding a key while using non US layouts
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-10 11:10 UTC by Raghavendra kamath
Modified: 2023-11-24 13:00 UTC (History)
2 users (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 Raghavendra kamath 2021-03-10 11:10:40 UTC
SUMMARY
When I try to use Krita in a  non US English layout like Devanagari (default incript) I am not able to trigger the shortcuts which involve pressing and holding the key. For example the R key to select layer or the V key to enable line tool.

STEPS TO REPRODUCE
1. Change the input layer to Indian (variant default)
2. Open a new document and press and hold the R or V key

Operating System: Arch Linux
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.11.4-arch1-1
OS Type: 64-bit
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz
Memory: 31.3 GiB of RAM
Graphics Processor: GeForce GTX 750 Ti/PCIe/SSE2
Comment 1 Raghavendra kamath 2021-03-10 11:16:52 UTC
It works if we re-assign the shortcut with the key that is mapped to R in the layout, but since other keys like < and > work as expected in local layouts (non Us layout) user would expect these to work too.
Comment 2 Halla Rempt 2022-04-07 12:18:41 UTC
https://github.com/nyanpasu64/qkeycode/ says that QKeyCode::key() is layout dependent and tries to work around that, but with still a bunch of bugs.
Comment 3 Dmitry Kazakov 2023-11-24 12:26:11 UTC
Qt uses QKeyMapper::possibleKeys(event) mapper that maps the even to keys in all possible layouts. We could theoretically reuse this code...
Comment 4 Dmitry Kazakov 2023-11-24 13:00:39 UTC
Okay, it is not very easy to implement in KisShortcutsMatcher. Theoretically, possible, but requires quite a bit of work.