commanderx16 / x16-emulator

Emulator for the Commander X16 8-bit computer
383 stars 60 forks source link

Num Lock, Caps Lock, Scroll Lock, and their LEDs #47

Open mobluse opened 5 years ago

mobluse commented 5 years ago

Caps Lock on has no effect in the unshifted och shifted character set even though the LED toggles as expected. I think Caps Lock should work as shift was being pressed on the letter keys, but not on the other keys. On international keyboards I think the international letter should be shifted when the Caps Lock LED is on. Caps Lock helps when e.g. writing code in some programming languages such as COMAL.

Num Lock on has the effect that the numeric keyboard keys doesn't type anything on my laptop type keyboard (i.e. the numeric keyboard is on top of 7-0, u-p, j-;, m-/). The LED is toggled by the Num Lock key. I think the numeric part should work as a numeric keyboard when the Num Lock LED is on. Numeric keyboard speeds up typing of numbers.

Scroll Lock key has no effect and doesn't toggle the Scroll Lock LED. I think it should work.

I also think the LEDs should be possible to set or reset using e.g. the POKE command in BASIC possibly followed by a SYS command. To control the LEDs works from the Linux Console and from an an X Terminal in Linux. It can be used to show e.g. running lights on the keyboard LEDs, see https://www.raspberrypi.org/forums/viewtopic.php?f=41&t=251417&p=1534467#p1534467 .

It would be rather easy to fix this on the real X16, but in the emulator through OS:es it might be more difficult, unless SDL2 supports it.

ReallyNiceGuy commented 3 years ago

When using the latin-1 charset, caps lock would be very helpful. Having to hold shift to type basic commands is not very user friendly.