diff options
author | tmk <nobody@nowhere> | 2013-02-11 12:48:49 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-02-11 12:48:49 +0900 |
commit | 8c80deb775ac151001dc1592a2e94e8677b49964 (patch) | |
tree | aa62c5cbef8419d9cdded26440cfdb42f7d806fd /common/keycode.h | |
parent | 4701b08b71b187cb3d015bec7e05d30e35c344ac (diff) | |
parent | 39d093339393e1758eede06f736b1f99a68ac74c (diff) | |
download | qmk_firmware-8c80deb775ac151001dc1592a2e94e8677b49964.tar.gz |
Merge branch 'keymap2'
Conflicts:
common/keyboard.c
Diffstat (limited to 'common/keycode.h')
-rw-r--r-- | common/keycode.h | 55 |
1 files changed, 41 insertions, 14 deletions
diff --git a/common/keycode.h b/common/keycode.h index f9331cdbf..4f57a5887 100644 --- a/common/keycode.h +++ b/common/keycode.h @@ -28,14 +28,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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_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_MOUSEKEY_ACCEL(code) (KC_MS_ACCEL0 <= (code) && (code) <= KC_MS_ACCEL2) -#define IS_SPECIAL(code) ((0xB0 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) +#define IS_SPECIAL(code) ((0xA5 <= (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) @@ -43,6 +43,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MOD_INDEX(code) ((code) & 0x07) #define FN_BIT(code) (1<<FN_INDEX(code)) #define FN_INDEX(code) ((code) - KC_FN0) +#define FN_MIN KC_FN0 +#define FN_MAX KC_FN31 /* @@ -388,11 +390,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, @@ -408,21 +409,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, /* 0xB9 */ - /* 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, |