is the nearest character equivalent to it (or `nil' if there is no
character equivalent). `last-command-char' is the character that
`self-insert-command' will insert in the buffer. Remember that
is the nearest character equivalent to it (or `nil' if there is no
character equivalent). `last-command-char' is the character that
`self-insert-command' will insert in the buffer. Remember that
XEmacs characters: many keyboard events have no corresponding
character, and when the Mule feature is available, most characters
can not be input on standard keyboards, except possibly with help
XEmacs characters: many keyboard events have no corresponding
character, and when the Mule feature is available, most characters
can not be input on standard keyboards, except possibly with help
This function returns the "channel" or frame that the given mouse
motion, button press, button release, or misc-user event occurred
in. This will be `nil' for non-mouse events.
This function returns the "channel" or frame that the given mouse
motion, button press, button release, or misc-user event occurred
in. This will be `nil' for non-mouse events.
This function returns the X position in pixels of the given mouse
event. The value returned is relative to the frame the event
occurred in. This will signal an error if the event is not a
mouse event.
This function returns the X position in pixels of the given mouse
event. The value returned is relative to the frame the event
occurred in. This will signal an error if the event is not a
mouse event.
This function returns the Y position in pixels of the given mouse
event. The value returned is relative to the frame the event
occurred in. This will signal an error if the event is not a
This function returns the Y position in pixels of the given mouse
event. The value returned is relative to the frame the event
occurred in. This will signal an error if the event is not a
Given a mouse motion, button press, button release, or misc-user
event, compute and return the window on which that event occurred.
This may be `nil' if the event occurred in the border or over a
toolbar. The modeline is considered to be within the window it
describes.
Given a mouse motion, button press, button release, or misc-user
event, compute and return the window on which that event occurred.
This may be `nil' if the event occurred in the border or over a
toolbar. The modeline is considered to be within the window it
describes.
Given a mouse motion, button press, button release, or misc-user
event, compute and return the buffer of the window on which that
event occurred. This may be `nil' if the event occurred in the
Given a mouse motion, button press, button release, or misc-user
event, compute and return the buffer of the window on which that
event occurred. This may be `nil' if the event occurred in the
This function returns the X position in pixels of the given mouse
event. The value returned is relative to the window the event
occurred in. This will signal an error if the event is not a
mouse-motion, button-press, button-release, or misc-user event.
This function returns the X position in pixels of the given mouse
event. The value returned is relative to the window the event
occurred in. This will signal an error if the event is not a
mouse-motion, button-press, button-release, or misc-user event.
This function returns the Y position in pixels of the given mouse
event. The value returned is relative to the window the event
occurred in. This will signal an error if the event is not a
This function returns the Y position in pixels of the given mouse
event. The value returned is relative to the window the event
occurred in. This will signal an error if the event is not a
The following functions return information about the text (including
the modeline) that a mouse event occurred over or near.
The following functions return information about the text (including
the modeline) that a mouse event occurred over or near.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over the text
area of a window. Otherwise, `nil' is returned. The modeline is
not considered to be part of the text area.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over the text
area of a window. Otherwise, `nil' is returned. The modeline is
not considered to be part of the text area.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over the modeline
of a window. Otherwise, `nil' is returned.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over the modeline
of a window. Otherwise, `nil' is returned.
This function returns the X position of the given mouse-motion,
button-press, button-release, or misc-user event in characters.
This is relative to the window the event occurred over.
This function returns the X position of the given mouse-motion,
button-press, button-release, or misc-user event in characters.
This is relative to the window the event occurred over.
This function returns the Y position of the given mouse-motion,
button-press, button-release, or misc-user event in characters.
This is relative to the window the event occurred over.
This function returns the Y position of the given mouse-motion,
button-press, button-release, or misc-user event in characters.
This is relative to the window the event occurred over.
This function returns the character position of the given
mouse-motion, button-press, button-release, or misc-user event.
If the event did not occur over a window, or did not occur over
text, then this returns `nil'. Otherwise, it returns an index
into the buffer visible in the event's window.
This function returns the character position of the given
mouse-motion, button-press, button-release, or misc-user event.
If the event did not occur over a window, or did not occur over
text, then this returns `nil'. Otherwise, it returns an index
into the buffer visible in the event's window.
This function returns the character position of the given
mouse-motion, button-press, button-release, or misc-user event.
If the event did not occur over a window or over text, it returns
This function returns the character position of the given
mouse-motion, button-press, button-release, or misc-user event.
If the event did not occur over a window or over text, it returns
The following functions return information about the glyph (if any)
that a mouse event occurred over.
The following functions return information about the glyph (if any)
that a mouse event occurred over.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over a glyph.
Otherwise, `nil' is returned.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over a glyph.
Otherwise, `nil' is returned.
If the given mouse-motion, button-press, button-release, or
misc-user event happened on top of a glyph, this returns its
extent; else `nil' is returned.
If the given mouse-motion, button-press, button-release, or
misc-user event happened on top of a glyph, this returns its
extent; else `nil' is returned.
Given a mouse-motion, button-press, button-release, or misc-user
event over a glyph, this function returns the X position of the
pointer relative to the upper left of the glyph. If the event is
not over a glyph, it returns `nil'.
Given a mouse-motion, button-press, button-release, or misc-user
event over a glyph, this function returns the X position of the
pointer relative to the upper left of the glyph. If the event is
not over a glyph, it returns `nil'.
Given a mouse-motion, button-press, button-release, or misc-user
event over a glyph, this function returns the Y position of the
pointer relative to the upper left of the glyph. If the event is
Given a mouse-motion, button-press, button-release, or misc-user
event over a glyph, this function returns the Y position of the
pointer relative to the upper left of the glyph. If the event is
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over a toolbar.
Otherwise, `nil' is returned.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over a toolbar.
Otherwise, `nil' is returned.
If the given mouse-motion, button-press, button-release, or
misc-user event happened on top of a toolbar button, this function
returns the button. Otherwise, `nil' is returned.
If the given mouse-motion, button-press, button-release, or
misc-user event happened on top of a toolbar button, this function
returns the button. Otherwise, `nil' is returned.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over an internal
toolbar. Otherwise, `nil' is returned.
Given a mouse-motion, button-press, button-release, or misc-user
event, this function returns `t' if the event is over an internal
toolbar. Otherwise, `nil' is returned.
The following functions allow access to the contents of events other
than the position info described in the previous section.
The following functions allow access to the contents of events other
than the position info described in the previous section.
This function returns the Keysym of the given key-press event.
This will be the ASCII code of a printing character, or a symbol.
This function returns the Keysym of the given key-press event.
This will be the ASCII code of a printing character, or a symbol.
This function returns a list of symbols, the names of the modifier
keys which were down when the given mouse or keyboard event was
produced.
This function returns a list of symbols, the names of the modifier
keys which were down when the given mouse or keyboard event was
produced.
This function returns a number representing the modifier keys
which were down when the given mouse or keyboard event was
produced.
This function returns a number representing the modifier keys
which were down when the given mouse or keyboard event was
produced.
This function returns the callback function of the given timeout,
misc-user, or eval event.
This function returns the callback function of the given timeout,
misc-user, or eval event.
This function returns the callback function argument of the given
timeout, misc-user, or eval event.
This function returns the callback function argument of the given
timeout, misc-user, or eval event.
This function creates a new event structure. If no arguments are
specified, the created event will be empty. To specify the event
type, use the TYPE argument. The allowed types are `empty',
This function creates a new event structure. If no arguments are
specified, the created event will be empty. To specify the event
type, use the TYPE argument. The allowed types are `empty',
reused one; see the function `deallocate-event'.
The events created by `make-event' can be used as non-interactive
reused one; see the function `deallocate-event'.
The events created by `make-event' can be used as non-interactive
;; Creating a key-press event, try 2
(make-event 'key-press '(key home))
=> #<keypress-event home>
;; Creating a key-press event, try 2
(make-event 'key-press '(key home))
=> #<keypress-event home>
;; Create a key-press event of dubious fame.
(make-event 'key-press '(key escape modifiers (meta alt control shift)))
=> #<keypress-event control-meta-alt-shift-escape>
;; Create a key-press event of dubious fame.
(make-event 'key-press '(key escape modifiers (meta alt control shift)))
=> #<keypress-event control-meta-alt-shift-escape>
;; Create a M-button1 event at coordinates defined by variables
;; X and Y.
(make-event 'button-press `(button 1 modifiers (meta) x ,x y ,y))
=> #<buttondown-event meta-button1>
;; Create a M-button1 event at coordinates defined by variables
;; X and Y.
(make-event 'button-press `(button 1 modifiers (meta) x ,x y ,y))
=> #<buttondown-event meta-button1>
;; Create a similar button-release event.
(make-event 'button-release `(button 1 modifiers (meta) x ,x y ,x))
=> #<buttonup-event meta-button1up>
;; Create a similar button-release event.
(make-event 'button-release `(button 1 modifiers (meta) x ,x y ,x))
=> #<buttonup-event meta-button1up>
;; Create a mouse-motion event.
(make-event 'motion '(x 20 y 30))
=> #<motion-event 20, 30>
;; Create a mouse-motion event.
(make-event 'motion '(x 20 y 30))
=> #<motion-event 20, 30>
This function makes a copy of the given event object. If a second
argument is given, the first event is copied into the second and
the second is returned. If the second argument is not supplied
(or is `nil') then a new event will be made.
This function makes a copy of the given event object. If a second
argument is given, the first event is copied into the second and
the second is returned. If the second argument is not supplied
(or is `nil') then a new event will be made.
This function allows the given event structure to be reused. You
*MUST NOT* use this event object after calling this function with
it. You will lose. It is not necessary to call this function, as
This function allows the given event structure to be reused. You
*MUST NOT* use this event object after calling this function with
it. You will lose. It is not necessary to call this function, as
events and other ways of representing keys. These are useful when
working with ASCII strings and with keymaps.
events and other ways of representing keys. These are useful when
working with ASCII strings and with keymaps.
This function converts a numeric ASCII value to an event structure,
replete with modifier bits. CH is the character to convert, and
EVENT is the event object to fill in. This function contains
This function converts a numeric ASCII value to an event structure,
replete with modifier bits. CH is the character to convert, and
EVENT is the event object to fill in. This function contains
strictly inverse functions, since events contain much more
information than the ASCII character set can encode.
strictly inverse functions, since events contain much more
information than the ASCII character set can encode.
This function returns the closest ASCII approximation to EVENT.
If the event isn't a keypress, this returns `nil'.
This function returns the closest ASCII approximation to EVENT.
If the event isn't a keypress, this returns `nil'.
Given a vector of event objects, this function returns a vector of
key descriptors, or a string (if they all fit in the ASCII range).
Optional arg NO-MICE means that button events are not allowed.
Given a vector of event objects, this function returns a vector of
key descriptors, or a string (if they all fit in the ASCII range).
Optional arg NO-MICE means that button events are not allowed.
This function reads a sequence of keystrokes or mouse clicks and
returns it as a vector of events. It keeps reading events until
it has accumulated a full key sequence; that is, enough to specify
This function reads a sequence of keystrokes or mouse clicks and
returns it as a vector of events. It keeps reading events until
it has accumulated a full key sequence; that is, enough to specify
This function reads and returns the next available event from the
window system or terminal driver, waiting if necessary until an
event is available. Pass this object to `dispatch-event' to
This function reads and returns the next available event from the
window system or terminal driver, waiting if necessary until an
event is available. Pass this object to `dispatch-event' to
This function returns the next available "user" event from the
window system or terminal driver. Pass this object to
`dispatch-event' to handle it. If an event object is supplied, it
This function returns the next available "user" event from the
window system or terminal driver. Pass this object to
`dispatch-event' to handle it. If an event object is supplied, it
compatibility with Emacs 18, and is most likely the wrong thing
for you to be using: consider using `next-command-event' instead.
compatibility with Emacs 18, and is most likely the wrong thing
for you to be using: consider using `next-command-event' instead.
This function adds an eval event to the back of the queue. The
eval event will be the next event read after all pending events.
This function adds an eval event to the back of the queue. The
eval event will be the next event read after all pending events.
Given an event object returned by `next-event', this function
executes it. This is the basic function that makes XEmacs respond
to user input; it also deals with notifications from the window
Given an event object returned by `next-event', this function
executes it. This is the basic function that makes XEmacs respond
to user input; it also deals with notifications from the window
character conveniently, either literally or as an octal character code.
The command `quoted-insert' uses this function.
character conveniently, either literally or as an octal character code.
The command `quoted-insert' uses this function.
This function is like `read-char', except that if the first
character read is an octal digit (0-7), it reads up to two more
octal digits (but stopping if a non-octal digit is found) and
This function is like `read-char', except that if the first
character read is an octal digit (0-7), it reads up to two more
octal digits (but stopping if a non-octal digit is found) and
- Variable: last-input-char
If the value of `last-input-event' is a keyboard event, then this
is the nearest ASCII equivalent to it. Remember that there is
- Variable: last-input-char
If the value of `last-input-event' is a keyboard event, then this
is the nearest ASCII equivalent to it. Remember that there is
the set of keyboard events is much larger, so writing code that
examines this variable to determine what key has been typed is bad
practice, unless you are certain that it will be one of a small
the set of keyboard events is much larger, so writing code that
examines this variable to determine what key has been typed is bad
practice, unless you are certain that it will be one of a small
two arguments to specify the time (one integer and one float value),
instead of a single argument that can be either an integer or a float.
two arguments to specify the time (one integer and one float value),
instead of a single argument that can be either an integer or a float.
This function performs redisplay (provided there is no pending
input from the user), then waits SECONDS seconds, or until input is
available. The result is `t' if `sit-for' waited the full time
This function performs redisplay (provided there is no pending
input from the user), then waits SECONDS seconds, or until input is
available. The result is `t' if `sit-for' waited the full time
This function simply pauses for SECONDS seconds without updating
the display. This function pays no attention to available input.
It returns `nil'.
This function simply pauses for SECONDS seconds without updating
the display. This function pays no attention to available input.
It returns `nil'.