X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fkeycode.h;h=acbe5c320fb1acbbe24cc640eb25275a37e1165d;hb=2e5e6a69bc007d5cdb1a3a0a39f9db8abd883ecd;hp=fc66dc0efcb5759c4812f905effd8ae62ffa3ac1;hpb=070a6be63808cdb6c4ec9e12ad708718cfdc3dfb;p=max%2Ftmk_keyboard.git
diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h
index fc66dc0e..acbe5c32 100644
--- a/tmk_core/common/keycode.h
+++ b/tmk_core/common/keycode.h
@@ -25,7 +25,14 @@ along with this program. If not, see .
#define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED)
#define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF)
+
+#ifndef ACTIONMAP_ENABLE
#define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL)
+#else
+#define IS_KEY(code) ((KC_A <= (code) && (code) <= KC_EXSEL) || \
+ (KC_KP_00 <= (code) && (code) <= KC_KP_HEXADECIMAL))
+#endif
+
#define IS_MOD(code) (KC_LCTRL <= (code) && (code) <= KC_RGUI)
@@ -85,15 +92,19 @@ along with this program. If not, see .
#define KC_LCAP KC_LOCKING_CAPS
#define KC_LNUM KC_LOCKING_NUM
#define KC_LSCR KC_LOCKING_SCROLL
-#define KC_ERAS KC_ALT_ERASE,
+#define KC_ERAS KC_ALT_ERASE
#define KC_CLR KC_CLEAR
/* Japanese specific */
#define KC_ZKHK KC_GRAVE
#define KC_RO KC_INT1
#define KC_KANA KC_INT2
#define KC_JYEN KC_INT3
+#define KC_JPY KC_INT3
#define KC_HENK KC_INT4
#define KC_MHEN KC_INT5
+/* Korean specific */
+#define KC_HAEN KC_LANG1
+#define KC_HANJ KC_LANG2
/* Keypad */
#define KC_P1 KC_KP_1
#define KC_P2 KC_KP_2
@@ -105,6 +116,8 @@ along with this program. If not, see .
#define KC_P8 KC_KP_8
#define KC_P9 KC_KP_9
#define KC_P0 KC_KP_0
+#define KC_P00 KC_KP_00
+#define KC_P000 KC_KP_000
#define KC_PDOT KC_KP_DOT
#define KC_PCMM KC_KP_COMMA
#define KC_PSLS KC_KP_SLASH
@@ -113,6 +126,11 @@ along with this program. If not, see .
#define KC_PPLS KC_KP_PLUS
#define KC_PEQL KC_KP_EQUAL
#define KC_PENT KC_KP_ENTER
+/* Unix function key */
+#define KC_EXEC KC_EXECUTE
+#define KC_SLCT KC_SELECT
+#define KC_AGIN KC_AGAIN
+#define KC_PSTE KC_PASTE
/* Mousekey */
#define KC_MS_U KC_MS_UP
#define KC_MS_D KC_MS_DOWN
@@ -144,8 +162,8 @@ along with this program. If not, see .
#define KC_MRWD KC_MEDIA_REWIND
#define KC_MSTP KC_MEDIA_STOP
#define KC_MPLY KC_MEDIA_PLAY_PAUSE
-#define KC_MSEL KC_MEDIA_SELECT
#define KC_EJCT KC_MEDIA_EJECT
+#define KC_MSEL KC_MEDIA_SELECT
#define KC_MAIL KC_MAIL
#define KC_CALC KC_CALCULATOR
#define KC_MYCM KC_MY_COMPUTER
@@ -156,6 +174,8 @@ along with this program. If not, see .
#define KC_WSTP KC_WWW_STOP
#define KC_WREF KC_WWW_REFRESH
#define KC_WFAV KC_WWW_FAVORITES
+/* Jump to bootloader */
+#define KC_BTLD KC_BOOTLOADER
/* Transparent */
#define KC_TRANSPARENT 1
#define KC_TRNS KC_TRANSPARENT
@@ -168,7 +188,7 @@ enum hid_keyboard_keypad_usage {
KC_ROLL_OVER,
KC_POST_FAIL,
KC_UNDEFINED,
- KC_A,
+ KC_A, /* 0x04 */
KC_B,
KC_C,
KC_D,
@@ -330,10 +350,7 @@ enum hid_keyboard_keypad_usage {
KC_CRSEL,
KC_EXSEL, /* 0xA4 */
- /* NOTE: 0xA5-DF are used for internal special purpose */
-
-#if 0
- /* NOTE: Following codes(0xB0-DD) are not used. Leave them for reference. */
+ /* NOTE: Following code range(0xB0-DD) are shared with special codes of 8-bit keymap */
KC_KP_00 = 0xB0,
KC_KP_000,
KC_THOUSANDS_SEPARATOR,
@@ -380,7 +397,6 @@ enum hid_keyboard_keypad_usage {
KC_KP_OCTAL,
KC_KP_DECIMAL,
KC_KP_HEXADECIMAL, /* 0xDD */
-#endif
/* Modifiers */
KC_LCTRL = 0xE0,
@@ -390,13 +406,11 @@ enum hid_keyboard_keypad_usage {
KC_RCTRL,
KC_RSHIFT,
KC_RALT,
- KC_RGUI,
-
- /* NOTE: 0xE8-FF are used for internal special purpose */
+ KC_RGUI, /* 0xE7 */
};
-/* Special keycodes */
-/* NOTE: 0xA5-DF and 0xE8-FF are used for internal special purpose */
+/* Special keycodes for 8-bit keymap
+ NOTE: 0xA5-DF and 0xE8-FF are used for internal special purpose */
enum internal_special_keycodes {
/* System Control */
KC_SYSTEM_POWER = 0xA5,
@@ -409,10 +423,12 @@ enum internal_special_keycodes {
KC_AUDIO_VOL_DOWN,
KC_MEDIA_NEXT_TRACK,
KC_MEDIA_PREV_TRACK,
+ KC_MEDIA_FAST_FORWARD,
+ KC_MEDIA_REWIND,
KC_MEDIA_STOP,
KC_MEDIA_PLAY_PAUSE,
- KC_MEDIA_SELECT,
KC_MEDIA_EJECT,
+ KC_MEDIA_SELECT,
KC_MAIL,
KC_CALCULATOR,
KC_MY_COMPUTER,
@@ -422,9 +438,10 @@ enum internal_special_keycodes {
KC_WWW_FORWARD,
KC_WWW_STOP,
KC_WWW_REFRESH,
- KC_WWW_FAVORITES,
- KC_MEDIA_FAST_FORWARD,
- KC_MEDIA_REWIND, /* 0xBC */
+ KC_WWW_FAVORITES, /* 0xBC */
+
+ /* Jump to bootloader */
+ KC_BOOTLOADER = 0xBF,
/* Fn key */
KC_FN0 = 0xC0,