Is there a way to bind one key to two?
I want my caps lock key to function as an esc key aswell as a modifier key, is this possible using kbct? i normally use this script
#!/bin/sh
# This script is called on startup to remap keys.
# Increase key speed via a rate change
xset r rate 300 50
# Map the caps lock key to super...
setxkbmap -option caps:super
# But when it is pressed only once, treat it as escape.
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
# Map the menu button to right super as well.
xmodmap -e 'keycode 135 = Super_R'
# Turn off the caps lock if on since there is no longer a key for it.
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
this script only sets the esc key when the caps key is pressed quickly but i dont need this functionality, just want caps to be esc and mod4 however ive moved to wayland and none of those tools work. ive tried
- keyboards: [ "AT Translated Set 2 keyboard" ]
keymap:
capslock: esc
capslock: leftmeta
but that just overwrites the esc and its only leftmeta. i also tried
- keyboards: [ "AT Translated Set 2 keyboard" ]
keymap:
capslock: esc,leftmeta
but that doesnt work.
Thanks!
Now the program is not working at all for some reason, Currently im just using
- keyboards: [ "AT Translated Set 2 keyboard" ]
keymap:
capslock: esc
as a config file and running it with the command oas kbct remap --config /etc/kbct/config.yml
however while this does not give an error it does not bind the key.
Hey! Mapping from one to multiple keys is yet to be implemented (I am planning to work on that soon).
I am currently using a config where I map capslock to left alt. It's been working for me fine so far, so I'd suggest checking the logs for a message like INFO kbct > Capturing device path... to see if your keyboard is captured at all.
Hey, thats awesome to hear its on the roadmap!
all the output i recieve from kbct is
INFO kbct > Starting kbct event loop, pid=3076
That means keyboard name is misconfigured (most likely).
Run sudo kbct list-devices (while having the keyboard connected) to find out the name.
Looks like duplicate of #13