Feature request: chord aliases (or, how do I concisely remap a chord in multiple layers?)
I have a ThinkPad Gen 5 P14s Intel with this annoying new "Windows Copilot" key that sends leftmeta+leftshift+f23 by default (e.g. https://github.com/rvaiya/keyd/issues/1025), and I want to treat it as a regular win key. I also want the oneshot and toggle behavior for the win key (I use it to control my window manager, xmonad), but it seems I need to remap the leftmeta+leftshift+f23 combo in all layers. This wasn't difficult to do once I understood the solution, but was confusing to figure out as a new keyd user. If I could simply remap leftmeta+leftshift+f23 as another meta alias, it would be less confusing.
Here is a working config file that accomplishes what I want, and additionally remaps the menu key compose in the same way (my laptop keyboard has a copilot key between right alt and right control, and my external keyboard has a menu key between right alt and right control, and I want to treat them as win keys). Compare how I can use an alias for compose, but not for leftmeta+leftshift+f23:
[ids]
*
[aliases]
# Doesn't work: doesn't do anything.
#leftshift+leftmeta+f23 = meta
# This works: makes all my other `meta` rules apply to `compose`.
compose = meta
[main]
meta = oneshot(meta)
leftshift+leftmeta+f23 = oneshot(meta)
[meta]
meta = toggle(meta)
leftshift+leftmeta+f23 = toggle(meta)
I apologize if I am mistaken, but the meta layer exists by default.
How about using another name (such as META)?
I apologize if I am mistaken, but the
metalayer exists by default. How about using another name (such asMETA)?
I'm not sure I understand: I thought the win key was mapped to the meta layer by default. My goals here are:
- have the copilot key treated like another win key.
- enable
oneshotandtogglefor both win keys.
It means something like changing A to B.
I apologize if I am mistaken, but I understand that the name specified as an alias must avoid existing key names and layer names.
# A
[aliases]
# Doesn't work: doesn't do anything.
#leftshift+leftmeta+f23 = meta
# B
[aliases]
leftshift+leftmeta+f23 = copilot
[main]
copilot = oneshot(meta)
No, looking at the examples in the manual, that doesn't seem to be the case. Sorry.
https://github.com/rvaiya/keyd/blob/931a8060905b8fd80c83afbe059c22faa0811d03/docs/keyd.scdoc#L478