dolik-rce created an issue (geany/geany#4478)

### Problem:
The default shortcuts for custom commands in "Send to custom command 1", which 
is `<Primary>1` (and similarly for 2 and 3) doesn't work correctly with Czech 
keyboard layout (and possibly others). It is probably because we have to type 
numbers with `Shift`, since the top row on keyboard is normally used for 
letters with diacritics.

One interesting thing that I noticed is that `<Primary>0` for default zoom 
works correctly, which is rather strange, since 0 is typed exactly the same way 
as other numbers (i.e. with Shift). I suspect some GTK trickery here, because 
this shortcut is used for zooming in many applications and it would break all 
of them if it didn't work in all layouts.

### What I tried

When I open the preferences and press `Ctrl+1` in new shortcut the way I would 
normally type it with shift I get `<Primary><Shift>1` which then works fine and 
invokes the custom command as expected.

Pressing just Ctrl and the key where the number is results in `<Primary>plus` 
(for 1), `<Primary>ecaron` (for 2), `<Primary>scaron` (for 3) etc. This 
combination then also works as expected.

I couldn't find any combination of keys that would result in just `<Primary>1`. 
Note that I use notebook with no numerical keyboard. And I admit, that it 
probably makes  me even smaller minority than just using non-english keyboard 
layout đŸ™‚ 

### Possible solutions

As it seems that the problem is that the default combination is impossible to 
type on my keyboard, the simplest solution might be to change it. But that 
would be bad for many more users who are used to that default, so I assume it 
is out of question. 

It might be possible to find out why `<Primary>0` works and apply same trick to 
other numbers. Or at least emulate the behavior. It seems little hackish, but 
it would make Geany behave in a way users probably expect.

The last resort solution might be to just admit it's broken and document the 
behavior. Changing the shortcuts is simple, if the user is aware that some 
shortcuts with numbers might not work out of the box.

### Technical details: 
- Geany 2.1
- Wayland + Sway
- GTK+ v3.24.51 
- GLib v2.86.1

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/4478
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/[email protected]>

Reply via email to