From 297ccd967f24e37bc51c057da43c862291a55ddd Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 30 Aug 2023 10:07:49 +0800 Subject: 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) : New defvar. --- java/org/gnu/emacs/EmacsNative.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/org/gnu/emacs/EmacsNative.java') diff --git a/java/org/gnu/emacs/EmacsNative.java b/java/org/gnu/emacs/EmacsNative.java index fae0ba98f86..a4b45aafbc1 100644 --- a/java/org/gnu/emacs/EmacsNative.java +++ b/java/org/gnu/emacs/EmacsNative.java @@ -196,6 +196,10 @@ public final class EmacsNative KEYCODE_VOLUME_MUTE should be forwarded to Emacs. */ public static native boolean shouldForwardMultimediaButtons (); + /* Return whether KEYCODE_SPACE combined with META_CTRL_MASK should + be prevented from reaching the system input method. */ + public static native boolean shouldForwardCtrlSpace (); + /* Initialize the current thread, by blocking signals that do not interest it. */ public static native void setupSystemThread (); -- cgit v1.3