Shortcuts
-
- Veteran
- Posts: 399
- Joined: Wed Mar 02, 2005 9:01 pm
- Location: Nashville, Tennessee
- Contact:
Shortcuts
Question here, question there...
Is there anyway to use the 'KEY ON' type commands in QBASIC so I don't have to keep typing in ASCII codes for everything? (Not in my program, while programming in QBasic.)
Is there anyway to use the 'KEY ON' type commands in QBASIC so I don't have to keep typing in ASCII codes for everything? (Not in my program, while programming in QBasic.)
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
I unfortunately don't believe there is...but perhaps a little popup TSR that does that might be interesting
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Re: Shortcuts
If you don't want to keep typing ASCII codes, you could set up some contstants as follows:PQBC wrote:.....Is there anyway to use the 'KEY ON' type commands in QBASIC so I don't have to keep typing in ASCII codes for everything? (Not in my program, while programming in QBasic.)
Code: Select all
CONST K.BACK = 8 'Backspace Key
CONST K.CR = 13 'Carriage Return (Enter)
CONST K.ESC = 27 'Escape
CONST K.QUOTE = 34 'Quote
CONST K.BLANK = 32 'Blank
CONST K.LOWZ = 122 'Lowercase z
CONST K.ZERO = 48 'Zero
CONST K.NINE = 57 'Nine
If you prefer variables, then:
Code: Select all
BACK = CHR$(8) 'Backspace Key
CR = CHR$(13) 'Carriage Return (Enter)
ESC = CHR$(27) 'Escape
-
- Veteran
- Posts: 399
- Joined: Wed Mar 02, 2005 9:01 pm
- Location: Nashville, Tennessee
- Contact:
What I mean is...
moneo: When you use the 'KEY ON' function inside a program (and have the keys set for different values), you can press F1 and the value set for F1 is returned. What I want is to be able to press F5 instead of ALT-122 (both examples)
MystikShadows: Yeah - too bad I'm not that great of a programmer...
moneo: When you use the 'KEY ON' function inside a program (and have the keys set for different values), you can press F1 and the value set for F1 is returned. What I want is to be able to press F5 instead of ALT-122 (both examples)
MystikShadows: Yeah - too bad I'm not that great of a programmer...
I read the manual about the KEY statement, like key n,stringexpresssion$PQBC wrote:What I mean is...
moneo: When you use the 'KEY ON' function inside a program (and have the keys set for different values), you can press F1 and the value set for F1 is returned. What I want is to be able to press F5 instead of ALT-122 (both examples)
It seem to do what you want, which from your description above, you already know. So, what else do you need to do that is beyond the scope of the KEY statement?
*****
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
from what I read of his post he'd like something like th ekey statement while he's using the QB ide not in his code
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
-
- Veteran
- Posts: 399
- Joined: Wed Mar 02, 2005 9:01 pm
- Location: Nashville, Tennessee
- Contact:
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact: