diff options
| author | Po Lu | 2024-04-27 10:47:12 +0800 |
|---|---|---|
| committer | Po Lu | 2024-04-27 10:47:12 +0800 |
| commit | db8f7ed7f652c114e606de423e5094b4cefe49e2 (patch) | |
| tree | 2ba2fd002786db7599f9efac0c8965b13f0c54e2 /src/android.c | |
| parent | 763eaa5a324ff51dddad32d725ec8d416597d6d5 (diff) | |
| download | emacs-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/android.c')
| -rw-r--r-- | src/android.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/android.c b/src/android.c index e44b58c5973..00a77fc398d 100644 --- a/src/android.c +++ b/src/android.c | |||
| @@ -2645,6 +2645,13 @@ NATIVE_NAME (shouldForwardMultimediaButtons) (JNIEnv *env, | |||
| 2645 | return !android_pass_multimedia_buttons_to_system; | 2645 | return !android_pass_multimedia_buttons_to_system; |
| 2646 | } | 2646 | } |
| 2647 | 2647 | ||
| 2648 | JNIEXPORT jint JNICALL | ||
| 2649 | NATIVE_NAME (getQuitKeycode) (JNIEnv *env, jobject object) | ||
| 2650 | { | ||
| 2651 | /* Likewise. */ | ||
| 2652 | return (jint) android_quit_keycode; | ||
| 2653 | } | ||
| 2654 | |||
| 2648 | JNIEXPORT jboolean JNICALL | 2655 | JNIEXPORT jboolean JNICALL |
| 2649 | NATIVE_NAME (shouldForwardCtrlSpace) (JNIEnv *env, jobject object) | 2656 | NATIVE_NAME (shouldForwardCtrlSpace) (JNIEnv *env, jobject object) |
| 2650 | { | 2657 | { |