[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android b0abc502186 5/5: Add Super modifier support to Android p
From: |
Po Lu |
Subject: |
feature/android b0abc502186 5/5: Add Super modifier support to Android port |
Date: |
Sat, 11 Mar 2023 22:07:03 -0500 (EST) |
branch: feature/android
commit b0abc50218696b7b5db6589d73c49fdb64b3e289
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Add Super modifier support to Android port
* src/androidgui.h (enum android_modifier_mask): New modifier
ANDROID_SUPER_MASK.
* src/androidterm.c (android_android_to_emacs_modifiers)
(android_emacs_to_android_modifiers): Add new modifier.
---
src/androidgui.h | 1 +
src/androidterm.c | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/androidgui.h b/src/androidgui.h
index b918d03ceca..0e311b629c6 100644
--- a/src/androidgui.h
+++ b/src/androidgui.h
@@ -247,6 +247,7 @@ enum android_modifier_mask
ANDROID_SHIFT_MASK = 193,
ANDROID_CONTROL_MASK = 4096,
ANDROID_ALT_MASK = 2,
+ ANDROID_SUPER_MASK = 4,
};
struct android_key_event
diff --git a/src/androidterm.c b/src/androidterm.c
index 019b84bf391..397971e3c87 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -362,7 +362,8 @@ android_android_to_emacs_modifiers (struct
android_display_info *dpyinfo,
{
return ((state & ANDROID_CONTROL_MASK) ? ctrl_modifier : 0
| (state & ANDROID_SHIFT_MASK) ? shift_modifier : 0
- | (state & ANDROID_ALT_MASK) ? meta_modifier : 0);
+ | (state & ANDROID_ALT_MASK) ? meta_modifier : 0
+ | (state & ANDROID_SUPER_MASK) ? super_modifier : 0);
}
static int
@@ -371,7 +372,8 @@ android_emacs_to_android_modifiers (struct
android_display_info *dpyinfo,
{
return ((state & ctrl_modifier) ? ANDROID_CONTROL_MASK : 0
| (state & shift_modifier) ? ANDROID_SHIFT_MASK : 0
- | (state & meta_modifier) ? ANDROID_ALT_MASK : 0);
+ | (state & meta_modifier) ? ANDROID_ALT_MASK : 0
+ | (state & super_modifier) ? ANDROID_SUPER_MASK : 0);
}
static void android_frame_rehighlight (struct android_display_info *);