summaryrefslogtreecommitdiff
path: root/src/androidfns.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-08-30 10:07:49 +0800
committerPo Lu <luangruo@yahoo.com>2023-08-30 10:07:49 +0800
commit297ccd967f24e37bc51c057da43c862291a55ddd (patch)
tree35c7bca464ae2fbf23c46176a698483937ddd51d /src/androidfns.c
parent2909ef8d3d73518525ce6a8a3e4f984575300f3b (diff)
downloademacs-297ccd967f24e37bc51c057da43c862291a55ddd.tar.gz
Facilitate typing `C-SPC' on Android
* doc/emacs/android.texi (Android Windowing): Mention C-SPC interception and how it may be disabled. * java/org/gnu/emacs/EmacsNative.java (shouldForwardCtrlSpace): New function. * java/org/gnu/emacs/EmacsView.java (onKeyPreIme): New function. If the provided key code is SPC and the event's modifier key mask contains ControlMask, relay it directly to onKeyDown. * java/org/gnu/emacs/EmacsWindow.java (eventModifiers): Export and make static. * src/android.c (shouldForwardCtrlSpace): New function. * src/androidfns.c (syms_of_androidfns) <android_intercept_control_space>: New defvar.
Diffstat (limited to 'src/androidfns.c')
-rw-r--r--src/androidfns.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/androidfns.c b/src/androidfns.c
index 9e8372f524b..51421f0a68a 100644
--- a/src/androidfns.c
+++ b/src/androidfns.c
@@ -3205,6 +3205,19 @@ Note that if you set this, you will no longer be able to quit Emacs
using the volume down button. */);
android_pass_multimedia_buttons_to_system = false;
+ DEFVAR_BOOL ("android-intercept-control-space",
+ android_intercept_control_space,
+ doc: /* Whether Emacs should intercept C-SPC.
+When this variable is set, Emacs intercepts C-SPC events as they are
+delivered to a frame before they are registered and filtered by the
+input method.
+
+For no apparent purpose, Android input methods customarily discard SPC
+events with the Ctrl modifier set without delivering them to Emacs
+afterwards, which is an impediment to typing key sequences
+incorporating such keys. */);
+ android_intercept_control_space = true;
+
DEFVAR_BOOL ("android-use-exec-loader", android_use_exec_loader,
doc: /* Whether or not to bypass system restrictions on program execution.