aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidterm.c
diff options
context:
space:
mode:
authorPo Lu2024-04-27 10:47:12 +0800
committerPo Lu2024-04-27 10:47:12 +0800
commitdb8f7ed7f652c114e606de423e5094b4cefe49e2 (patch)
tree2ba2fd002786db7599f9efac0c8965b13f0c54e2 /src/androidterm.c
parent763eaa5a324ff51dddad32d725ec8d416597d6d5 (diff)
downloademacs-db8f7ed7f652c114e606de423e5094b4cefe49e2.tar.gz
emacs-db8f7ed7f652c114e606de423e5094b4cefe49e2.zip
Enable customization of the quit key on Android
* doc/emacs/android.texi (Android Windowing): * doc/emacs/input.texi (On-Screen Keyboards): Document various tidbits related to the quit key. * java/org/gnu/emacs/EmacsNative.java (getQuitKeycode): New function. * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Rename `lastVolumeButtonRelease' to `lastQuitKeyRelease'. (onKeyUp): Treat value returned by getQuitKeycode as the quit key rather than mandate KEYCODE_VOLUME_DOWN. * src/android.c (getQuitKeycode): Implement new function. * src/androidterm.c (syms_of_androidterm) <android_quit_keycode>: New variable.
Diffstat (limited to 'src/androidterm.c')
-rw-r--r--src/androidterm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/androidterm.c b/src/androidterm.c
index e4f3abdb2d3..5de7b6f4e14 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -6703,6 +6703,22 @@ so it is important to limit the wait.
6703If set to a non-float value, there will be no wait at all. */); 6703If set to a non-float value, there will be no wait at all. */);
6704 Vandroid_wait_for_event_timeout = make_float (0.1); 6704 Vandroid_wait_for_event_timeout = make_float (0.1);
6705 6705
6706 DEFVAR_INT ("android-quit-keycode", android_quit_keycode,
6707 doc: /* Keycode that signals quit when typed twice in rapid succession.
6708
6709This is the key code of a key whose repeated activation should prompt
6710Emacs to quit, enabling quitting on systems where a keyboard capable of
6711typing C-g is unavailable, when set to a key that does exist on the
6712device. Its value must be a keycode defined by the operating system,
6713and defaults to 25 (KEYCODE_VOLUME_DOWN), though one of the following
6714values might be desired on those devices where this default is also
6715unavailable, or if another key must otherwise serve this function
6716instead:
6717
6718 - 4 (KEYCODE_BACK)
6719 - 24 (KEYCODE_VOLUME_UP) */);
6720 android_quit_keycode = 25;
6721
6706 DEFVAR_BOOL ("x-use-underline-position-properties", 6722 DEFVAR_BOOL ("x-use-underline-position-properties",
6707 x_use_underline_position_properties, 6723 x_use_underline_position_properties,
6708 doc: /* SKIP: real doc in xterm.c. */); 6724 doc: /* SKIP: real doc in xterm.c. */);