| |
Laxity
Registered: Aug 2005 Posts: 459 |
Detecting ctrl and shift pressed simultaniously
OK.. here goes.
I need to find out if it's possible to detect simultanious key presses of both Ctrl and shift (both left and or right). The code I've written for detecting this works nicely in Vice, but the question is if the key matrix of the real c64 hardware allows this?
Unfortunately my 64 is broken, so I'm unable to investigate this myself. |
|
... 24 posts hidden. Click here to view all posts.... |
| |
Laxity
Registered: Aug 2005 Posts: 459 |
Oh. Well, control should be registered on there too, if I'm not mistaken (bit 2).. .. So, if you're able to get 5 in location 653, I'm home safe.. ;) |
| |
Style
Registered: Jun 2004 Posts: 498 |
Laxity: Yes, it should work I believe.
The c64 keyboard matrix allows you to detect most keys independently of each other, except for restore and shift lock.
(Edit: Dont use kernel junk - its a waste of time) |
| |
Laxity
Registered: Aug 2005 Posts: 459 |
I'm not using the kernal.. Wrote my own input library to waste my time on something instead.. :) |
| |
Soren
Registered: Dec 2001 Posts: 547 |
As far as I know you can check CTRL, shiftR, shiftL by using $dc00 and $dc01...
Well any keycombination should be possible this way, apart from RESTORE.
|
| |
Style
Registered: Jun 2004 Posts: 498 |
Quote: As far as I know you can check CTRL, shiftR, shiftL by using $dc00 and $dc01...
Well any keycombination should be possible this way, apart from RESTORE.
and shiftlock, which is a mechanical switch on the left shift?
Edit: Oh, and Laxity, dont forget to account for keybounce. |
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
Quote: and shiftlock, which is a mechanical switch on the left shift?
Edit: Oh, and Laxity, dont forget to account for keybounce.
I do believe Marko or someone had a bit of code that could detect shift-lock, left shift or right shift was used on some (all?) models.
http://sta.c64.org/cbm64kbdlay.html is helpful but won't let you detect if shift-lock or the shift key also mapped the same is pressed. |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
shift lock can be detected and distinguished from the other shift keys (even though it "shouldn't" be possible).. Marko Mäkeäkkölälälä wrote some strange routine to take care of that.
I tried it and it worked.
Not that this was the topic really, but anyway... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
its called kernal.
secondly IMHO kernal has neat routines to read the keyboard, why should one waste time and memory for that ? Altho in this case kernal probably wouldnt do. |
| |
Style
Registered: Jun 2004 Posts: 498 |
wow, you can detect the difference between shift and shift lock?
How? any details?
They should be equivalent! |
| |
Laxity
Registered: Aug 2005 Posts: 459 |
Quote: As far as I know you can check CTRL, shiftR, shiftL by using $dc00 and $dc01...
Well any keycombination should be possible this way, apart from RESTORE.
I'm doing just that. I wanted to know if the physical key matrix would allow detection of shift and ctrl at the same time :) |
Previous - 1 | 2 | 3 | 4 - Next |