From 6795e8fc0e2f72a729457595919743cc75b07a5e Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 10 Jan 2022 14:44:28 +0900 Subject: [PATCH] core: Add keycode MACE and MACJ for macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mac key 英数(eisuu) and かな(kana) send usage LANG2(0x91) and LANG1(0x90) respectively, and macOS uses them for English-Japanese input switching. This gives the usages aliase as MACE and MACJ. https://github.com/tmk/tmk_keyboard/wiki/FAQ-Keymap#japanese-jis-keys --- tmk_core/common/actionmap.h | 11 +++++++++++ tmk_core/common/keycode.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/tmk_core/common/actionmap.h b/tmk_core/common/actionmap.h index c8f9c38d..6fe2614e 100644 --- a/tmk_core/common/actionmap.h +++ b/tmk_core/common/actionmap.h @@ -353,8 +353,14 @@ along with this program. If not, see . #define AC_RO ACTION_KEY(KC_INT1) #define AC_KANA ACTION_KEY(KC_INT2) #define AC_JYEN ACTION_KEY(KC_INT3) +#define AC_JPY ACTION_KEY(KC_INT3) #define AC_HENK ACTION_KEY(KC_INT4) #define AC_MHEN ACTION_KEY(KC_INT5) +#define AC_MACJ ACTION_KEY(KC_LANG1) +#define AC_MACE ACTION_KEY(KC_LANG2) +/* Korean specific */ +#define AC_HAEN ACTION_KEY(KC_LANG1) +#define AC_HANJ ACTION_KEY(KC_LANG2) /* Keypad */ #define AC_P1 ACTION_KEY(KC_KP_1) #define AC_P2 ACTION_KEY(KC_KP_2) @@ -376,6 +382,11 @@ along with this program. If not, see . #define AC_PPLS ACTION_KEY(KC_KP_PLUS) #define AC_PEQL ACTION_KEY(KC_KP_EQUAL) #define AC_PENT ACTION_KEY(KC_KP_ENTER) +/* Unix function key */ +#define AC_EXEC ACTION_KEY(KC_EXECUTE) +#define AC_SLCT ACTION_KEY(KC_SELECT) +#define AC_AGIN ACTION_KEY(KC_AGAIN) +#define AC_PSTE ACTION_KEY(KC_PASTE) /* Mousekey */ #define AC_MS_U ACTION_MOUSEKEY(KC_MS_UP) #define AC_MS_D ACTION_MOUSEKEY(KC_MS_DOWN) diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index 7ed711a4..edf28da7 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -103,6 +103,8 @@ along with this program. If not, see . #define KC_JPY KC_INT3 #define KC_HENK KC_INT4 #define KC_MHEN KC_INT5 +#define KC_MACJ KC_LANG1 +#define KC_MACE KC_LANG2 /* Korean specific */ #define KC_HAEN KC_LANG1 #define KC_HANJ KC_LANG2