You are not logged in.

#1 2024-04-26 12:18:42

voidoff
Member
Registered: 2024-04-26
Posts: 2

XKB keys under modifiers

Context: I use colemak, and I'm used to colemak bindings for shortcuts. I also use a cyrillic layout. In this layout, however, shortcuts correspond to qwerty. E.g., when i press ctrl+AC04 on XKB's default colemak layout, it opens a new tab, because AC04 on colemak is t; but when i press ctrl+AC04 on the cyrillic layout, it opens search. What I want is for it all to open a new tab.

I've searched through xkb/symbols/ru and I can't find anything that determines what layout is used for keys under modifiers. Why is it qwerty exactly? It seems that this is defined for the whole layout: even if I set AC04 to 't', it still opens search. `include "us(colemak)` doesn't help. So I suppose it must be configured somewhere else. The question is, where can it be.

Offline

#2 2024-04-26 14:01:18

seth
Member
Registered: 2012-09-03
Posts: 51,840

Re: XKB keys under modifiers

ctrl (unlike shift or altgr, the iso level3 shift)  does not impact the layout. You get ctrl and whatever AC04 generates on the current layout (Cyrillic_ef ?)

setxkbmap -print -query
xev -event keyboard # to debug the keyboard events

Does the rulemak layout (ru variant) help you here?

Online

#3 2024-04-26 17:57:00

voidoff
Member
Registered: 2024-04-26
Posts: 2

Re: XKB keys under modifiers

seth wrote:

ctrl (unlike shift or altgr, the iso level3 shift)  does not impact the layout. You get ctrl and whatever AC04 generates on the current layout (Cyrillic_ef ?)

setxkbmap -print -query
xev -event keyboard # to debug the keyboard events

It gets weird here. For un-ctrled presses, xev returns

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
    root 0x4a4, subw 0x0, time 42735319, (-619,-172), root:(420,526),
    state 0x2000, keycode 41 (keysym 0x6c1, Cyrillic_a), same_screen YES,
    XLookupString gives 2 bytes: (d0 b0) "а"
    XFilterEvent returns: False

But for ctrl+AC04, it returns 't'

KeyRelease event, serial 28, synthetic NO, window 0x2400001,
    root 0x4a4, subw 0x0, time 43121351, (159,-27), root:(1198,671),
    state 0x2004, keycode 41 (keysym 0x74, t), same_screen YES,
    XLookupString gives 1 bytes: (14) ""
    XFilterEvent returns: False

This is the same as on colemak; seems like it depends on the latest layout i use: if i switch to cyrillic from qwerty, it is 'f'. However, it doesn't affect the shortcuts.

seth wrote:

Does the rulemak layout (ru variant) help you here?

Well, I don't want any different layout. I want to keep the default russian layout (it's unrelated to qwerty), but change the way shortcuts work.

Maybe I should just reassign the keys with keyd.

Offline

#4 2024-04-26 19:53:44

seth
Member
Registered: 2012-09-03
Posts: 51,840

Re: XKB keys under modifiers

What do you use as layout switch?

seth wrote:
setxkbmap -print -query

Online

Board footer

Powered by FluxBB