X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quantum%2Fkeymap.h;h=98ddfd0c533e4bda998e879e271fb1f41e141999;hb=387b94a6cf0f32dd0ff72e7ff09495e69cccd1fc;hp=6ac3d2ace6f54b75bfe8acd03ef76a38c465cef5;hpb=1a0bac8bccf0e156d2f3c5f14a7214f9677b6370;p=qmk_firmware.git diff --git a/quantum/keymap.h b/quantum/keymap.h index 6ac3d2ace..98ddfd0c5 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -21,7 +21,9 @@ along with this program. If not, see . #include #include #include "action.h" +#if defined(__AVR__) #include +#endif #include "keycode.h" #include "action_macro.h" #include "report.h" @@ -30,12 +32,15 @@ along with this program. If not, see . #include "debug.h" #include "keycode_config.h" +// ChibiOS uses RESET in its FlagStatus enumeration +// Therefore define it as QK_RESET here, to avoid name collision +#if defined(PROTOCOL_CHIBIOS) +#define RESET QK_RESET +#endif + /* translates key to keycode */ uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint16_t keycode); - extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; extern const uint16_t fn_actions[]; @@ -77,6 +82,8 @@ enum quantum_keycodes { #endif QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x6FFF, + QK_TAP_DANCE = 0x7100, + QK_TAP_DANCE_MAX = 0x71FF, #ifdef UNICODE_ENABLE QK_UNICODE = 0x8000, QK_UNICODE_MAX = 0xFFFF, @@ -104,6 +111,7 @@ enum quantum_keycodes { MAGIC_UNSWAP_BACKSLASH_BACKSPACE, MAGIC_UNHOST_NKRO, MAGIC_UNSWAP_ALT_GUI, + MAGIC_TOGGLE_NKRO, // Leader key #ifndef DISABLE_LEADER @@ -125,8 +133,8 @@ enum quantum_keycodes { MUV_DE, // Midi mode on/off - MI_ON, - MI_OFF, + MIDI_ON, + MIDI_OFF, // Backlight functionality BL_0, @@ -150,11 +158,24 @@ enum quantum_keycodes { BL_TOGG, BL_STEP, + // RGB functionality + RGB_TOG, + RGB_MOD, + RGB_HUI, + RGB_HUD, + RGB_SAI, + RGB_SAD, + RGB_VAI, + RGB_VAD, + // Left shift, open paren KC_LSPO, // Right shift, close paren - KC_RSPC + KC_RSPC, + + // always leave at the end + SAFE_RANGE }; // Ability to use mods in layouts @@ -266,6 +287,9 @@ enum quantum_keycodes { #define BL_ON BL_9 #define BL_OFF BL_0 +#define MI_ON MIDI_ON +#define MI_OFF MIDI_OFF + // GOTO layer - 16 layers max // when: // ON_PRESS = 1 @@ -286,7 +310,7 @@ enum quantum_keycodes { #define OSL(layer) (layer | QK_ONE_SHOT_LAYER) // One-shot mod -#define OSM(layer) (layer | QK_ONE_SHOT_MOD) +#define OSM(mod) (mod | QK_ONE_SHOT_MOD) // M-od, T-ap - 256 keycode max #define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8))