Is it possible to remap keys with multiple modifiers from the cli?
I am trying to bind ctrl+alt+shift+f1 up to ctrl+alt+shift+f9 to new bindings using keyd-application-mapper. Because my mappings did not work, I started trying to do it manually from the cli, with the following results:
$ keyd bind control.alt.shift.f1=kp1
alt.shift.f1 is not a valid key or alias
So I tried something else, but without success:
$ keyd bind control+alt+shift.f1=kp1
control+alt+shift is not a valid layer
Would something like this (basically remapping keys with multiple modifiers using keyd bind) be possible?
I think this is possible, but not in the way you are doing it.
In your ~/.config/keyd/app.conf, you can use the layers defined in /etc/keyd/default.conf
Here is an excerpt from my configuration. Note that primary_layer is a custom layer I created.
[firefox*]
# Go backward/forward in history
alt.h = C-[
alt.l = C-]
# New private window
capslock+shift.n = C-S-p
# Rearrange tabs
capslock.[ = C-S-pageup
capslock.] = C-S-pagedown
# Open search bar
primary_layer.k = C-k
Thanks, but I don't really understand how you would trigger that layer... Also, I guess capslock is also a layer, and this part shows two layers with a +:
# New private window
capslock+shift.n = C-S-p
Isn't that what I am searching for? How does that work?
I guess capslock is also a layer,
You are right.
Isn't that what I am searching for?
It seems pretty close to what you are looking for, which is why I included it in my excerpt.
Hopefully, a more experienced user can help you further.
I only managed to create my configuration after a lot of trial and error. I recommend starting simple. For example, don't immediately try to remap ctrl+alt+shift+f1; instead, try remapping ctrl+f1 first. Once that works, add a modifier.
Don't start mapping to a complex binding either, start by binding to a simple letter.
Note that the [firefox*] part in ~/.config/keyd/app.conf is very important too. Make sure it is actually being matched.
@Vosjedev Layers must be defined in /etc/keyd/*.conf.
If you do the following, you can use it in ~/.config/keyd/app.conf like HYPER.a = b.
# /etc/keyd/keyd.conf
[HYPER:S-C-A-M]
esc = clear()
Sorry for the very late response. I eventually solved it using a device-specific remap and some aliases. Thanks for the help, this information could be usefull in the future.
The correct way to solve this is to use composite layers.
That is:
[control+alt+shift]
f1 = <action>
Please see the man page for more details.