Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / scancodes listing

Author
Message
alanuk
22
Years of Service
User Offline
Joined: 25th Mar 2003
Location: United Kingdom
Posted: 19th May 2003 19:10
Hope this is of use to someone.
regards Alan

SCANCODES
~~~~~~~~~
1 = 2 F1 = 59 ENTER = 28
2 = 3 F2 = 60 BS = 14 NUMERIC PAD
3 = 4 F3 = 61 L SHIFT = 42 ***********
4 = 5 F4 = 62 R SHIFT = 54 1 = 79
5 = 6 F5 = 63 ALT = 56 2 = 80
6 = 7 F6 = 64 L CTRL = 29 3 = 81
7 = 8 F7 = 65 R CTRL = 157 4 = 75
8 = 9 F8 = 66 ` = 41 5 = 76
9 = 10 F9 = 67 ESC = 1 6 = 77
0 = 11 F10 = 68 INSERT = 210 7 = 71
F11 = 69 DELETE = 211 8 = 72
F12 = 70 HOME = 199 9 = 73
END = 207 0 = 82
a = 30 n = 49 PG UP = 201 / = 181
b = 48 o = 24 PG DOWN = 209 * = 55
c = 46 p = 25 UP ARROW = 200 - = 74
d = 32 q = 16 DOWN ARROW = 208 + = 78
e = 18 r = 19 LEFT ARROW = 203 ENTER = 156
f = 33 s = 31 RIGHT ARROW = 205 DEL = 83
g = 34 t = 20 PRINT SCRN = 183 ALT GR = 184
h = 35 u = 22 SCROLL LOCK = 70 TAB = 15
i = 23 v = 47 NUM LOCK = 69 SPACE = 57
j = 36 w = 17 - = 12 ; = 39 . = 52
k = 37 x = 45 = = 13 ' = 40 / = 53
l = 38 y = 21 [ = 26 # = 43 \ = 86
m = 50 z = 44 ] = 27 , = 51
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 19th May 2003 19:51
with this little program you can find any scancode you want by pressing a key

alanuk
22
Years of Service
User Offline
Joined: 25th Mar 2003
Location: United Kingdom
Posted: 19th May 2003 21:04 Edited at: 19th May 2003 21:08
Well that didn't come out quite the way I intended. So let's try the quote thingy. Well it's not perfect but copy and paste and then clean it up a little.

Alan

Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 19th May 2003 21:43
But remember scancodes are country specific. The letter Q on a French keyboard is different to an English one, etc etc etc.

alanuk - I assume that list is a UK keyboard?

Cheers,

rich

"Gentlemen, we are about to short-circuit the Universe!"
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 19th May 2003 21:49
so you if you want that an A is pressed you'd better check
if upper$(inkey$())="A"

but when you want to control the player by using asdw (or qsdz in azerty) you'd better use scancodes (kepress)
Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 19th May 2003 22:15
That's one way to do it. Better to use keystate and force them to define the keys before play (because the above technique won't detect multiple key presses, keystate will). In DBPro the entry buffer is the correct way to get input.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
alanuk
22
Years of Service
User Offline
Joined: 25th Mar 2003
Location: United Kingdom
Posted: 20th May 2003 18:11
Yes Rich, it is for a UK keyboard, I forgot to mention that.

I just ran a simple proggy and pressed every key in sight!!

Now I have a printout which is very useful.

Alan
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 20th May 2003 18:13
isn't there a certain system in it?
for example, on a TI-81 calculator, scancodes are built up by two figures: the row and the colum number

Login to post a reply

Server time is: 2025-05-18 14:41:35
Your offset time is: 2025-05-18 14:41:35