Scancode Array by Overdroid25th Feb 2004 17:35
|
---|
Summary Creates a string array that matches the scancode codes. Description I thought this might be usefull to some out there so they wouldn't have to re-code it. I use it in the options section of my menu screens so players can reformat their keyboard input values. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com Rem Project: scancodes Rem Created: 2/25/04 2:26:10 PM REM By Joseph Limbaugh REM overdroid on the DB forums REM overdroid.com REM ENJOY! Rem ***** Main Source File ***** dim key$(230) for x= 1 to 83 read key$(x) next x key$(156)="Keypad: Enter" for x= 200 to 211 read key$(x) next x for x= 219 to 221 read key$(x) next x repeat if scancode()=0 then cls ink rgb(255,255,255),0 set cursor 10,10 print key$(scancode()) sync until escapekey()=1 data "Escape","1","2","3","4","5","6","7","8","9","0","-","+","Backspace","Tab","Q","W","E","R","T","Y","U","I","O","P" data "[","]","Enter","Left Control","A","S","D","F","G","H","J","K","L",";","'","`" data "Left Shift","\","Z","X","C","V","B","N","M",",",".","/","Right Shift","Keypad: *" data "Left Alt","SPACE","Caps Lock","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12" data "Keypad: 7","Keypad: 8","Keypad: 9","Keypad: -","Keypad: 4","Keypad: 5","Keypad: 6" data "Keypad: +","Keypad: 1","Keypad: 2","Keypad: 3","Keypad: 0","Keypad: ." REM KEYPAD ENTER is 156 - not listed above REM These are from 200 on data "Arrow UP","Page UP","SC202","Arrow LEFT","SC204","Arrow RIGHT","SC206","End","Arrow DOWN" data "Page Down","Insert","Delete" REM These are from 219 on data "Left Window","Right Window","Menu" |