Function: xterm-mouse--read-coordinate

xterm-mouse--read-coordinate is a byte-compiled function defined in xt-mouse.el.gz.

Signature

(xterm-mouse--read-coordinate)

Documentation

Read a mouse coordinate from the current terminal.

If xterm-mouse-utf-8 was non-nil when turn-on-xterm-mouse-tracking-on-terminal was called, reads the coordinate as an UTF-8 code unit sequence; otherwise, reads a single byte.

Source Code

;; Defined in /usr/src/emacs/lisp/xt-mouse.el.gz
(defun xterm-mouse--read-coordinate ()
  "Read a mouse coordinate from the current terminal.
If `xterm-mouse-utf-8' was non-nil when
`turn-on-xterm-mouse-tracking-on-terminal' was called, reads the
coordinate as an UTF-8 code unit sequence; otherwise, reads a
single byte."
  (let ((previous-keyboard-coding-system (keyboard-coding-system)))
    (unwind-protect
        (progn
          (set-keyboard-coding-system
           (if (terminal-parameter nil 'xterm-mouse-utf-8)
               'utf-8-unix
             'no-conversion))
          ;; Wait only a little; we assume that the entire escape sequence
          ;; has already been sent when this function is called.
          (read-char nil nil 0.1))
      (set-keyboard-coding-system previous-keyboard-coding-system))))