Function Entry: GRREAD

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: GRREAD

Name

grread

Class

Host Function

Syntax

(grread [track] [allkeys [curtype]])

Arguments and Values

  • track: optional tracking flag
  • allkeys: optional key/gesture mode
  • curtype: optional cursor-type control

Autodesk documents allkeys as a bit-coded integer.

Description

Reads low-level graphical or keyboard input events.

Return Values

List describing the input event.

Autodesk documents that the first list element is an event type code, with the second element depending on that type.

The event is a proper two-element list (code value) — NOT a dotted pair (code . value). For a keyboard event (code 2) the value is the character code, so the list is e.g. (2 102); the value is (cadr result), and (cdr result) is the one-element list (102), not the bare integer. (Observed on live BricsCAD V26, 2026-09-08; this is the classic AutoLISP shape, easy to misread as a dotted pair.)

clautolisp

clautolisp has no drawing editor, so it implements only the KEYBOARD case (code 2): grread reads one character from the active host's input stream and returns the proper list (2 CHAR-CODE). Mouse, point, tablet and other graphical event codes are not produced; and a host with no interactive input (batch mode, or a backend that does not support grread) returns nil rather than signalling. track=/=allkeys=/=curtype are accepted for call-compatibility but are inert in a terminal (no cursor, no drag tracking). A live CAD host restores the native graphical behaviour.

Side Effects

  • enters low-level input mode
  • consumes input events

Compatibility

One of the most host- and UI-specific user-input functions.

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • BricsCAD V26: presumed compatible (no contradicting page found).
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.

Notes

  • Autodesk documents allkeys bit values including drag-mode coordinates, all-key reporting, and cursor control.
  • Autodesk explicitly warns that applications using grread are unlikely to be upward compatible across hardware and platform configurations.
  • Current Autodesk reference marks grread as supported on Windows and macOS, not Web.