Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference

get-key


Type:   -   function (subr)
Source:   -   sys/unix/osstuff.c, sys/mac/macfun.c, sys/win/msvc/winfun.c

Syntax

(get-key)
returns - the decimal ASCII value of the key pressed

Description

The 'get-key' function gets a single key stroke from the keyboard [as opposed to an entire line, as read does].

Note: In Nyquist, this function is only defined to work on Unix systems [including Linux and Mac OS X]. On Windows systems, NIL is returned.

Examples

(setq mychar (get-key))   ; get a character

  Back to Top


Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference