F1 - F5 key calls... 
Author Message
 F1 - F5 key calls...

Hi there;

Just a quick question for y'all: How do I reference the function keys as
a valid input key (in BASIC). For example, I have the program set up to
accept certain keys as a valid input (if inkey = 'm' or if inkey = 'M'
then var1(x) = 'M'). I'd like to use the function keys if I could...
what's the correct syntax for this?


Thanks in advance....



Tue, 15 May 2001 03:00:00 GMT  
 F1 - F5 key calls...
Use INKEY$ and then if INKEY$ =

CHR$(0) + ";"   THEN it's the F1 key has been pressed
CHR$(0) + "<   THEN it's the F2 key has been pressed
CHR$(0) + "=  THEN it's the F3 key has been pressed
CHR$(0) + ">   THEN it's the F4 key has been pressed
CHR$(0) + "?   THEN it's the F5 key has been pressed

- Thomas Daugaard

cindy and chris skrev i meddelelsen

Quote:
>Hi there;

>Just a quick question for y'all: How do I reference the function keys as
>a valid input key (in BASIC). For example, I have the program set up to
>accept certain keys as a valid input (if inkey = 'm' or if inkey = 'M'
>then var1(x) = 'M'). I'd like to use the function keys if I could...
>what's the correct syntax for this?


>Thanks in advance....



Tue, 15 May 2001 03:00:00 GMT  
 F1 - F5 key calls...


   >Just a quick question for y'all: How do I reference the function
   >keys as a valid input key (in BASIC). For example, I have the
   >program set up to accept certain keys as a valid input (if inkey =
   >'m' or if inkey = 'M' then var1(x) = 'M'). I'd like to use the
   >function keys if I could... what's the correct syntax for this?

   >Thanks in advance....

You don't say what version of Basic you have, but if it's Qbasic, the
help files include a chart of the key scan codes.  When you press an
F-key or an arrow or certain other keys, inkey$ is a 2-character string
where the first character is chr$(0).  F1=chr$(0)+chr$(59),
F2=chr$(0)+chr$(60), and so on.

Net-Tamer V 1.08X - Test Drive



Tue, 15 May 2001 03:00:00 GMT  
 F1 - F5 key calls...
On Fri, 27 Nov 1998 05:26:18 -0800, cindy and chris

Quote:

>Hi there;

>Just a quick question for y'all: How do I reference the function keys as
>a valid input key (in BASIC). For example, I have the program set up to
>accept certain keys as a valid input (if inkey = 'm' or if inkey = 'M'
>then var1(x) = 'M'). I'd like to use the function keys if I could...
>what's the correct syntax for this?

When you're messing with ALL the key combinations is is easier and faster to
start using the returned values as INTEGERs. I've outlined this whole process
and have all the constants for the 'extra' keys and their <shift>, <alt>, and
<ctrl> values on my web site. You'll want to d/load the fGetKey stuff.

C'ya,

   ____    _    ____      ____  _____
  |  _ \  / \  / ___) __ | ___)(_   _) Don Schullian

  |____//_/ \_\(____/\__/|_|     |_|    www.DASoftVSS.com
  ___________________________________   www.basicguru.com
      Vertical Software Solutions



Wed, 16 May 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VBDOS: Function key F5 = t !!!!!!

2. F5 Function key ?

3. trapping F5 key and cancelling

4. Ignore Backspace, F5, F10, etc keys

5. Refresh (F5) Key

6. User Control not capturing f5 key

7. F5 Key.

8. Need to disable F1 key.

9. Showing custom Help by pressing the F1 key

10. Can't get the HelpProvider to work with the F1 key

11. Capture F1 key input

12. How do you trap for F1 key

 

 
Powered by phpBB® Forum Software