Hi Sam users!
I encountered a weird caps lock behaviour, and I’d like you to test it too
and let me know whether you encounter the same problems or not. On my
computer all emulators I tested have got problem with caps lock – it simply
doesn’t work as expected. So I made changes to keyboard handling routine in
ASCD 0.98 to let it work. And now this new version is the only emulator
where caps lock works correctly on my computer, but Simon Owen wrote me that
on his computer it is different and ASCD 0.98 doesn’t work correctly like
other emulators.
Please can you test it? If you compare ASCD 0.98 with SimCoupe, you should
clearly see difference in caps lock behaviour in Sam Basic. You can also
test older ASCD 0.98 WIP which uses the old (i.e. standard) caps lock
routine and will probably be similar to SimCoupe.
Download here:
http://www.keprt.cz/progs/ascd/ascd098.zip
http://www.keprt.cz/progs/ascd/ascd098wip3.zip
-------------------------------------------
Technical information follows:
Normally each key sends KEYDOWN when you press it, then it waits 250 ms
(this can be set in Windows) and then sends another KEYDOWN's as long as you
hold down the key. The speed of autorepeat can be set in Windows as well,
normally it sends 30 KEYDOWN's per second on my computer (which is the
highest speed possible on a standard PC keyboard). Finally it always sends a
single KEYUP when you release the key.
Caps lock sends initial KEYDOWN normally, then waits 250 ms (i.e. still
everything normal), but when you hold down the key longer, it starts to send
weirdly KEYUP - KEYDOWN - KEYUP - KEYDOWN... etc. at 30 events per second
(i.e. 15x KEYUP and 15x KEYDOWN). When you release the key, the final event
sent is based on the state of the green caps lock led on the keyboard. So
you
can never know if the final event will be KEYDOWN or KEYUP.
I use Windows 7 with plain standard PS2 keyboard driver, at least I think. I
will definitely go and test it on other computers (I have a few old ones at
home).
-----------------------------------------
Mgr. Aleš Keprt, Ph.D.
private: [email protected], www.keprt.cz
office: Moravian College / Moravská vysoká škola Olomouc, [email protected]