diff options
| author | Po Lu | 2023-11-19 11:00:25 +0800 |
|---|---|---|
| committer | Po Lu | 2023-11-19 11:00:25 +0800 |
| commit | f2898e24fd125fce0db0ebdad26aa6355eee3ccf (patch) | |
| tree | cdfb2bc4ee762874d6493e1ff95f0e9832265143 | |
| parent | 47b497b4dac91e5ea56102018223bdeb5e21a93b (diff) | |
| download | emacs-f2898e24fd125fce0db0ebdad26aa6355eee3ccf.tar.gz emacs-f2898e24fd125fce0db0ebdad26aa6355eee3ccf.zip | |
Reorganize documentation relating to touch screens
Chiefly, elevate it from an appendix to a node in the User Input
chapter. I have been approached time and again with questions
from people who have not searched the appendices for such
documentation.
* doc/emacs/emacs.texi: Move Other Input below Commands in the
menu.
* doc/emacs/input.texi (Other Input Devices): Rename to Other
Input. All callers changed.
(Touchscreens, On-Screen Keyboards): Revise and reword
documentation. Homogenize nomenclature for on screen keyboards,
preferring "virtual keyboards" after it has been mentioned once
by the other name.
| -rw-r--r-- | doc/emacs/android.texi | 6 | ||||
| -rw-r--r-- | doc/emacs/commands.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 3 | ||||
| -rw-r--r-- | doc/emacs/frames.texi | 15 | ||||
| -rw-r--r-- | doc/emacs/input.texi | 152 | ||||
| -rw-r--r-- | doc/emacs/windows.texi | 2 |
6 files changed, 93 insertions, 87 deletions
diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 161712493a6..915ba948b93 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi | |||
| @@ -9,9 +9,9 @@ | |||
| 9 | Alliance. This section describes the peculiarities of using Emacs on | 9 | Alliance. This section describes the peculiarities of using Emacs on |
| 10 | an Android device running Android 2.2 or later. | 10 | an Android device running Android 2.2 or later. |
| 11 | 11 | ||
| 12 | Android devices commonly rely on user input through a touch screen | 12 | Android devices commonly rely a touch screen or digitizer device and |
| 13 | or digitizer device and on-screen keyboard. For more information | 13 | virtual keyboard for user input. For more information about using |
| 14 | about using such devices with Emacs, @pxref{Other Input Devices}. | 14 | such devices with Emacs, @pxref{Other Input}. |
| 15 | 15 | ||
| 16 | @menu | 16 | @menu |
| 17 | * What is Android?:: Preamble. | 17 | * What is Android?:: Preamble. |
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index 98f0610ee44..cb924519175 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi | |||
| @@ -227,6 +227,8 @@ until you are interested in customizing them. Then read the basic | |||
| 227 | information on variables (@pxref{Variables}) and the information about | 227 | information on variables (@pxref{Variables}) and the information about |
| 228 | specific variables will make sense. | 228 | specific variables will make sense. |
| 229 | 229 | ||
| 230 | @include input.texi | ||
| 231 | |||
| 230 | @ifnottex | 232 | @ifnottex |
| 231 | @lowersections | 233 | @lowersections |
| 232 | @end ifnottex | 234 | @end ifnottex |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index da9696dfa4b..f7d9033c5f4 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -149,6 +149,7 @@ Important General Concepts | |||
| 149 | editing action. | 149 | editing action. |
| 150 | * Mouse Input:: Using the mouse and keypads. | 150 | * Mouse Input:: Using the mouse and keypads. |
| 151 | * Commands:: Named functions run by key sequences to do editing. | 151 | * Commands:: Named functions run by key sequences to do editing. |
| 152 | * Other Input:: Input besides the mouse, keyboard and keypads. | ||
| 152 | * Entering Emacs:: Starting Emacs from the shell. | 153 | * Entering Emacs:: Starting Emacs from the shell. |
| 153 | * Exiting:: Stopping or killing Emacs. | 154 | * Exiting:: Stopping or killing Emacs. |
| 154 | 155 | ||
| @@ -224,7 +225,6 @@ Appendices | |||
| 224 | * Haiku:: Using Emacs on Haiku. | 225 | * Haiku:: Using Emacs on Haiku. |
| 225 | * Android:: Using Emacs on Android. | 226 | * Android:: Using Emacs on Android. |
| 226 | * Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS. | 227 | * Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS. |
| 227 | * Other Input Devices:: Using Emacs with other input devices. | ||
| 228 | * Manifesto:: What's GNU? Gnu's Not Unix! | 228 | * Manifesto:: What's GNU? Gnu's Not Unix! |
| 229 | 229 | ||
| 230 | * Glossary:: Terms used in this manual. | 230 | * Glossary:: Terms used in this manual. |
| @@ -1652,7 +1652,6 @@ Lisp programming. | |||
| 1652 | @include android.texi | 1652 | @include android.texi |
| 1653 | @c Includes msdos-xtra. | 1653 | @c Includes msdos-xtra. |
| 1654 | @include msdos.texi | 1654 | @include msdos.texi |
| 1655 | @include input.texi | ||
| 1656 | @include gnu.texi | 1655 | @include gnu.texi |
| 1657 | @include glossary.texi | 1656 | @include glossary.texi |
| 1658 | @ifnottex | 1657 | @ifnottex |
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index e2e30408a65..1862ed2d5d4 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -1586,14 +1586,13 @@ the items that operate on the clicked tab. Dragging the tab with | |||
| 1586 | wheel scrolling switches to the next or previous tab. Holding down | 1586 | wheel scrolling switches to the next or previous tab. Holding down |
| 1587 | the @key{SHIFT} key during scrolling moves the tab to the left or right. | 1587 | the @key{SHIFT} key during scrolling moves the tab to the left or right. |
| 1588 | 1588 | ||
| 1589 | Touch screen input (@pxref{Other Input Devices}) can also be used to | 1589 | Touch screen input (@pxref{Other Input}) can also be used to operate |
| 1590 | operate on tabs. Long-pressing (@pxref{Touchscreens}) a tab will | 1590 | on tabs. Long-pressing (@pxref{Touchscreens}) a tab will display a |
| 1591 | display a context menu with items that operate on the tab that was | 1591 | context menu with items that operate on the tab that was pressed, and |
| 1592 | pressed, and long-pressing the tab bar itself will display a context | 1592 | long-pressing the tab bar itself will display a context menu which |
| 1593 | menu which lets you create and remove tabs; tapping a tab itself will | 1593 | lets you create and remove tabs; tapping a tab itself will result in |
| 1594 | result in that tab's window configuration being selected, and tapping | 1594 | that tab's window configuration being selected, and tapping a button |
| 1595 | a button on the tab bar will behave as if it was clicked with | 1595 | on the tab bar will behave as if it was clicked with @kbd{mouse-1}. |
| 1596 | @kbd{mouse-1}. | ||
| 1597 | 1596 | ||
| 1598 | @findex tab-bar-history-mode | 1597 | @findex tab-bar-history-mode |
| 1599 | You can enable @code{tab-bar-history-mode} to remember window | 1598 | You can enable @code{tab-bar-history-mode} to remember window |
diff --git a/doc/emacs/input.texi b/doc/emacs/input.texi index e4d595caf84..ae3dc05364e 100644 --- a/doc/emacs/input.texi +++ b/doc/emacs/input.texi | |||
| @@ -1,26 +1,27 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 2023 Free Software Foundation, Inc. | 2 | @c Copyright (C) 2023 Free Software Foundation, Inc. |
| 3 | @c See file emacs.texi for copying conditions. | 3 | @c See file emacs.texi for copying conditions. |
| 4 | @node Other Input Devices | 4 | @node Other Input |
| 5 | @appendix Emacs and Unconventional Input Devices | 5 | @section Touchscreen Input and Virtual Keyboards |
| 6 | @cindex other input devices | 6 | @cindex other input devices |
| 7 | 7 | ||
| 8 | Emacs was originally developed with the assumption that its users | 8 | Emacs was first written assuming that its users were to use it from |
| 9 | have access to a desktop computer or computer terminal, with a | 9 | a desktop computer or computer terminal, equipped with a keyboard and |
| 10 | keyboard and perhaps a suitable pointing device such as a mouse. | 10 | perhaps a suitable pointing device such as a mouse (@pxref{Mouse |
| 11 | Input}). | ||
| 11 | 12 | ||
| 12 | However, recent developments in the X Window System and operating | 13 | Emacs is also capable of receiving input from alternative sources of |
| 13 | systems such as Android mean that this assumption no longer holds | 14 | input, enabling users to interact with it even if it is installed on a |
| 14 | true. Emacs supports input from various other kinds of input devices, | 15 | computer that substitutes such input sources for the customary |
| 15 | which is detailed here. | 16 | combination of keyboard and mouse. |
| 16 | 17 | ||
| 17 | @menu | 18 | @menu |
| 18 | * Touchscreens:: Using Emacs on touchscreens. | 19 | * Touchscreens:: Interacting with Emacs from touchscreens. |
| 19 | * On-Screen Keyboards:: Using Emacs with virtual keyboards. | 20 | * On-Screen Keyboards:: Text input with virtual keyboards. |
| 20 | @end menu | 21 | @end menu |
| 21 | 22 | ||
| 22 | @node Touchscreens | 23 | @node Touchscreens |
| 23 | @section Using Emacs on Touchscreens | 24 | @subsection Using Emacs on Touchscreens |
| 24 | @cindex touchscreen input | 25 | @cindex touchscreen input |
| 25 | 26 | ||
| 26 | Touchscreen input is the manipulation of a frame's contents by the | 27 | Touchscreen input is the manipulation of a frame's contents by the |
| @@ -28,9 +29,11 @@ placement and motion of tools (instanced by fingers and such pointing | |||
| 28 | devices as styluses) on a monitor or computer terminal where it is | 29 | devices as styluses) on a monitor or computer terminal where it is |
| 29 | displayed. | 30 | displayed. |
| 30 | 31 | ||
| 31 | Under the X Window System or Android, Emacs detects and translates | 32 | Two factors, the order and position on which such tools are placed, |
| 32 | the following sequences of movements (@dfn{gestures}) to common | 33 | are compared against predefined patterns dubbed @dfn{gestures}, after |
| 33 | actions: | 34 | which any gesture those factors align with designates a series of |
| 35 | actions to be taken on the text beneath the tools; the gestures | ||
| 36 | presently recognized are: | ||
| 34 | 37 | ||
| 35 | @itemize @bullet | 38 | @itemize @bullet |
| 36 | @item | 39 | @item |
| @@ -62,13 +65,6 @@ commence selecting text under the tool as it continues its motion, as | |||
| 62 | if @code{mouse-1} were to be held down and a mouse moved analogously. | 65 | if @code{mouse-1} were to be held down and a mouse moved analogously. |
| 63 | @xref{Mouse Commands}. | 66 | @xref{Mouse Commands}. |
| 64 | 67 | ||
| 65 | @item | ||
| 66 | @cindex pinching, touchscreens | ||
| 67 | @dfn{Pinching}, which is placing two tools apart on the screen and | ||
| 68 | adjusting their position such as to increase or decrease the distance | ||
| 69 | between them will modify the text scale (@xref{Text Scale}) in | ||
| 70 | proportion to the change in that distance. | ||
| 71 | |||
| 72 | @vindex touch-screen-word-select | 68 | @vindex touch-screen-word-select |
| 73 | @cindex word selection mode, touchscreens | 69 | @cindex word selection mode, touchscreens |
| 74 | To the detriment of text selection, it can prove challenging to | 70 | To the detriment of text selection, it can prove challenging to |
| @@ -95,6 +91,13 @@ indicating the position of the point within the echo area. If | |||
| 95 | surrounding point is displayed in the echo area (@pxref{Echo Area}) | 91 | surrounding point is displayed in the echo area (@pxref{Echo Area}) |
| 96 | during the motion of the tool, below which is another line indicating | 92 | during the motion of the tool, below which is another line indicating |
| 97 | the position of point relative to the first. | 93 | the position of point relative to the first. |
| 94 | |||
| 95 | @item | ||
| 96 | @cindex pinching, touchscreens | ||
| 97 | @dfn{Pinching}, the placement of two tools apart on the screen | ||
| 98 | followed by adjustments to their position such as to increase or | ||
| 99 | decrease the distance between them will modify the text scale | ||
| 100 | (@xref{Text Scale}) in proportion to the change in that distance. | ||
| 98 | @end itemize | 101 | @end itemize |
| 99 | 102 | ||
| 100 | @vindex touch-screen-delay | 103 | @vindex touch-screen-delay |
| @@ -103,84 +106,87 @@ upon the screen exceeds 0.7 seconds. This delay can be adjusted | |||
| 103 | through customizing the variable @code{touch-screen-delay}. | 106 | through customizing the variable @code{touch-screen-delay}. |
| 104 | 107 | ||
| 105 | @node On-Screen Keyboards | 108 | @node On-Screen Keyboards |
| 106 | @section Using Emacs with Virtual Keyboards | 109 | @subsection Using Emacs with Virtual Keyboards |
| 107 | @cindex virtual keyboards | 110 | @cindex virtual keyboards |
| 108 | @cindex on-screen keyboards | 111 | @cindex on-screen keyboards |
| 109 | 112 | ||
| 110 | When there is no physical keyboard attached to a system, the | 113 | When there is no physical keyboard attached to a system, its |
| 111 | windowing system typically provides an on-screen keyboard, more often | 114 | windowing system might provide an on-screen keyboard, widely known as |
| 112 | known as a ``virtual keyboard'', containing rows of clickable buttons | 115 | a ``virtual keyboard'', containing rows of clickable buttons that send |
| 113 | that send keyboard input to the application, much like a real keyboard | 116 | keyboard input to the application, much as a real keyboard would. |
| 114 | would. This virtual keyboard is hidden by default, as it uses up | ||
| 115 | valuable on-screen real estate, and must be opened once the program | ||
| 116 | being used is ready to accept keyboard input. | ||
| 117 | |||
| 118 | Under the X Window System, the client that provides the on-screen | ||
| 119 | keyboard typically detects when the application is ready to accept | ||
| 120 | keyboard input through a set of complex heuristics, and automatically | ||
| 121 | displays the keyboard when necessary. | ||
| 122 | 117 | ||
| 123 | On other systems such as Android, Emacs must tell the system when it | 118 | This virtual keyboard is hidden when the focused program is not |
| 124 | is ready to accept keyboard input. Typically, this is done in | 119 | requesting text input as it occupies scarce space on display, and |
| 125 | response to a touchscreen ``tap'' gesture (@pxref{Touchscreens}), or | 120 | programs are therefore enjoined to display it once they are ready to |
| 126 | once to the minibuffer becomes in use (@pxref{Minibuffer}.) | 121 | accept keyboard input. Systems running X detect when the presence of |
| 122 | the virtual keyboard is warranted, but on others such as Android Emacs | ||
| 123 | is responsible for displaying it when need be, generally in reaction | ||
| 124 | to a touch screen ``tap'' gesture (@pxref{Touchscreens}) or the | ||
| 125 | minibuffer being brought into use (@pxref{Minibuffer}). | ||
| 127 | 126 | ||
| 128 | @vindex touch-screen-set-point-commands | 127 | @vindex touch-screen-set-point-commands |
| 129 | When a ``tap'' gesture results in a command being executed, Emacs | 128 | When a ``tap'' gesture results in a command being executed, Emacs |
| 130 | checks to see whether or not the command is supposed to set the point | 129 | checks whether the command is meant to set the point by searching for |
| 131 | by looking for it in the list @code{touch-screen-set-point-commands}. | 130 | it in the list @code{touch-screen-set-point-commands}. If it is and |
| 132 | If it is, then Emacs looks up whether or not the text under the point | 131 | the text beneath the new point is not read-only, it activates the |
| 133 | is read-only; if not, it activates the on-screen keyboard, assuming | 132 | virtual keyboard, in anticipation that the user is about to enter text |
| 134 | that the user is about to enter text in to the current buffer. | 133 | there. |
| 135 | 134 | ||
| 136 | @vindex touch-screen-display-keyboard | 135 | The default value of @code{touch-point-set-point-commands} holds |
| 137 | The user option @code{touch-screen-display-keyboard} forces Emacs to | 136 | only the command @code{mouse-set-point} (@pxref{Mouse Commands}), |
| 138 | always display the on screen keyboard; it may also be set buffer | 137 | which is the default binding of @code{mouse-1}, and thus of |
| 139 | locally, which means that Emacs should always display the keyboard | 138 | touchscreen tap gestures as well. |
| 140 | when the buffer is selected. | ||
| 141 | 139 | ||
| 142 | Emacs also provides a set of functions to show or hide the on-screen | 140 | @vindex touch-screen-display-keyboard |
| 143 | keyboard. For more details, @pxref{On-Screen Keyboards,,, elisp, The | 141 | The user option @code{touch-screen-display-keyboard} compels Emacs |
| 142 | to display the virtual keyboard on such taps even if the text is read | ||
| 143 | only; it may also be set buffer locally, in which case Emacs will | ||
| 144 | always display the keyboard in response to a tap on a window | ||
| 145 | displaying the buffer it is set in. | ||
| 146 | |||
| 147 | There are moreover a set of functions to show or hide the on-screen | ||
| 148 | keyboard. For more details, @xref{On-Screen Keyboards,,, elisp, The | ||
| 144 | Emacs Lisp Reference Manual}. | 149 | Emacs Lisp Reference Manual}. |
| 145 | 150 | ||
| 146 | @cindex quitting, without a keyboard | 151 | @cindex quitting, without a keyboard |
| 147 | Since it may not be possible for Emacs to display the on screen | 152 | Since it may not be possible for Emacs to display the virtual |
| 148 | keyboard while it is executing a command, Emacs implements a feature | 153 | keyboard while it is executing a command, Emacs implements a feature |
| 149 | on devices with only an on-screen keyboard, by which two rapid clicks | 154 | on window systems frequently equipped with no physical keyboard, by |
| 150 | of a hardware button that is always present on the device results in | 155 | which two rapid clicks of a hardware button that is always present on |
| 151 | Emacs quitting. @xref{Quitting}. | 156 | the device induces a quit. @xref{Quitting}. |
| 152 | 157 | ||
| 153 | @vindex x-quit-keysym | 158 | @vindex x-quit-keysym |
| 154 | The button afforded such special treatment varies; under X, no such | 159 | No such button is enabled on X, but one can be configured through |
| 155 | button exists by default, but one can be configured through the | 160 | the variable @code{x-quit-keysym}. On Android this button is always |
| 156 | variable @code{x-quit-keysym}, whereas under Android it is always the | 161 | the volume down button. |
| 157 | volume down buttons. | ||
| 158 | 162 | ||
| 159 | @cindex text conversion, keyboards | 163 | @cindex text conversion, keyboards |
| 160 | Most input methods designed to work with on-screen keyboards perform | 164 | Most input methods designed to work with virtual keyboards edit text |
| 161 | buffer edits differently from desktop input methods. | 165 | differently from desktop input methods. |
| 162 | 166 | ||
| 163 | On a conventional desktop windowing system, an input method will | 167 | On a conventional desktop windowing system, an input method will |
| 164 | simply display the contents of any on going character compositions on | 168 | simply display the contents of any ongoing character composition on |
| 165 | screen, and send the appropriate key events to Emacs after completion. | 169 | screen, and send key events reflecting its contents to Emacs after it |
| 170 | is confirmed by the user. | ||
| 166 | 171 | ||
| 167 | However, on screen keyboard input methods directly perform edits to | 172 | By contrast, virtual keyboard input methods directly perform edits |
| 168 | the selected window of each frame; this is known as ``text | 173 | to the selected window of each frame; this is known as ``text |
| 169 | conversion'', or ``string conversion'' under the X Window System. | 174 | conversion'', or ``string conversion'' under the X Window System. |
| 170 | Emacs enables these input methods whenever the buffer local value of | 175 | |
| 171 | @code{text-conversion-style} is non-@code{nil}, normally inside | 176 | Emacs enables these input methods whenever the buffer local value of |
| 172 | derivatives of @code{text-mode} and @code{prog-mode}. | 177 | @code{text-conversion-style} is non-@code{nil}, that is to say, |
| 178 | generally inside derivatives of @code{text-mode} and @code{prog-mode}. | ||
| 173 | 179 | ||
| 174 | Text conversion is performed asynchronously whenever Emacs receives | 180 | Text conversion is performed asynchronously whenever Emacs receives |
| 175 | a request to perform the conversion from the input method, and Emacs | 181 | a request to perform the conversion from the input method, and Emacs |
| 176 | is not currently reading a key sequence for which one prefix key has | 182 | is not currently reading a key sequence for which one prefix key has |
| 177 | already been read (@pxref{Keys}.) After the conversion completes, a | 183 | already been read (@pxref{Keys}). After the conversion completes, a |
| 178 | @code{text-conversion} event is sent. @xref{Misc Events,,, elisp, the | 184 | @code{text-conversion} event is sent. @xref{Misc Events,,, elisp, the |
| 179 | Emacs Reference Manual}. | 185 | Emacs Reference Manual}. |
| 180 | 186 | ||
| 181 | @vindex text-conversion-face | 187 | @vindex text-conversion-face |
| 182 | If the input method needs to work on a region of the buffer, then | 188 | If the input method needs to work on a region of the buffer, then |
| 183 | the region becomes known as the ``composing region'' (or | 189 | the region is designated the ``composing region'' (or ``preconversion |
| 184 | ``preconversion region''.) The variable @code{text-conversion-face} | 190 | region''). The variable @code{text-conversion-face} controls whether |
| 185 | describes whether or not to display the composing region in a specific | 191 | to display the composing region in a distinctive face, and if so, |
| 186 | face. | 192 | which face to employ. |
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index ca5e424d939..a2946bcada9 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi | |||
| @@ -664,7 +664,7 @@ to the window-local tab line of buffers, and clicking on the @kbd{x} | |||
| 664 | icon of a tab deletes it. The mouse wheel on the tab line scrolls | 664 | icon of a tab deletes it. The mouse wheel on the tab line scrolls |
| 665 | the tabs horizontally. | 665 | the tabs horizontally. |
| 666 | 666 | ||
| 667 | Touch screen input (@pxref{Other Input Devices}) can also be used to | 667 | Touch screen input (@pxref{Other Input}) can also be used to |
| 668 | interact with the ``tab line''. Long-pressing (@pxref{Touchscreens}) | 668 | interact with the ``tab line''. Long-pressing (@pxref{Touchscreens}) |
| 669 | a tab will display a context menu with items that operate on the tab | 669 | a tab will display a context menu with items that operate on the tab |
| 670 | that was pressed; tapping a tab itself will result in switching to | 670 | that was pressed; tapping a tab itself will result in switching to |