aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-11-19 11:00:25 +0800
committerPo Lu2023-11-19 11:00:25 +0800
commitf2898e24fd125fce0db0ebdad26aa6355eee3ccf (patch)
treecdfb2bc4ee762874d6493e1ff95f0e9832265143
parent47b497b4dac91e5ea56102018223bdeb5e21a93b (diff)
downloademacs-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.texi6
-rw-r--r--doc/emacs/commands.texi2
-rw-r--r--doc/emacs/emacs.texi3
-rw-r--r--doc/emacs/frames.texi15
-rw-r--r--doc/emacs/input.texi152
-rw-r--r--doc/emacs/windows.texi2
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 @@
9Alliance. This section describes the peculiarities of using Emacs on 9Alliance. This section describes the peculiarities of using Emacs on
10an Android device running Android 2.2 or later. 10an 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
13or digitizer device and on-screen keyboard. For more information 13virtual keyboard for user input. For more information about using
14about using such devices with Emacs, @pxref{Other Input Devices}. 14such 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
227information on variables (@pxref{Variables}) and the information about 227information on variables (@pxref{Variables}) and the information about
228specific variables will make sense. 228specific 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
1586wheel scrolling switches to the next or previous tab. Holding down 1586wheel scrolling switches to the next or previous tab. Holding down
1587the @key{SHIFT} key during scrolling moves the tab to the left or right. 1587the @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
1590operate on tabs. Long-pressing (@pxref{Touchscreens}) a tab will 1590on tabs. Long-pressing (@pxref{Touchscreens}) a tab will display a
1591display a context menu with items that operate on the tab that was 1591context menu with items that operate on the tab that was pressed, and
1592pressed, and long-pressing the tab bar itself will display a context 1592long-pressing the tab bar itself will display a context menu which
1593menu which lets you create and remove tabs; tapping a tab itself will 1593lets you create and remove tabs; tapping a tab itself will result in
1594result in that tab's window configuration being selected, and tapping 1594that tab's window configuration being selected, and tapping a button
1595a button on the tab bar will behave as if it was clicked with 1595on 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
9have access to a desktop computer or computer terminal, with a 9a desktop computer or computer terminal, equipped with a keyboard and
10keyboard and perhaps a suitable pointing device such as a mouse. 10perhaps a suitable pointing device such as a mouse (@pxref{Mouse
11Input}).
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
13systems such as Android mean that this assumption no longer holds 14input, enabling users to interact with it even if it is installed on a
14true. Emacs supports input from various other kinds of input devices, 15computer that substitutes such input sources for the customary
15which is detailed here. 16combination 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
28devices as styluses) on a monitor or computer terminal where it is 29devices as styluses) on a monitor or computer terminal where it is
29displayed. 30displayed.
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,
32the following sequences of movements (@dfn{gestures}) to common 33are compared against predefined patterns dubbed @dfn{gestures}, after
33actions: 34which any gesture those factors align with designates a series of
35actions to be taken on the text beneath the tools; the gestures
36presently 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
62if @code{mouse-1} were to be held down and a mouse moved analogously. 65if @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
68adjusting their position such as to increase or decrease the distance
69between them will modify the text scale (@xref{Text Scale}) in
70proportion 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
95surrounding point is displayed in the echo area (@pxref{Echo Area}) 91surrounding point is displayed in the echo area (@pxref{Echo Area})
96during the motion of the tool, below which is another line indicating 92during the motion of the tool, below which is another line indicating
97the position of point relative to the first. 93the 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
98followed by adjustments to their position such as to increase or
99decrease 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
103through customizing the variable @code{touch-screen-delay}. 106through 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
111windowing system typically provides an on-screen keyboard, more often 114windowing system might provide an on-screen keyboard, widely known as
112known as a ``virtual keyboard'', containing rows of clickable buttons 115a ``virtual keyboard'', containing rows of clickable buttons that send
113that send keyboard input to the application, much like a real keyboard 116keyboard input to the application, much as a real keyboard would.
114would. This virtual keyboard is hidden by default, as it uses up
115valuable on-screen real estate, and must be opened once the program
116being used is ready to accept keyboard input.
117
118 Under the X Window System, the client that provides the on-screen
119keyboard typically detects when the application is ready to accept
120keyboard input through a set of complex heuristics, and automatically
121displays 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
124is ready to accept keyboard input. Typically, this is done in 119requesting text input as it occupies scarce space on display, and
125response to a touchscreen ``tap'' gesture (@pxref{Touchscreens}), or 120programs are therefore enjoined to display it once they are ready to
126once to the minibuffer becomes in use (@pxref{Minibuffer}.) 121accept keyboard input. Systems running X detect when the presence of
122the virtual keyboard is warranted, but on others such as Android Emacs
123is responsible for displaying it when need be, generally in reaction
124to a touch screen ``tap'' gesture (@pxref{Touchscreens}) or the
125minibuffer 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
130checks to see whether or not the command is supposed to set the point 129checks whether the command is meant to set the point by searching for
131by looking for it in the list @code{touch-screen-set-point-commands}. 130it in the list @code{touch-screen-set-point-commands}. If it is and
132If it is, then Emacs looks up whether or not the text under the point 131the text beneath the new point is not read-only, it activates the
133is read-only; if not, it activates the on-screen keyboard, assuming 132virtual keyboard, in anticipation that the user is about to enter text
134that the user is about to enter text in to the current buffer. 133there.
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 136only the command @code{mouse-set-point} (@pxref{Mouse Commands}),
138always display the on screen keyboard; it may also be set buffer 137which is the default binding of @code{mouse-1}, and thus of
139locally, which means that Emacs should always display the keyboard 138touchscreen tap gestures as well.
140when 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
143keyboard. For more details, @pxref{On-Screen Keyboards,,, elisp, The 141 The user option @code{touch-screen-display-keyboard} compels Emacs
142to display the virtual keyboard on such taps even if the text is read
143only; it may also be set buffer locally, in which case Emacs will
144always display the keyboard in response to a tap on a window
145displaying the buffer it is set in.
146
147 There are moreover a set of functions to show or hide the on-screen
148keyboard. For more details, @xref{On-Screen Keyboards,,, elisp, The
144Emacs Lisp Reference Manual}. 149Emacs 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
148keyboard while it is executing a command, Emacs implements a feature 153keyboard while it is executing a command, Emacs implements a feature
149on devices with only an on-screen keyboard, by which two rapid clicks 154on window systems frequently equipped with no physical keyboard, by
150of a hardware button that is always present on the device results in 155which two rapid clicks of a hardware button that is always present on
151Emacs quitting. @xref{Quitting}. 156the 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
155button exists by default, but one can be configured through the 160the variable @code{x-quit-keysym}. On Android this button is always
156variable @code{x-quit-keysym}, whereas under Android it is always the 161the volume down button.
157volume 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
161buffer edits differently from desktop input methods. 165differently 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
164simply display the contents of any on going character compositions on 168simply display the contents of any ongoing character composition on
165screen, and send the appropriate key events to Emacs after completion. 169screen, and send key events reflecting its contents to Emacs after it
170is 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
168the selected window of each frame; this is known as ``text 173to the selected window of each frame; this is known as ``text
169conversion'', or ``string conversion'' under the X Window System. 174conversion'', or ``string conversion'' under the X Window System.
170Emacs 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
172derivatives of @code{text-mode} and @code{prog-mode}. 177@code{text-conversion-style} is non-@code{nil}, that is to say,
178generally 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
175a request to perform the conversion from the input method, and Emacs 181a request to perform the conversion from the input method, and Emacs
176is not currently reading a key sequence for which one prefix key has 182is not currently reading a key sequence for which one prefix key has
177already been read (@pxref{Keys}.) After the conversion completes, a 183already 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
179Emacs Reference Manual}. 185Emacs 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
183the region becomes known as the ``composing region'' (or 189the region is designated the ``composing region'' (or ``preconversion
184``preconversion region''.) The variable @code{text-conversion-face} 190region''). The variable @code{text-conversion-face} controls whether
185describes whether or not to display the composing region in a specific 191to display the composing region in a distinctive face, and if so,
186face. 192which 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}
664icon of a tab deletes it. The mouse wheel on the tab line scrolls 664icon of a tab deletes it. The mouse wheel on the tab line scrolls
665the tabs horizontally. 665the 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
668interact with the ``tab line''. Long-pressing (@pxref{Touchscreens}) 668interact with the ``tab line''. Long-pressing (@pxref{Touchscreens})
669a tab will display a context menu with items that operate on the tab 669a tab will display a context menu with items that operate on the tab
670that was pressed; tapping a tab itself will result in switching to 670that was pressed; tapping a tab itself will result in switching to