Bug 430479 - Keyboard shortcut to decrease brush size (left bracket) doesn't work with Spanish layout
Summary: Keyboard shortcut to decrease brush size (left bracket) doesn't work with Spa...
Alias: None
Product: krita
Classification: Applications
Component: Brush Engine/Shape (show other bugs)
Version: 4.4.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
Depends on:
Reported: 2020-12-16 19:36 UTC by jbalague
Modified: 2021-02-17 13:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description jbalague 2020-12-16 19:36:54 UTC
Keyboard shortcut to decrease brush size (left bracket) doesn't work when Spanish layout is selected.
It works fine when an English (US or UK) layout is selected. 
Keyboard shortcut to increase brush size (right bracket) works fine in Spanish or English layouts.

Tested with Krita-x64-4.4.1, on Windows 10 Home version 2004 (64 bit). 
Tested with Krita-x64-4.2.8, on Windows 10 Home version 1909 (64 bit).

01. Launch Krita 4.4.1 or Krita-x64-4.2.8 on Windows 10.
02. Create a new document (File > New > Create).
03. Select the brush tool ('B' key).
04. Make sure you have the English keyboard layout (US or UK).
05. Decrease the brush size with the '[' key --> it works.
06. Increase the brush size with the ']' key --> it works.
07. Change keyboard layout to Spanish.
08. Decrease the brush size with the '[' key --> IT DOESN'T WORK!!!
09. Increase the brush size with the ']' key --> it works!!!
10. Change keyboard layout back to English.
11. Decrease the brush size with the '[' key --> it works.


Windows: W10 home, 64 bit, version 2004.
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

Comment 1 Halla Rempt 2020-12-17 11:07:41 UTC
I can confirm the issue. This is a windows-specific issue, it doesn't happen with X11/plasma/kwin with a spanish keyboard layout.
Comment 2 Halla Rempt 2020-12-17 11:08:59 UTC
When a spanish keyboard layout is active, altgr-[ seems to send ctrl-alt-^ -- not sure what we can do about that.
Comment 3 Dmitry Kazakov 2021-02-15 04:04:52 UTC
I have almost the same issue with the Russian keyboard layout. The Russian keyboard layout is very different and doesn't have '[' and ']' keys at all. So we usually expect the shortcuts to be mapped to the English keys and work the same way in the Russian layout. Btw, shortcuts like 'b' and 't' work in the Russian layout perfectly fine.
Comment 4 Dmitry Kazakov 2021-02-15 07:58:25 UTC
Git commit bb260d701b7a0f69447b1272d899d4b89d0415cb by Dmitry Kazakov.
Committed on 15/02/2021 at 07:58.
Pushed by dkazakov into branch 'master'.

Fix shortcuts assigned to special keys on non-latin layouts

When the user has non-latin layout we still consider latin
meaning of the keys to be a priorty. This behavior is already
in Qt (and is disputable), but this patch doesn't change that.
The patch only adds proper handling of special keys:

* '\' --- backslash/bar key
* '/' --- slash/question key
* ';' --- semicolon/colon key
* '`' --- backqoute/tilde key
* ''' --- quote/doublequote key
* '[' --- left bracket key
* ']' --- right bracket key
* ',' --- comma/< key
* '.' --- period/> key
* '-' --- minus/underscore key
* '=' --- equal/plus key

A  +75   -0    3rdparty/ext_qt/0112-Fix-shortcuts-assigned-to-special-keys-on-non-latin-.patch
A  +42   -0    3rdparty/ext_qt/0113-Fix-multiple-shortcuts-match-from-different-keyboard.patch
M  +10   -0    3rdparty/ext_qt/CMakeLists.txt

Comment 5 Dmitry Kazakov 2021-02-15 08:30:07 UTC
Hi, Jbalague!

Could you please check if this package fixes the problem for you?


Before testing, please make sure you've made a backup of files in %APPDATA% and %LOCALAPPDATA%. This package is based on Krita 5.0, so it may break the configuration of Krita 4.4.
Comment 6 Dmitry Kazakov 2021-02-17 13:20:46 UTC
Git commit cdfc724f2ea297fbd4e943d384f5be7d62162540 by Dmitry Kazakov.
Committed on 17/02/2021 at 13:20.
Pushed by dkazakov into branch 'master'.

Fix shortcuts with special keys on non-US layouts on Linux

WARNING: this patch solidifies the precedence of the us-latin layout
key positions over the current user layout. It basically means that
if the user's layout swaps the position of Z and Y letters, then Ctrl+Y
will still work as Ctrl+Z.

I need user's input on that change. Afaict, this bahavior was the default
on Windows, but it was not so on Linux before.

A  +93   -0    3rdparty/ext_qt/0114-Fix-shortcuts-with-special-keys-on-non-US-layouts-on.patch
M  +1    -0    3rdparty/ext_qt/CMakeLists.txt