-- Leo's gemini proxy

-- Connecting to gemini.conman.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

I love it when abstractions are too abstract to be useful

I recently found [1] an annoying aspect of Xlib [2]—it's hard to find documentation about what keys affect the state field of the keyboard event. It's obvious that the shift keys on the keyboard will set ShiftMask, the control key will set ControlMask, and the CapsLock key will set LockMask (when I would expect it to set ShiftMask since it's just locking the shift keys to “on”), but there's little to say what keys set the Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask and Mod5Mask.


This is problematic, because I do need to check for keyboard events and this threw me for a loop—why are none of the keys working? Well, that's because my virtual Linux server on the Mac sets the NumLock key, which causes the X server to then set the Mod2Mask for all keyboard events and I wasn't expecting that.


Sigh.


[1] /boston/2024/04/04.1

[2] https://en.wikipedia.org/wiki/Xlib


Gemini Mention this post

Contact the author


-- Response ended

-- Page fetched on Sat May 4 22:50:19 2024