2019-01-14 17:09:47 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "quantum.h"
|
2019-05-06 15:41:45 +00:00
|
|
|
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
|
|
|
#include "rgb.h"
|
2019-02-11 21:41:51 +00:00
|
|
|
#endif
|
2019-01-14 17:09:47 +00:00
|
|
|
#ifdef TAP_DANCE_ENABLE
|
2019-05-06 15:41:45 +00:00
|
|
|
#include "tap_dance.h"
|
2019-01-14 17:09:47 +00:00
|
|
|
#endif
|
2019-02-11 22:21:41 +00:00
|
|
|
#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE)
|
2019-05-06 15:41:45 +00:00
|
|
|
#include "unicode.h"
|
2019-01-14 17:09:47 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef LAYER_FN
|
2019-05-06 15:41:45 +00:00
|
|
|
#define FN MO(L_FN)
|
2019-09-03 15:42:05 +00:00
|
|
|
#define FNLK TG(L_FN)
|
2019-05-06 15:41:45 +00:00
|
|
|
#define FN_CAPS LT(L_FN, KC_CAPS)
|
|
|
|
#define FN_ESC LT(L_FN, KC_ESC)
|
|
|
|
#define FN_FNLK TT(L_FN)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef LAYER_NUMPAD
|
|
|
|
#define NUMPAD TG(L_NUMPAD)
|
2019-01-14 17:09:47 +00:00
|
|
|
#endif
|
|
|
|
|
2019-09-03 15:42:05 +00:00
|
|
|
#define BREAK LCTL(KC_PAUS)
|
|
|
|
#define SYSRQ LALT(KC_PSCR)
|
2019-02-22 23:47:42 +00:00
|
|
|
|
2019-01-14 17:09:47 +00:00
|
|
|
#define MV_UP LCTL(KC_UP)
|
|
|
|
#define MV_DOWN LCTL(KC_DOWN)
|
|
|
|
#define MV_LEFT LCTL(KC_LEFT)
|
|
|
|
#define MV_RGHT LCTL(KC_RGHT)
|
|
|
|
#define TOP LCTL(KC_HOME)
|
|
|
|
#define BOTTOM LCTL(KC_END)
|
2019-05-06 15:41:45 +00:00
|
|
|
#define TAB_PRV LCTL(KC_PGUP)
|
|
|
|
#define TAB_NXT LCTL(KC_PGDN)
|
|
|
|
#define DEL_PRV LCTL(KC_BSPC)
|
|
|
|
#define DEL_NXT LCTL(KC_DEL)
|
2019-01-14 17:09:47 +00:00
|
|
|
|
2019-01-28 08:04:47 +00:00
|
|
|
#define DST_ADD LCTL(LGUI(KC_D))
|
2019-01-28 23:37:10 +00:00
|
|
|
#define DST_REM LCTL(LGUI(KC_F4))
|
2019-01-28 08:04:47 +00:00
|
|
|
#define DST_PRV LCTL(LGUI(KC_LEFT))
|
|
|
|
#define DST_NXT LCTL(LGUI(KC_RGHT))
|
2019-01-28 08:05:35 +00:00
|
|
|
#ifndef DST_MOD_MASK
|
2019-05-06 15:41:45 +00:00
|
|
|
#define DST_MOD_MASK MOD_MASK_SHIFT
|
2019-01-28 08:05:35 +00:00
|
|
|
#endif
|
2019-01-28 08:04:47 +00:00
|
|
|
|
2019-01-14 17:09:47 +00:00
|
|
|
#define LCT_CPS LCTL_T(KC_CAPS)
|
2019-10-02 23:46:27 +00:00
|
|
|
#define RSF_SLS RSFT_T(KC_SLSH)
|
2019-01-14 17:09:47 +00:00
|
|
|
|
2019-07-25 19:31:40 +00:00
|
|
|
#define IS_LAYER_ON_STATE(state, layer) ( (state) & (1UL << (layer)))
|
|
|
|
#define IS_LAYER_OFF_STATE(state, layer) (~(state) & (1UL << (layer)))
|
|
|
|
|
|
|
|
// Clear mods, perform action, restore mods
|
|
|
|
#define CLEAN_MODS(action) { \
|
|
|
|
uint8_t mods = get_mods(); \
|
|
|
|
clear_mods(); \
|
|
|
|
action; \
|
|
|
|
set_mods(mods); \
|
|
|
|
}
|
2019-01-27 16:46:54 +00:00
|
|
|
|
2019-01-14 17:09:47 +00:00
|
|
|
enum keycodes_user {
|
2019-05-06 15:41:45 +00:00
|
|
|
CLEAR = SAFE_RANGE,
|
|
|
|
DST_P_R,
|
|
|
|
DST_N_A,
|
2019-01-14 17:09:47 +00:00
|
|
|
|
2019-05-06 15:41:45 +00:00
|
|
|
RANGE_KEYMAP,
|
2019-01-14 17:09:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum layers_user {
|
2019-05-06 15:41:45 +00:00
|
|
|
L_BASE,
|
2019-01-14 17:09:47 +00:00
|
|
|
#ifdef LAYER_FN
|
2019-05-06 15:41:45 +00:00
|
|
|
L_FN,
|
2019-01-14 17:09:47 +00:00
|
|
|
#endif
|
|
|
|
#ifdef LAYER_NUMPAD
|
2019-05-06 15:41:45 +00:00
|
|
|
L_NUMPAD,
|
2019-01-14 17:09:47 +00:00
|
|
|
#endif
|
|
|
|
|
2019-05-06 15:41:45 +00:00
|
|
|
L_RANGE_KEYMAP,
|
2019-01-14 17:09:47 +00:00
|
|
|
};
|
|
|
|
|
2019-02-16 17:03:59 +00:00
|
|
|
void keyboard_pre_init_keymap(void);
|
|
|
|
void eeconfig_init_keymap(void);
|
|
|
|
void keyboard_post_init_keymap(void);
|
|
|
|
|
2019-07-25 19:31:40 +00:00
|
|
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
2019-01-14 17:09:47 +00:00
|
|
|
uint32_t layer_state_set_keymap(uint32_t state);
|
2019-07-25 19:31:40 +00:00
|
|
|
void led_set_keymap(uint8_t usb_led);
|
2020-04-09 16:54:19 +00:00
|
|
|
bool led_update_keymap(led_t led_state);
|