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/button_002ddown-events.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 devdocs/elisp/button_002ddown-events.html (limited to 'devdocs/elisp/button_002ddown-events.html') diff --git a/devdocs/elisp/button_002ddown-events.html b/devdocs/elisp/button_002ddown-events.html new file mode 100644 index 00000000..bf498d1f --- /dev/null +++ b/devdocs/elisp/button_002ddown-events.html @@ -0,0 +1,6 @@ +

Button-Down Events

Click and drag events happen when the user releases a mouse button. They cannot happen earlier, because there is no way to distinguish a click from a drag until the button is released.

If you want to take action as soon as a button is pressed, you need to handle button-down events.16 These occur as soon as a button is pressed. They are represented by lists that look exactly like click events (see Click Events), except that the event-type symbol name contains the prefix ‘down-’. The ‘down-’ prefix follows modifier key prefixes such as ‘C-’ and ‘M-’.

The function read-key-sequence ignores any button-down events that don’t have command bindings; therefore, the Emacs command loop ignores them too. This means that you need not worry about defining button-down events unless you want them to do something. The usual reason to define a button-down event is so that you can track mouse motion (by reading motion events) until the button is released. See Motion Events.

+

+ 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/Button_002dDown-Events.html +

+
-- cgit v1.2.3