News for hackers. Stuff that matters.
Re:The unix69 keyboard layout: nerdy and nice by JKCalhoun on Friday August 04, 2023 @02:37PM (#37003994)
And no CapsLock at all. Bug or feature?
Re:The unix69 keyboard layout: nerdy and nice by smodo on Friday August 04, 2023 @02:53PM (#37004219)
If you need capslock that’s easy to emulate in software nowadays. For instance KDE has a default option to toggle capslock by pressing both shift keys.
Re:The unix69 keyboard layout: nerdy and nice by o11c on Friday August 04, 2023 @04:01PM (#37005092)
I use that, but unfortunately it's not that easy (also I'm pretty sure it's not KDE-specific - most keyboard stuff even works in the console!).

Let's use `xev`'s `state` field for reference:

First, `state & 0x10` is NumLock which is the only modifier that's often set. Software knows to mask out this and a couple other modifiers when dispatching keyboard shortcuts.

Second, `state & 0x02` is CapsLock. Software that detects CapsLock as a modifier will work correctly with double-shift-as-capslock.

Unfortunately, `state & 0x01` is Shift. Software that reads CapsLock as a keysym (often e.g. games that use it as a "turbo" toggle) will often fail, because when double-shift is pressed, the shift modifier has been set. And it's generally considered a bug to ignore modifiers when dispatching keyboard events.

Unfortunately, there is no event for just "`state` changed", it is only dispatched alongside some other mouse/keyboard event. If you press just `shift` you'll see that it doesn't update yet for the just-pressed key (and fundamentally cannot due to how it has to work to switch between keycode->keysym mappings).

Re:The unix69 keyboard layout: nerdy and nice by zdw on Friday August 04, 2023 @03:32PM (#37004753)
Definitely a feature. All the "lock" keys are bugs.
Re:The unix69 keyboard layout: nerdy and nice by madphilosopher on Friday August 04, 2023 @04:00PM (#37005083)
In my entire computing career, I have never locked my Caps or unlocked my Num! That's how I roll.
Re:The unix69 keyboard layout: nerdy and nice by JKCalhoun on Saturday August 05, 2023 @11:39PM (#37018780)
Only hit caps lock on accident. I used to pry the CAPSLOCK keycap off my keyboards at work.
Re:The unix69 keyboard layout: nerdy and nice by ris58h on Friday August 04, 2023 @07:08PM (#37007031)
I've had CapsLock mapped to Esc for years and haven't looked back. I'm OK with holding Shift.