Im using KeyRight, Left, Up, and Down right now. however, i have searched the internet and this site for the scan codes for other keys like esc etc but i cant get a straight answer.
right now i have this
KeyRight$ = chr$(77) + "P"
(this is quoted from memory, which means its wrong)
so how would i do esc?
KeyEsc$ = chr$(1) '?? that is what qbasic says ESC is... but it doesnt work
Keyboard Scan Codes
Keyboard Scan Codes
And you will come to find that we are all one mind, capable of all that's imagined and all conceivable - Maynard
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
to find a key, just type it while running this program.
then you cana just
Code: Select all
do
a$ = inkey
print src(a$)
loop
Code: Select all
run this and find you chr value. src is the revverse of char, btw.
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
^_^, um nathan? you need:
LOCATE 1, 1: PRINT a$
Other wise it will scroll,
Here, this tut has a list of all the keyboard input codes that you'll probaly ever need: Basic to Advance keyboard programming
LOCATE 1, 1: PRINT a$
Other wise it will scroll,
Here, this tut has a list of all the keyboard input codes that you'll probaly ever need: Basic to Advance keyboard programming
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
Better yet:
That is a better one then INKEY$
Not only do you have a set of numbers for every key on your keyboard (yes including Alt, Ctrl, Shift), But you have 2 sets for eaxh key. 1 set is when the key is pressed down, the other is after it has been released.
Code: Select all
DO
LOCATE 1, 1: PRINT INP(96)
LOOP
Not only do you have a set of numbers for every key on your keyboard (yes including Alt, Ctrl, Shift), But you have 2 sets for eaxh key. 1 set is when the key is pressed down, the other is after it has been released.
"But...It was so beutifully done"