An input event is a Lisp object representing an action initiated by the user, i.e. a key press, pressing a mouse button and similar things.
Note that input events are often referred to as key presses, this isn't really accurate but since most input events are key presses the term sort of stuck. Anyway, wherever the phrase `key press' occurs in this manual it could be replaced by `input event'.
Each input event is represented by a cons cell (see section Cons Cells) containing two integers, these integers encode the actual input event. The encoding is opaque; the only way to access an event meaningfully is via the functions provided.
t if its argument is an input event.
Each event has a textual name, for the actual format of these names see section Key Names.
Functions are available to convert between the name of an event and the actual event itself, and vice versa.
(lookup-event "Ctrl-x")
=> (120 . 9)
(lookup-event "Ctrl-Meta-LMB-Click1")
=> (1 . 58)
(event-name (lookup-event "Ctrl-x"))
=> "Ctrl-x"
Go to the first, previous, next, last section, table of contents.