Small changes to toolbar long-clicks (#959)

* make "select all" key select word on long press
* long-press 'copy' to cut text (instead of copy all)
This commit is contained in:
Devy Ballard 2024-07-12 11:51:42 -06:00 committed by GitHub
parent bee51de8a5
commit ec8efcd678
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

@ -70,7 +70,7 @@ Does not use internet permission, and thus is 100% offline.
## Hidden Functionality ## Hidden Functionality
Features that may go unnoticed, and further potentially useful information Features that may go unnoticed, and further potentially useful information
* Long-pressing toolbar keys results in additional functionality: clipboard -> paste, move left/right -> word left/right, move up/down -> page up/down, word left/right -> line start/end, page up/down -> page start/end, copy -> copy all, select word -> select all, undo <-> redo * Long-pressing toolbar keys results in additional functionality: clipboard -> paste, move left/right -> word left/right, move up/down -> page up/down, word left/right -> line start/end, page up/down -> page start/end, copy -> cut, select word <-> select all, undo <-> redo
* Long-press the Comma-key to access Clipboard View, Emoji View, One-handed Mode, Settings, or Switch Language: * Long-press the Comma-key to access Clipboard View, Emoji View, One-handed Mode, Settings, or Switch Language:
* Emoji View and Language Switch will disappear if you have the corresponding key enabled; * Emoji View and Language Switch will disappear if you have the corresponding key enabled;
* For some layouts it\'s not the Comma-key, but the key at the same position (e.g. it\'s `q` for Dvorak layout). * For some layouts it\'s not the Comma-key, but the key at the same position (e.g. it\'s `q` for Dvorak layout).

View file

@ -70,8 +70,9 @@ fun getCodeForToolbarKeyLongClick(key: ToolbarKey) = when (key) {
CLIPBOARD -> KeyCode.CLIPBOARD_PASTE CLIPBOARD -> KeyCode.CLIPBOARD_PASTE
UNDO -> KeyCode.REDO UNDO -> KeyCode.REDO
REDO -> KeyCode.UNDO REDO -> KeyCode.UNDO
SELECT_ALL -> KeyCode.CLIPBOARD_SELECT_WORD
SELECT_WORD -> KeyCode.CLIPBOARD_SELECT_ALL SELECT_WORD -> KeyCode.CLIPBOARD_SELECT_ALL
COPY -> KeyCode.CLIPBOARD_COPY_ALL COPY -> KeyCode.CLIPBOARD_CUT
PASTE -> KeyCode.CLIPBOARD PASTE -> KeyCode.CLIPBOARD
LEFT -> KeyCode.WORD_LEFT LEFT -> KeyCode.WORD_LEFT
RIGHT -> KeyCode.WORD_RIGHT RIGHT -> KeyCode.WORD_RIGHT

View file

@ -812,8 +812,8 @@ New dictionary:
\n\t• move up/down &amp;#65515; page up/down &lt;br&gt; \n\t• move up/down &amp;#65515; page up/down &lt;br&gt;
\n\t• word left/right &amp;#65515; line start/end &lt;br&gt; \n\t• word left/right &amp;#65515; line start/end &lt;br&gt;
\n\t• page up/down &amp;#65515; page start/end &lt;br&gt; \n\t• page up/down &amp;#65515; page start/end &lt;br&gt;
\n\t• copy &amp;#65515; copy all &lt;br&gt; \n\t• copy &amp;#65515; cut &lt;br&gt;
\n\t• select word &amp;#65515; select all &lt;br&gt; \n\t• select word &amp;#8596; select all &lt;br&gt;
\n\t• undo &amp;#8596; redo &lt;br&gt; &lt;br&gt; \n\t• undo &amp;#8596; redo &lt;br&gt; &lt;br&gt;
\n► Long-pressing keys in the suggestion strip toolbar pins them to the suggestion strip. &lt;br&gt; &lt;br&gt; \n► Long-pressing keys in the suggestion strip toolbar pins them to the suggestion strip. &lt;br&gt; &lt;br&gt;
\n► Long-press the Comma-key to access Clipboard View, Emoji View, One-handed Mode, Settings, or Switch Language: &lt;br&gt; \n► Long-press the Comma-key to access Clipboard View, Emoji View, One-handed Mode, Settings, or Switch Language: &lt;br&gt;