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
Account closed

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....
 
2006-03-04 08:43
Laxity
Account closed

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
Account closed

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
Account closed

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: 469
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.
2006-03-04 14:28
Frantic

Registered: Mar 2003
Posts: 1661
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...
2006-03-04 18:01
Oswald

Registered: Apr 2002
Posts: 5127
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.
2006-03-05 07:47
Style

Registered: Jun 2004
Posts: 498
wow, you can detect the difference between shift and shift lock?

How? any details?

They should be equivalent!
2006-03-05 08:29
Laxity
Account closed

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
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
CA$H/TRiAD
DeepCore
A3/AFL
JackAsser/Booze Design
Knight Rider/TREX 🦖
theK/ATL
Scrap/Genesis Project
Guests online: 149
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Shine  (9.5)
4 Mermaid  (9.5)
5 Pal  (9.4)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.046 sec.