Unbind a layer modifier
Hey, I wrote https://github.com/arnarg/waybind a while back and never found the time/interest to polish it up. I found your project and I'm trying it out to see if I can replace my tool. My original goal was to mimic my QMK 60% keyboards on my laptops so layers are perfect for this.
Anyway, I was trying this out and I use caps lock as a modifier for my layer and while testing kbct it still switches on caps lock when pressing it. Do you have an option of essentially making the key into a no-op when it's a modifier?
I think something like this can fix the issue.
- keyboards: [ "Some kbd"]
keymap:
capslock: reserved # noop
layers:
- modifiers: [ 'capslock' ]
keymap:
i: up
j: left
# etc...
reserved is the keyword for noop. Will add that to the readme.md as well. If you absolutely need to use caps lock, the best I can suggest at this moment is to map it under some other layer (for example Ctrl+CapsLock = CapsLock).
My bad. Thanks! I was trying to bind it to reserved in the layer.
- keyboards:
- AT Translated Set 2 keyboard
layers:
- modifiers:
- capslock
keymap:
capslock: reserved
w: up
s: down
a: left
d: right
But your suggestion works!
I'm however having some difficulty with replicating the Grave escape in QMK. Here's what I tried:
- keyboards:
- AT Translated Set 2 keyboard
keymap:
grave: esc
capslock: reserved
layers:
- modifiers:
- capslock
keymap:
grave: grave
w: up
s: down
a: left
d: right
- modifiers:
- leftshift
keymap:
grave: grave
This almost works the way I want it to. Pressing grave on its own sends escape, pressing capslock+grave sends a backtick but pressing shift+grave also sends backtick while I would expect that to literally be shift+grave, i.e. tilde.
Incidentally, I also tried pressing capslock+shift+grave (actually just pressing capslock+shift together is enough) and that crashed kbct.
INFO kbct > Starting kbct event loop, pid=92394
INFO kbct > Capturing device path=/dev/input/event0 name="AT Translated Set 2 keyboard" mapped_name="Kbct-AT Translated Set 2 keyboard"
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/kbct.rs:168:62
Anyway, thanks for your help.
Thanks, for the thorough explanation. Clearly this is a bug, will let you know when fixed.
On an unrelated note, I've been using this for a few days now and it works well (apart from the bug above). So I'm thinking of archiving my project, are you ok with me linking to your project in the README? It only has 26 stars.
Hi @arnarg. Yes, no problem! Happy to know that it was helpful.