Next: Miscellaneous Functions, Previous: Keymaps, Up: Top
The event loop reads all X events received on any of the windows that
Sawfish is aware off. Many of these events invoke hooks, as described
in Standard Hooks. Keyboard and pointer events are translated to
their Lisp equivalents (see Events) and then used to scan all
active keymaps for a binding. If a binding is found, the associated
command is invoked through the call-command function.
The active keymaps are determined as follows:
override-keymap is non-nil, then this is
the only keymap searched
keymap property of the currently “clicked” frame
part if there is one,
keymap property of the currently focused window
global-keymap.
Note that for ButtonRelease events, the frame part's keymap is
only searched if the pointer is actually within the frame part when the
release event occurs.
If no binding may be found in any of the active keymaps, then the
unbound-key-hook hook is called. This is an or type
hook—the first function that returns non-nil will terminate the hook
call.
Perform the usual binding lookup for the event object object. Returns the command found, or
nilif no binding exists.
By default, both key-release events, and events that are bound to modifier keys (e.g. <Control_L>), are ignored. However, this behavior may be changed:
While a command is being evaluated, information about the event that caused it may be found:
Extract the owning window of the current X event (this is a window object, or the symbol
rootfor the root window, ornilif there is no window or no event). This is stored internally as the current event window, and returned.
Send the current X event to window, either a window object, a numeric window id, or the symbol
root. If aButtonPressevent the pointer grab will be released first.Mask may be an integer defining the X event mask to pass to the
XSendEventfunction. If not defined, a mask is chosen that would usually be used to select the type of event being proxied.Propagate is a flag (
nil/non-nil) passed directly to an underlyingXSendEventcall. (And if someone would like to explain what that means, please do so ....
This is a wrapper for the
XAllowEventsfunction. The mode parameter may be one of the following symbols:async-pointer,async-keyboard,sync-pointer,sync-keyboard,replay-pointer,replay-keyboard,async-both,sync-both.Events that have to be grabbed to be received (i.e. all bindings in the
global-keymapand thewindow-keymap) are grabbed synchronously. This means that no more events will be received until either the command returns, orallow-eventsis called.This is normally not important, but if the command expects to receive further events it must call
allow-events. See the interactive move and resize functions for an example.
Cause the next button press to be treated as a single click event, no matter how soon it occurs after the prevous button-press event.