keyd
keyd copied to clipboard
capslock = overload(control, esc) ignores scroll wheel events
Minimal example config:
[ids]
*
[main]
capslock = overload(control, esc)
When holding caps lock, pressing any keyboard key, and releasing caps lock, only CTRL keys are emitted. When pressing and releasing caps lock without pressing any key, CTRL down+up and ESC down+up events are emitted in rapid succession. This is expected behavior and works as intended.
However, when caps lock is held, the scroll wheel is used (but no key is pressed), and caps lock is released, then keyd also emits ESC (confirmed via keyd monitor
). This shouldn't happen.
CTRL + scrollwheel is commonly used for zooming in and out, and may often be the only way to scroll in some interface using the keyboard without clicking. For example, the embedded version of the Google Maps widget found on many webpages.
I noticed this in the Google Cloud Maps API page, where an example embedded map is displayed inside a modal. Pressing escape closes the modal, while CTRL + scrollwheel zooms the modal. Using the remapped caps lock key to zoom closes the modal as well as zooming.