Variable: touch-screen-current-tool
touch-screen-current-tool is a variable defined in touch-screen.el.gz.
Value
nil
Documentation
The touch point currently being tracked, or nil.
If non-nil, this is a list of ten elements, which might be accessed as follows:
(nth 0 touch-screen-current-tool)
The ID of the touch point being tracked.
(nth 1 touch-screen-current-tool)
The window where the touch sequence being monitored commenced.
(nth 2 touch-screen-current-tool)
A cons holding the last registered position of the touch
point, relative to that window.
(nth 3 touch-screen-current-tool)
A field holding a symbol identifying the gesture being
observed while tracking the said touch point.
(nth 4 touch-screen-current-tool)
The initial position of the touchpoint.
(nth 5 touch-screen-current-tool)
(nth 6 touch-screen-current-tool)
(nth 7 touch-screen-current-tool)
(nth 8 touch-screen-current-tool)
A further four fields to used store data while tracking the
touch point.
(nth 9 touch-screen-current-tool)
The last known position of the touch point, relative to the
window in the second element.
(nth 10 touch-screen-current-tool)
The same position, relative to the frame to which the window
in the second element belongs.
See touch-screen-handle-point-update and
touch-screen-handle-point-up for the meanings of the fourth
element.
The third and last elements differ in that the former is not
modified until after a gesture is recognized in reaction to an
update, whereas the latter is updated upon each apposite
touchscreen-update event.
Source Code
;; Defined in /usr/src/emacs/lisp/touch-screen.el.gz
;;; touch-screen.el --- touch screen support for X and Android -*- lexical-binding: t; -*-
;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides code to recognize simple touch screen gestures.
;; It is used on X, PGTK, Android, and MS-Windows, currently the only
;; systems where Emacs supports touch input.
;;
;; See (elisp)Touchscreen Events for a description of the details of
;; touch events.
;;; Code:
(defvar touch-screen-current-tool nil
"The touch point currently being tracked, or nil.
If non-nil, this is a list of ten elements, which might be
accessed as follows:
(nth 0 touch-screen-current-tool)
The ID of the touch point being tracked.
(nth 1 touch-screen-current-tool)
The window where the touch sequence being monitored commenced.
(nth 2 touch-screen-current-tool)
A cons holding the last registered position of the touch
point, relative to that window.
(nth 3 touch-screen-current-tool)
A field holding a symbol identifying the gesture being
observed while tracking the said touch point.
(nth 4 touch-screen-current-tool)
The initial position of the touchpoint.
(nth 5 touch-screen-current-tool)
(nth 6 touch-screen-current-tool)
(nth 7 touch-screen-current-tool)
(nth 8 touch-screen-current-tool)
A further four fields to used store data while tracking the
touch point.
(nth 9 touch-screen-current-tool)
The last known position of the touch point, relative to the
window in the second element.
(nth 10 touch-screen-current-tool)
The same position, relative to the frame to which the window
in the second element belongs.
See `touch-screen-handle-point-update' and
`touch-screen-handle-point-up' for the meanings of the fourth
element.
The third and last elements differ in that the former is not
modified until after a gesture is recognized in reaction to an
update, whereas the latter is updated upon each apposite
`touchscreen-update' event.")