Improving keyboard ergonomics through dual use keymapping

If you’ve followed the online Apple Community then you’ve probably heard of the hyper key. If not, the hyper key is where you map caps lock so that if you hold it down it acts as if you’re holding down ctrl+option+cmd+shift, giving you another “modifie…


This content originally appeared on DEV Community and was authored by Kevin Burns

If you’ve followed the online Apple Community then you’ve probably heard of the hyper key. If not, the hyper key is where you map caps lock so that if you hold it down it acts as if you’re holding down ctrl+option+cmd+shift, giving you another “modifier” key. Some people go further by configuring it to act as hyper when held and used with another key and act as escape when you tap it.

I’ve seen a similar use case in the Linux VIM community where you use xcape to map caps lock as ctrl if held and used as a modifier and escape if tapped. I find this very useful and I have a hard time using a computer when it’s not setup this way.

Unfortunately, xcape only works for X11. When I moved to sway I had to find another solution. I’ve tried a few different options and I’ve settled on keyd.

keyd provides more options simply mapping a key to act in two different modes, but that’s what I use it for. I use the following config to have caps lock act as ctrl if used as a modifier and escape if not. Tab is also set to act as a super key if used as a modifier and tab if not. Right control is mapped as f13, which I use as a second modifier for shortcuts in sway.

[ids]
*
[main]
capslock = overload(control, esc)
tab = overload(meta, tab)
rightcontrol = f13

[alt]
tab = A-tab

[ctrl]
tab = C-tab

[shift]
tab = S-tab

The alt, ctrl, and shift modifiers are required to allow modifier+tab for windows management.


This content originally appeared on DEV Community and was authored by Kevin Burns


Print Share Comment Cite Upload Translate Updates
APA

Kevin Burns | Sciencx (2024-07-23T20:07:13+00:00) Improving keyboard ergonomics through dual use keymapping. Retrieved from https://www.scien.cx/2024/07/23/improving-keyboard-ergonomics-through-dual-use-keymapping/

MLA
" » Improving keyboard ergonomics through dual use keymapping." Kevin Burns | Sciencx - Tuesday July 23, 2024, https://www.scien.cx/2024/07/23/improving-keyboard-ergonomics-through-dual-use-keymapping/
HARVARD
Kevin Burns | Sciencx Tuesday July 23, 2024 » Improving keyboard ergonomics through dual use keymapping., viewed ,<https://www.scien.cx/2024/07/23/improving-keyboard-ergonomics-through-dual-use-keymapping/>
VANCOUVER
Kevin Burns | Sciencx - » Improving keyboard ergonomics through dual use keymapping. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/23/improving-keyboard-ergonomics-through-dual-use-keymapping/
CHICAGO
" » Improving keyboard ergonomics through dual use keymapping." Kevin Burns | Sciencx - Accessed . https://www.scien.cx/2024/07/23/improving-keyboard-ergonomics-through-dual-use-keymapping/
IEEE
" » Improving keyboard ergonomics through dual use keymapping." Kevin Burns | Sciencx [Online]. Available: https://www.scien.cx/2024/07/23/improving-keyboard-ergonomics-through-dual-use-keymapping/. [Accessed: ]
rf:citation
» Improving keyboard ergonomics through dual use keymapping | Kevin Burns | Sciencx | https://www.scien.cx/2024/07/23/improving-keyboard-ergonomics-through-dual-use-keymapping/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.