keyd icon indicating copy to clipboard operation
keyd copied to clipboard

"meta" key-combinations on non-latin keyboard layouts sends unexpected characters (consistently)

Open shula opened this issue 6 months ago • 3 comments

relevant part of my app.conf:

[meta]
n = ₪
# the following letter <kbd>מ</kbd> is a hebrew letter found on hebrew keyboard layout, in the same position as <kbd>n</kbd>
מ = ₪
#מ = macro(₪)    <--- i tried that too, same results
u = €
# the following letter <kbd>ו</kbd> is a hebrew letter found on hebrew keyboard layout
ו = €

When the keyboard layout is "English", and I press meta+u --> I would get

When the keyboard layout is "Hebrew", and I press meta+u --> I would get פש which doesn't mean anything.

Same happens with all other meta+x keys, for example: on "English" layout, meta+n gives on "Hebrew" layout, meta+מ gives 8 + a "beep" sound(?!)

What am I doing wrong? Is it a bug?

system settings: keyd version: 2.5.0 linux arch (updated today, before testings) Running on PC

here's keyd monitor running (Hebrew keyboard layout), and i'm pressing meta+מ (which is "n" on latin keyboard, if that matters...)

keyd virtual keyboard   0fac:0ade:efba1ddf      leftmeta down
keyd virtual keyboard   0fac:0ade:efba1ddf      leftcontrol down
keyd virtual keyboard   0fac:0ade:efba1ddf      leftmeta up
keyd virtual keyboard   0fac:0ade:efba1ddf      leftcontrol up
keyd virtual keyboard   0fac:0ade:efba1ddf      cancel down
keyd virtual keyboard   0fac:0ade:efba1ddf      cancel up
keyd virtual keyboard   0fac:0ade:efba1ddf      5 down
keyd virtual keyboard   0fac:0ade:efba1ddf      5 up
keyd virtual keyboard   0fac:0ade:efba1ddf      p down
keyd virtual keyboard   0fac:0ade:efba1ddf      p up
keyd virtual keyboard   0fac:0ade:efba1ddf      8 down
keyd virtual keyboard   0fac:0ade:efba1ddf      8 up
keyd virtual keyboard   0fac:0ade:efba1ddf      leftmeta down
keyd virtual keyboard   0fac:0ade:efba1ddf      leftcontrol down
keyd virtual keyboard   0fac:0ade:efba1ddf      leftmeta up
keyd virtual keyboard   0fac:0ade:efba1ddf      leftcontrol up

ctrl was not pressed at all. Maybe it has something to do with the bug?

shula avatar Jun 12 '25 15:06 shula

having a similar issue, although in my case it's only the random "leftcontrol down/up" key events being sent.

i have a dead simple keyd config only overloading capslock to work as escape on tap and meta/super when held, and i started noticing that in some situations where i expected to be able to hold the capslock key down as meta to accomplish something, letting go of it would then also send the escape key event.

running with monitor i noticed the "leftcontrol" events, even though i never touched it nor is it bound anywhere in my config. (EDIT: correction, obviously i pressed 'leftcontrol' at the end when Ctrl+C'ing to exit monitor)

device added: 1532:0084:288cfcd8 Razer Razer DeathAdder V2 (/dev/input/event10)
device added: 1532:0084:6cf24928 Razer Razer DeathAdder V2 Keyboard (/dev/input/event8)
device added: 1532:0084:19ad785d Razer Razer DeathAdder V2 (/dev/input/event7)
device added: 0fac:1ade:d2b36ae6 keyd virtual pointer (/dev/input/event28)
device added: 0fac:0ade:efba1ddf keyd virtual keyboard (/dev/input/event27)
device added: 27c6:01e0:bdc0a1f0 GXTP5100:00 27C6:01E0 Touchpad (/dev/input/event26)
device added: 27c6:01e0:c56bcc82 GXTP5100:00 27C6:01E0 Mouse (/dev/input/event25)
device added: 0000:0006:bdb72f48 Video Bus (/dev/input/event12)
device added: 0000:0006:bdb72f48 Video Bus (/dev/input/event11)
device added: 048d:c998:193096a7 ITE Tech. Inc. ITE Device(8258) Keyboard (/dev/input/event4)
device added: 0001:0001:70533846 AT Translated Set 2 keyboard (/dev/input/event3)
keyd virtual keyboard	0fac:0ade:efba1ddf	enter up
keyd virtual keyboard	0fac:0ade:efba1ddf	leftmeta down
keyd virtual keyboard	0fac:0ade:efba1ddf	leftcontrol down
keyd virtual keyboard	0fac:0ade:efba1ddf	leftmeta up
keyd virtual keyboard	0fac:0ade:efba1ddf	leftcontrol up
keyd virtual keyboard	0fac:0ade:efba1ddf	esc down
keyd virtual keyboard	0fac:0ade:efba1ddf	esc up
keyd virtual keyboard	0fac:0ade:efba1ddf	leftcontrol down
keyd virtual keyboard	0fac:0ade:efba1ddf	c down

contents of /etc/keyd/default.conf:

[ids]

*

[main]

# Maps capslock to escape when pressed and meta when held.
capslock = overload(meta, esc)

alefnull avatar Jun 14 '25 05:06 alefnull

@alefnull, that is a seperate feature. When pressing an overloaded key, keyd immediately emits the modifier and then interweaves a leftcontrol press on keyup to 'cancel' it. If this causes issues, you can turn it off with the disable_modifier_guard = 1 option.

@shula, what is the layout you use outside of keyd? And have you linked ~/.Xcompose? Do you have a keyd config too, or just the application-mapper config?

On June 14, 2025 7:14:46 AM GMT+02:00, alefnull @.***> wrote:

alefnull left a comment (rvaiya/keyd#1035)

having a similar issue, although in my case it's only the random "leftcontrol down/up" key events being sent.

i have a dead simple keyd config only overloading capslock to work as escape on tap and meta/super when held, and i started noticing that in some situations where i expected to be able to hold the capslock key down as meta to accomplish something, letting go of it would then also send the escape key event.

running with monitor i noticed the "leftcontrol" events, even though i never touched it nor is it bound anywhere in my config.

device added: 1532:0084:288cfcd8 Razer Razer DeathAdder V2 (/dev/input/event10)
device added: 1532:0084:6cf24928 Razer Razer DeathAdder V2 Keyboard (/dev/input/event8)
device added: 1532:0084:19ad785d Razer Razer DeathAdder V2 (/dev/input/event7)
device added: 0fac:1ade:d2b36ae6 keyd virtual pointer (/dev/input/event28)
device added: 0fac:0ade:efba1ddf keyd virtual keyboard (/dev/input/event27)
device added: 27c6:01e0:bdc0a1f0 GXTP5100:00 27C6:01E0 Touchpad (/dev/input/event26)
device added: 27c6:01e0:c56bcc82 GXTP5100:00 27C6:01E0 Mouse (/dev/input/event25)
device added: 0000:0006:bdb72f48 Video Bus (/dev/input/event12)
device added: 0000:0006:bdb72f48 Video Bus (/dev/input/event11)
device added: 048d:c998:193096a7 ITE Tech. Inc. ITE Device(8258) Keyboard (/dev/input/event4)
device added: 0001:0001:70533846 AT Translated Set 2 keyboard (/dev/input/event3)
keyd virtual keyboard	0fac:0ade:efba1ddf	enter up
keyd virtual keyboard	0fac:0ade:efba1ddf	leftmeta down
keyd virtual keyboard	0fac:0ade:efba1ddf	leftcontrol down
keyd virtual keyboard	0fac:0ade:efba1ddf	leftmeta up
keyd virtual keyboard	0fac:0ade:efba1ddf	leftcontrol up
keyd virtual keyboard	0fac:0ade:efba1ddf	esc down
keyd virtual keyboard	0fac:0ade:efba1ddf	esc up
keyd virtual keyboard	0fac:0ade:efba1ddf	leftcontrol down
keyd virtual keyboard	0fac:0ade:efba1ddf	c down

contents of /etc/keyd/default.conf:

[ids]

*

[main]

# Maps capslock to escape when pressed and meta when held.
capslock = overload(meta, esc)

-- Reply to this email directly or view it on GitHub: https://github.com/rvaiya/keyd/issues/1035#issuecomment-2972275941 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

nsbgn avatar Jun 14 '25 13:06 nsbgn

@nsbgn apologies for hijacking this issue, then.

but it's not just the ctrl characters, as even when holding the key down and using it as meta, after releasing it emits not only meta up, but also escape down and up.

I'll create a separate issue later when I have time if that's preferable.

alefnull avatar Jun 14 '25 14:06 alefnull