[SDL] RFC: prototype implementation of physical key codes
cwalther at gmx.ch
Tue Sep 5 10:58:02 PDT 2006
Gerry JJ wrote:
>> - Do you think such a feature would be useful to have in SDL 1.3?
> Yes! Definitely. Essential, even.
Nice to hear! :)
>> - Does it work for you? I'm particularly interested in keyboards other
>> than the standard 104/105-key ISO/ANSI Mac and PC keyboards I have here.
> Linux (64-bit gentoo), X.org 7.0, norwegian keyboard w/some extra multi-
> media and web buttons: Seems to work fine! It even picked up the correct
> names of the extra keys.
Cool. I couldn't test these as I don't have such a keyboard, and their X
keycodes don't seem to be very standardized - I gathered that info from
various places on the web, and only included those that most sources
> Oh, and the caps lock and num lock keys only registered when enabling, not
> disabling, but scroll lock worked like a regular key. I know SDL always
> worked like this, but while we're on the subject of keys anyway .. First,
> why doesn't scroll lock work like the other lock keys (no light, even) ?
> And second, it'd be very nice if these lock keys could (perhaps optionally)
> be treated like regular keys. We've got the modifier information handy
> anyway, so there's no reason for them not to, is there ?
I don't have any strong opinion on this. Making SDL's locking optional
does sound sensible (e.g. for emulators, where the emulated OS already
does this), but I wouldn't remove it entirely. One other thing to keep
in mind is that on Mac OS, the num lock key doesn't work as "num lock"
but as "clear", for which locking makes no sense (it's also labeled
"clear" on Apple keyboards). What the purpose of the scroll lock key is
I don't even know.
More information about the SDL