If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply


Post by ezespman@yahoo.com » Wed Oct 19, 2005 3:02 pm

how do you use the inkey$

Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Wed Oct 19, 2005 3:05 pm

Listen to your teacher.
I have left this dump.

Seb McClouth

Post by Seb McClouth » Wed Oct 19, 2005 3:33 pm

Z!re wrote:Listen to your teacher.
So the teacher said:"Inkey$ is used as... blahblahblah" that's where you probably lost attention... if so... do a search for it.... e.g.: how to use inkey$...

Posts: 128
Joined: Sun Aug 14, 2005 8:33 pm
Location: Forest Lake, MN

Post by Guest » Wed Oct 19, 2005 3:37 pm

Why don't you use Qbasic's online help?

Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo » Wed Oct 19, 2005 6:44 pm

This is what the QB Online Help says about INKEY$.

Code: Select all

The INKEY$ function returns a one- or two-byte string containing  
a character read from the standard input device. A null string is  
returned if no character is waiting there. A one-character string  
contains the actual character read from the keyboard, while a two-  
character string indicates an extended code, the first character  
of which is hexadecimal 00.  
See Keyboard Scan Codes Table and the  
ASCII Character Codes Table for a complete list of these codes.  
The standard input device is usually the keyboard. INKEY$ does  
not echo characters to the screen; instead, all characters are  
passed through to the program except for the following:  
  ■ CTRL+BREAK,    which halts program execution  
  ■ CTRL+ALT+DEL,  which does a system reboot  
  ■ CTRL+NUMLOCK,  which causes program execution to pause  
  ■ PRTSC,         which prints the screen
Writing a routine to get user keyed input using INKEY$ is very tedious. You would only want to use it if you needed the user to enter such things like F1 to F9 keys, UP, DOWN, LEFT, RIGHT arrow keys, HOME, END, PAGE-UP, PAGE-DOWN keys among others. You would need to consult the Keyboard Scan Codes Table to identify these extended codes.

User avatar
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA

Post by {Nathan} » Wed Oct 19, 2005 7:53 pm

Z!re wrote:Listen to your teacher.
yeah! go mentos man! err... whomen 8)

User avatar
Posts: 80
Joined: Sat Feb 19, 2005 8:29 am
Location: elsewhere

Post by matt2jones » Thu Oct 20, 2005 8:54 am

Code: Select all

Do not mistake Apathy for feeling Content.

http://www.disjointed.cjb.net - Short Storys
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic

Post Reply