From: Po Lu Date: Sun, 12 Mar 2023 03:06:47 +0000 (+0800) Subject: Add Super modifier support to Android port X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b0abc50218696b7b5db6589d73c49fdb64b3e289;p=emacs.git 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. --- 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 *);