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
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.
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.
Qt uses QKeyMapper::possibleKeys(event) mapper that maps the even to keys in all possible layouts. We could theoretically reuse this code...
Okay, it is not very easy to implement in KisShortcutsMatcher. Theoretically, possible, but requires quite a bit of work.