diff options
| author | Po Lu | 2023-11-05 10:40:52 +0800 |
|---|---|---|
| committer | Po Lu | 2023-11-05 10:42:01 +0800 |
| commit | c6c5bba06fcc1c467c547e4d35abc6bc5c2f3429 (patch) | |
| tree | 262a873d8d3fb851ba75e0f408740936facc023b /src/androidterm.c | |
| parent | 41e801fea1caff57203f76693ac4f0fe1ba2df03 (diff) | |
| download | emacs-c6c5bba06fcc1c467c547e4d35abc6bc5c2f3429.tar.gz emacs-c6c5bba06fcc1c467c547e4d35abc6bc5c2f3429.zip | |
Implement more Android text editing controls
* lisp/term/android-win.el (android-deactivate-mark-command):
New command.
(select-all, start-selecting-text, stop-selecting-text): Arrange
for commands manipulating the region to be executed when these
keys are registered.
* src/android.c (android_get_keysym_name): Return the keysym
name of each of the new keysyms introduced.
* src/androidterm.c (performContextMenuAction): Save special
keysyms into key events for the selectAll, startSelectingText
and stopSelectingText actions.
Diffstat (limited to 'src/androidterm.c')
| -rw-r--r-- | src/androidterm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/androidterm.c b/src/androidterm.c index 4a479daf452..1593cac36ba 100644 --- a/src/androidterm.c +++ b/src/androidterm.c | |||
| @@ -5402,11 +5402,22 @@ NATIVE_NAME (performContextMenuAction) (JNIEnv *env, jobject object, | |||
| 5402 | 5402 | ||
| 5403 | switch (action) | 5403 | switch (action) |
| 5404 | { | 5404 | { |
| 5405 | /* The subsequent three keycodes are addressed by | ||
| 5406 | android_get_keysym_name rather than in keyboard.c. */ | ||
| 5407 | |||
| 5405 | case 0: /* android.R.id.selectAll */ | 5408 | case 0: /* android.R.id.selectAll */ |
| 5409 | key = 65536 + 1; | ||
| 5410 | break; | ||
| 5411 | |||
| 5406 | case 1: /* android.R.id.startSelectingText */ | 5412 | case 1: /* android.R.id.startSelectingText */ |
| 5413 | key = 65536 + 2; | ||
| 5414 | break; | ||
| 5415 | |||
| 5407 | case 2: /* android.R.id.stopSelectingText */ | 5416 | case 2: /* android.R.id.stopSelectingText */ |
| 5417 | key = 65536 + 3; | ||
| 5418 | break; | ||
| 5419 | |||
| 5408 | default: | 5420 | default: |
| 5409 | /* These actions are not implemented. */ | ||
| 5410 | return; | 5421 | return; |
| 5411 | 5422 | ||
| 5412 | case 3: /* android.R.id.cut */ | 5423 | case 3: /* android.R.id.cut */ |