From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/focus-events.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 devdocs/elisp/focus-events.html (limited to 'devdocs/elisp/focus-events.html') diff --git a/devdocs/elisp/focus-events.html b/devdocs/elisp/focus-events.html new file mode 100644 index 00000000..622ec8fd --- /dev/null +++ b/devdocs/elisp/focus-events.html @@ -0,0 +1,8 @@ +

Focus Events

Window systems provide general ways for the user to control which window gets keyboard input. This choice of window is called the focus. When the user does something to switch between Emacs frames, that generates a focus event. The normal definition of a focus event, in the global keymap, is to select a new frame within Emacs, as the user would expect. See Input Focus, which also describes hooks related to focus events.

Focus events are represented in Lisp as lists that look like this:

(switch-frame new-frame)
+
+

where new-frame is the frame switched to.

Some X window managers are set up so that just moving the mouse into a window is enough to set the focus there. Usually, there is no need for a Lisp program to know about the focus change until some other kind of input arrives. Emacs generates a focus event only when the user actually types a keyboard key or presses a mouse button in the new frame; just moving the mouse between frames does not generate a focus event.

A focus event in the middle of a key sequence would garble the sequence. So Emacs never generates a focus event in the middle of a key sequence. If the user changes focus in the middle of a key sequence—that is, after a prefix key—then Emacs reorders the events so that the focus event comes either before or after the multi-event key sequence, and not within it.

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Focus-Events.html +

+
-- cgit v1.2.3