bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
INKEY$ Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Returns a character read from the keyboard or other standard input device.
 
INKEY$
 
Usage Notes
    ■ The character returned by the INKEY$ function is never displayed
      on the screen; instead, all characters are passed through to the
      program except for these key combinations:
 
      Character       Running under QBX          Stand-alone .EXE File
      ════════════    ═════════════════════════  ═══════════════════════════
      Ctrl+Break      Halts program execution.   Halts program execution
                                                 if compiled with the /D
                                                 option; otherwise, passed
                                                 through to program.
      Ctrl+NumLock    Pauses program execution   Same as running under QBX
                      until a key is pressed;    if compiled with /D option;
                      then the next key pressed  otherwise, ignored (the
                      is passed through to the   program does not pause and
                      program.                   no keystroke is passed).
      Shift+PrtSc     Prints the screen          Prints the screen contents.
                      contents.
      Ctrl+Alt+Del    Reboots the system.        Reboots the system.
 
    ■ If you have assigned a string to a function key using the KEY
      statement and you press that function key when INKEY$ is waiting
      for a keystroke, INKEY$ will pass the string to the program. Enabled
      keystroke trapping takes precedence over the INKEY$ function.
    ■ When you use INKEY$ with ISAM programs, BASIC performs implicit
      CHECKPOINT operations to minimize data loss in the event of a power
      failure. The CHECKPOINT is performed if INKEY$ fails to successfully
      retrieve a character after 65,535 calls, and 20 seconds has expired.
      A CHECKPOINT writes open database buffers to disk.