diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/button_002ddown-events.html | |
new repository
Diffstat (limited to 'devdocs/elisp/button_002ddown-events.html')
| -rw-r--r-- | devdocs/elisp/button_002ddown-events.html | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ + <h4 class="subsection">Button-Down Events</h4> <p>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. </p> <p>If you want to take action as soon as a button is pressed, you need to handle <em>button-down</em> events.<a id="DOCF16" href="#FOOT16"><sup>16</sup></a> These occur as soon as a button is pressed. They are represented by lists that look exactly like click events (see <a href="click-events">Click Events</a>), except that the <var>event-type</var> symbol name contains the prefix ‘<samp>down-</samp>’. The ‘<samp>down-</samp>’ prefix follows modifier key prefixes such as ‘<samp>C-</samp>’ and ‘<samp>M-</samp>’. </p> <p>The function <code>read-key-sequence</code> 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 <a href="motion-events">Motion Events</a>. </p><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Button_002dDown-Events.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Button_002dDown-Events.html</a> + </p> +</div> |
