Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Detecting ctrl and shift pressed simultaniously
2006-03-04 08:03
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.
2006-03-04 08:05
Wanderer
Account closed

Registered: Apr 2003
Posts: 478
Location 653 = 3, works on my 64 :)
2006-03-04 08:33
Laxity

Registered: Aug 2005
Posts: 459
What's that?
2006-03-04 08:38
Wanderer
Account closed

Registered: Apr 2003
Posts: 478
Quote: What's that?

Ooops... I thought you meant C= and Shift.
2006-03-04 08:42
Laxity

Registered: Aug 2005
Posts: 459
Took me a few moments to figure out that location 653 was actually in the memory map :) .. Thanks a bunch..

The thing is, I'm not using the kernal to handle key input so I was completely unaware of this one.. It's been a while you know :)

Cheers again.
2006-03-04 08:43
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.. ;)
2006-03-04 08:44
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)
2006-03-04 08:46
Laxity

Registered: Aug 2005
Posts: 459
I'm not using the kernal.. Wrote my own input library to waste my time on something instead.. :)
2006-03-04 10:45
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.
2006-03-04 10:59
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.
2006-03-04 11:18
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.
 
... 24 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mike
Alakran_64
TPM/Silicon Ltd
BYB/Hokuto Force
slimeysmine
Martin Piper
zscs
DnP
Mibri/ATL^MSL^PRX
Twilight/Excess/Arcade
Guests online: 182
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.