X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=common%2Fkeycode.h;h=08c3cbf42b55e6b34b9138e8e852b8384a21e5e0;hb=77e946432e22382ad1bae8da05af87611006efab;hp=4ed78a46a6a5f2877020747a7d14531b10140de4;hpb=373ab0e7192811944786c095facb80938c33f1d5;p=max%2Ftmk_keyboard.git
diff --git a/common/keycode.h b/common/keycode.h
index 4ed78a46..08c3cbf4 100644
--- a/common/keycode.h
+++ b/common/keycode.h
@@ -28,20 +28,23 @@ along with this program. If not, see .
#define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL)
#define IS_MOD(code) (KC_LCTRL <= (code) && (code) <= KC_RGUI)
-#define IS_FN(code) (KC_FN0 <= (code) && (code) <= KC_FN7)
-#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_WH_RIGHT)
+
+#define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF))
+#define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE)
+#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_WFAV)
+#define IS_FN(code) (KC_FN0 <= (code) && (code) <= KC_FN31)
+#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2)
#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT)
#define IS_MOUSEKEY_BUTTON(code) (KC_MS_BTN1 <= (code) && (code) <= KC_MS_BTN5)
#define IS_MOUSEKEY_WHEEL(code) (KC_MS_WH_UP <= (code) && (code) <= KC_MS_WH_RIGHT)
-
-#define IS_SPECIAL(code) ((0xB0 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF))
-#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_WFAV)
-#define IS_SYSTEM(code) (KC_POWER <= (code) && (code) <= KC_WAKE)
+#define IS_MOUSEKEY_ACCEL(code) (KC_MS_ACCEL0 <= (code) && (code) <= KC_MS_ACCEL2)
#define MOD_BIT(code) (1<.
#define KC_DEL KC_DELETE
#define KC_INS KC_INSERT
#define KC_CAPS KC_CAPSLOCK
+#define KC_CLCK KC_CAPSLOCK
#define KC_RGHT KC_RIGHT
#define KC_PGDN KC_PGDOWN
#define KC_PSCR KC_PSCREEN
-#define KC_SLCK KC_SCKLOCK
+#define KC_SLCK KC_SCROLLLOCK
#define KC_PAUS KC_PAUSE
#define KC_BRK KC_PAUSE
#define KC_NLCK KC_NUMLOCK
@@ -78,6 +82,9 @@ along with this program. If not, see .
#define KC_APP KC_APPLICATION
#define KC_NUHS KC_NONUS_HASH
#define KC_NUBS KC_NONUS_BSLASH
+#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_CLR KC_CLEAR
/* Japanese specific */
@@ -120,6 +127,9 @@ along with this program. If not, see .
#define KC_WH_D KC_MS_WH_DOWN
#define KC_WH_L KC_MS_WH_LEFT
#define KC_WH_R KC_MS_WH_RIGHT
+#define KC_ACL0 KC_MS_ACCEL0
+#define KC_ACL1 KC_MS_ACCEL1
+#define KC_ACL2 KC_MS_ACCEL2
/* Sytem Control */
#define KC_PWR KC_SYSTEM_POWER
#define KC_SLEP KC_SYSTEM_SLEEP
@@ -133,6 +143,7 @@ along with this program. If not, see .
#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_MAIL KC_MAIL
#define KC_CALC KC_CALCULATOR
#define KC_MYCM KC_MY_COMPUTER
@@ -143,6 +154,10 @@ 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
+/* Transparent */
+#define KC_TRANSPARENT 1
+#define KC_TRNS KC_TRANSPARENT
+
/* USB HID Keyboard/Keypad Usage(0x07) */
@@ -218,7 +233,7 @@ enum hid_keyboard_keypad_usage {
KC_F11,
KC_F12,
KC_PSCREEN,
- KC_SCKLOCK,
+ KC_SCROLLLOCK,
KC_PAUSE,
KC_INSERT,
KC_HOME,
@@ -384,11 +399,10 @@ enum internal_special_keycodes {
/* System Control */
KC_SYSTEM_POWER = 0xA5,
KC_SYSTEM_SLEEP,
- KC_SYSTEM_WAKE, /* 0xA7 */
- /* 0xA8-AF */
+ KC_SYSTEM_WAKE,
- /* Consumer Page */
- KC_AUDIO_MUTE = 0xB0,
+ /* Media Control */
+ KC_AUDIO_MUTE,
KC_AUDIO_VOL_UP,
KC_AUDIO_VOL_DOWN,
KC_MEDIA_NEXT_TRACK,
@@ -396,6 +410,7 @@ enum internal_special_keycodes {
KC_MEDIA_STOP,
KC_MEDIA_PLAY_PAUSE,
KC_MEDIA_SELECT,
+ KC_MEDIA_EJECT,
KC_MAIL,
KC_CALCULATOR,
KC_MY_COMPUTER,
@@ -404,21 +419,47 @@ enum internal_special_keycodes {
KC_WWW_BACK,
KC_WWW_FORWARD,
KC_WWW_STOP,
- KC_WWW_REFRESH, /* 0xC0 */
- KC_WWW_FAVORITES, /* 0xC1 */
- /* 0xC2-DF vacant for future use */
+ KC_WWW_REFRESH,
+ KC_WWW_FAVORITES, /* 0xBA */
- /* 0xE0-E7 for Modifiers. DO NOT USE. */
-
- /* Layer Switching */
- KC_FN0 = 0xE8,
+ /* Fn key */
+ KC_FN0 = 0xC0,
KC_FN1,
KC_FN2,
KC_FN3,
KC_FN4,
KC_FN5,
KC_FN6,
- KC_FN7, /* 0xEF */
+ KC_FN7,
+ KC_FN8,
+ KC_FN9,
+ KC_FN10,
+ KC_FN11,
+ KC_FN12,
+ KC_FN13,
+ KC_FN14,
+ KC_FN15,
+
+ KC_FN16 = 0xD0,
+ KC_FN17,
+ KC_FN18,
+ KC_FN19,
+ KC_FN20,
+ KC_FN21,
+ KC_FN22,
+ KC_FN23,
+ KC_FN24,
+ KC_FN25,
+ KC_FN26,
+ KC_FN27,
+ KC_FN28,
+ KC_FN29,
+ KC_FN30,
+ KC_FN31, /* 0xDF */
+
+ /**************************************/
+ /* 0xE0-E7 for Modifiers. DO NOT USE. */
+ /**************************************/
/* Mousekey */
KC_MS_UP = 0xF0,
@@ -429,13 +470,16 @@ enum internal_special_keycodes {
KC_MS_BTN2,
KC_MS_BTN3,
KC_MS_BTN4,
- KC_MS_BTN5,
+ KC_MS_BTN5, /* 0xF8 */
/* Mousekey wheel */
KC_MS_WH_UP,
KC_MS_WH_DOWN,
KC_MS_WH_LEFT,
KC_MS_WH_RIGHT, /* 0xFC */
- /* 0xFD-FF vacant for future use */
+ /* Mousekey accel */
+ KC_MS_ACCEL0,
+ KC_MS_ACCEL1,
+ KC_MS_ACCEL2 /* 0xFF */
};
#endif /* KEYCODE_H */