Next: Event Predicates, Previous: Event Types, Up: Events [Contents][Index]
Every event, no matter what type it is, contains a timestamp (which is typically an offset in milliseconds from when the X server was started) indicating when the event occurred. In addition, many events contain a channel, which specifies which frame the event occurred on, and/or a value indicating which modifier keys (shift, control, etc.) were held down at the time of the event.
The contents of each event are as follows:
Which key was pressed. This is an integer (in the printing ASCII
range: >32 and <127) or a symbol such as left
or right
.
Note: Many physical keys are actually treated as two separate keys, depending on whether the shift key is pressed; for example, the “a” key is treated as either “a” or “A” depending on the state of the shift key, and the “1” key is similarly treated as either “1” or “!” on most keyboards.
In such cases, the shift key does not show up in the modifier list. For
other keys, such as backspace
, the shift key shows up as a
regular modifier.
Which modifier keys were pressed. As mentioned above, the shift key is not treated as a modifier for many keys and will not show up in this list in such cases.
What button went down or up. Buttons are numbered starting at 1.
Which modifier keys were pressed. The special business mentioned above for the shift key does not apply to mouse events.
The position of the pointer (in pixels) at the time of the event.
The position of the pointer (in pixels) after it moved.
Which modifier keys were pressed. The special business mentioned above for the shift key does not apply to mouse events.
The elisp function to call for this event. This is normally either
eval
or call-interactively
.
The object to pass to the function. This is normally the callback that was specified in the menu description.
What button went down or up. Buttons are numbered starting at 1.
Which modifier keys were pressed. The special business mentioned above for the shift key does not apply to mouse events.
The position of the pointer (in pixels) at the time of the event.
The Emacs “process” object in question.
The elisp function to call for this timeout. It is called with one argument, the event.
Some Lisp object associated with this timeout, to make it easier to tell them apart. The function and object for this event were specified when the timeout was set.
The rest of the information in this event is not user-accessible.
An elisp function to call when this event is dispatched.
The object to pass to the function. The function and object are set when the event is created.
Return the type of event.
This will be a symbol; one of
key-press
A key was pressed.
button-press
A mouse button was pressed.
button-release
A mouse button was released.
motion
The mouse moved.
misc-user
Some other user action happened; typically, this is a menu selection, scrollbar action, or drag and drop action.
process
Input is available from a subprocess.
timeout
A timeout has expired.
eval
This causes a specified action to occur when dispatched.
magic
Some window-system-specific event has occurred.
Next: Event Predicates, Previous: Event Types, Up: Events [Contents][Index]