diff options
| author | Po Lu | 2024-06-13 10:46:59 +0800 |
|---|---|---|
| committer | Po Lu | 2024-06-13 10:46:59 +0800 |
| commit | 94bcd7964bbb20bc8ff8a91a9656452a97139d60 (patch) | |
| tree | 951aea98a335493cbd0f1d52cd72c9ed02f85cf6 /src/androidterm.c | |
| parent | 6b7ff60a5e71c161a064e27509fe4fb95cf74ddd (diff) | |
| download | emacs-94bcd7964bbb20bc8ff8a91a9656452a97139d60.tar.gz emacs-94bcd7964bbb20bc8ff8a91a9656452a97139d60.zip | |
Correctly define `select' binding on Android
* lisp/term/android-win.el (input-decode-map): Cease binding
select in the initial frame's input-decode-map.
* src/androidterm.c (android_term_init): Binding select in the
freshly created kboard.
(syms_of_androidterm) <Qselect, Qreturn>: New symbols.
Diffstat (limited to 'src/androidterm.c')
| -rw-r--r-- | src/androidterm.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/androidterm.c b/src/androidterm.c index 94a115a66a6..f98da97eeba 100644 --- a/src/androidterm.c +++ b/src/androidterm.c | |||
| @@ -33,6 +33,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 33 | #include "textconv.h" | 33 | #include "textconv.h" |
| 34 | #include "coding.h" | 34 | #include "coding.h" |
| 35 | #include "pdumper.h" | 35 | #include "pdumper.h" |
| 36 | #include "keymap.h" | ||
| 36 | 37 | ||
| 37 | /* This is a chain of structures for all the X displays currently in | 38 | /* This is a chain of structures for all the X displays currently in |
| 38 | use. */ | 39 | use. */ |
| @@ -6641,7 +6642,7 @@ android_term_init (void) | |||
| 6641 | dpyinfo->resx = android_pixel_density_x; | 6642 | dpyinfo->resx = android_pixel_density_x; |
| 6642 | dpyinfo->resy = android_pixel_density_y; | 6643 | dpyinfo->resy = android_pixel_density_y; |
| 6643 | dpyinfo->font_resolution = android_scaled_pixel_density; | 6644 | dpyinfo->font_resolution = android_scaled_pixel_density; |
| 6644 | #endif /* ANDROID_STUBIFY */ | 6645 | #endif /* !ANDROID_STUBIFY */ |
| 6645 | 6646 | ||
| 6646 | /* https://lists.gnu.org/r/emacs-devel/2015-11/msg00194.html */ | 6647 | /* https://lists.gnu.org/r/emacs-devel/2015-11/msg00194.html */ |
| 6647 | dpyinfo->smallest_font_height = 1; | 6648 | dpyinfo->smallest_font_height = 1; |
| @@ -6679,7 +6680,13 @@ android_term_init (void) | |||
| 6679 | #ifndef ANDROID_STUBIFY | 6680 | #ifndef ANDROID_STUBIFY |
| 6680 | sem_init (&edit_sem, false, 0); | 6681 | sem_init (&edit_sem, false, 0); |
| 6681 | register_textconv_interface (&text_conversion_interface); | 6682 | register_textconv_interface (&text_conversion_interface); |
| 6682 | #endif | 6683 | #endif /* !ANDROID_STUBIFY */ |
| 6684 | |||
| 6685 | /* Binding certain key events in the terminal's `input-decode-map', | ||
| 6686 | which being keyboard-local is not accessible from any point in | ||
| 6687 | android-win.el. */ | ||
| 6688 | Fdefine_key (KVAR (terminal->kboard, Vinput_decode_map), | ||
| 6689 | make_vector (1, Qselect), Qreturn, Qnil); | ||
| 6683 | } | 6690 | } |
| 6684 | 6691 | ||
| 6685 | 6692 | ||
| @@ -6907,6 +6914,10 @@ for instance, `early-init.el', or they will be of no effect. */); | |||
| 6907 | Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier)); | 6914 | Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier)); |
| 6908 | DEFSYM (Qsuper, "super"); | 6915 | DEFSYM (Qsuper, "super"); |
| 6909 | Fput (Qsuper, Qmodifier_value, make_fixnum (super_modifier)); | 6916 | Fput (Qsuper, Qmodifier_value, make_fixnum (super_modifier)); |
| 6917 | |||
| 6918 | /* Key symbols. */ | ||
| 6919 | DEFSYM (Qselect, "select"); | ||
| 6920 | DEFSYM (Qreturn, "return"); | ||
| 6910 | } | 6921 | } |
| 6911 | 6922 | ||
| 6912 | void | 6923 | void |