Key 'Caps Lock': behaviour

Hello,

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.
In fact, the event depends on the Caps Lock LED.

I would like to know whether there is a way to change this (an option).
Under X11, the Caps Lock acts as any other key.

Thanks.

Romain Li?vin aka 'roms’
http://lpg.ticalc.org/prj_tilp
mail: @Romain_Lievin
"Linux, y’a moins bien mais c’est plus cher !"

I would like to know whether there is a way to change this (an option).
Under X11, the Caps Lock acts as any other key.

Does it? I was under the impression that that strange key behaviour was in
the Xserver or the kernel’s keyboard driver, and SDL can’t do much about
it.

–ryan.

Hello,

I have written an X11 and an SDL version of my TI emulator. I can say to you
that the Caps Lock key works as any other key in the X11 version but not in the
SDL one.
In fact, I have a problem with the SDL version.
Any ideas ?

Romain.

Quoting “Ryan C. Gordon” :

I would like to know whether there is a way to change this (an
option).
Under X11, the Caps Lock acts as any other key.

Does it? I was under the impression that that strange key behaviour was
in
the Xserver or the kernel’s keyboard driver, and SDL can’t do much
about
it.

–ryan.

Romain Li?vin aka 'roms’
http://lpg.ticalc.org/prj_tilp
mail: @Romain_Lievin
"Linux, y’a moins bien mais c’est plus cher !"

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

Hello,

So, it seems to depend on the server.
I will try also to remap my keyboard. But, I do not think that it is possible
for the Win32 version of the emulator…

Remap the keyboard could be a solution but I do not think it is possible on
Win32 platforms. In fact, I had thought that SDL could configure the Caps
behaviour by a function or an argument so that it can work on all platforms.
GtkTiEmu works for Linux but also for Windows.

Thank you very much for the reply…
Romain.

Quoting Mattias Engdeg?rd :

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

Romain Li?vin aka 'roms’
http://lpg.ticalc.org/prj_tilp
mail: @Romain_Lievin
"Linux, y’a moins bien mais c’est plus cher !"