GNU Info

Info Node: (elisp)Click Events

(elisp)Click Events


Next: Drag Events Prev: Mouse Events Up: Input Events
Enter node , (file) or (file)node

Click Events
------------

   When the user presses a mouse button and releases it at the same
location, that generates a "click" event.  Mouse click events have this
form:

     (EVENT-TYPE
      (WINDOW BUFFER-POS (X . Y) TIMESTAMP)
      CLICK-COUNT)

   Here is what the elements normally mean:

EVENT-TYPE
     This is a symbol that indicates which mouse button was used.  It is
     one of the symbols `mouse-1', `mouse-2', ..., where the buttons
     are numbered left to right.

     You can also use prefixes `A-', `C-', `H-', `M-', `S-' and `s-'
     for modifiers alt, control, hyper, meta, shift and super, just as
     you would with function keys.

     This symbol also serves as the event type of the event.  Key
     bindings describe events by their types; thus, if there is a key
     binding for `mouse-1', that binding would apply to all events whose
     EVENT-TYPE is `mouse-1'.

WINDOW
     This is the window in which the click occurred.

X, Y
     These are the pixel-denominated coordinates of the click, relative
     to the top left corner of WINDOW, which is `(0 . 0)'.

BUFFER-POS
     This is the buffer position of the character clicked on.

TIMESTAMP
     This is the time at which the event occurred, in milliseconds.
     (Since this value wraps around the entire range of Emacs Lisp
     integers in about five hours, it is useful only for relating the
     times of nearby events.)

CLICK-COUNT
     This is the number of rapid repeated presses so far of the same
     mouse button.  Note: Repeat Events.

   The meanings of BUFFER-POS, X and Y are somewhat different when the
event location is in a special part of the screen, such as the mode
line or a scroll bar.

   If the location is in a scroll bar, then BUFFER-POS is the symbol
`vertical-scroll-bar' or `horizontal-scroll-bar', and the pair `(X .
Y)' is replaced with a pair `(PORTION . WHOLE)', where PORTION is the
distance of the click from the top or left end of the scroll bar, and
WHOLE is the length of the entire scroll bar.

   If the position is on a mode line or the vertical line separating
WINDOW from its neighbor to the right, then BUFFER-POS is the symbol
`mode-line', `header-line', or `vertical-line'.  For the mode line, Y
does not have meaningful data.  For the vertical line, X does not have
meaningful data.

   In one special case, BUFFER-POS is a list containing a symbol (one
of the symbols listed above) instead of just the symbol.  This happens
after the imaginary prefix keys for the event are inserted into the
input stream.  Note: Key Sequence Input.


automatically generated by info2www version 1.2.2.9