[SDL] Key 'Caps Lock': behaviour

Mattias Engdegård f91-men at nada.kth.se
Mon Jun 18 05:48:04 PDT 2001


>it seems that the Caps Lock key does not have the same behaviour as other keys.
>If you press it and next release it, you get only the KEYDOWN event.
>It is necessary to press/release it again for having the KEYUP event.
>So, you need to press it 2 times instead of one.

Yes, this is a problem. In fact it's not universally soluble, since some
X servers (i.e. the XSun server I'm using right now) show the same behaviour:

Press caps lock   => KeyPress event
Release caps lock => no event
Press caps lock   => KeyRelease event
Release caps lock => no event

In other words, it doesn't seem possible to use the caps lock key as a normal
key at all with this server, unless I remap the keyboard (which I have done
of course)

Another problem are physically locking caps lock keys, like those on
pre-USB Mac keyboards. There is no general solution but I think we should
try to make caps lock behave as an ordinary key where possible. I'll see
if I can come up with something





More information about the SDL mailing list