Cleaned uppersonal userspace and keymaps (#1998)
* Cleanup of keymaps * Remove Tap Dance from Orthodox keymap * Cleaned up userspace and keymaps * Added sample (template)userspace files to my folder
This commit is contained in:
parent
4df4fa7c26
commit
0533362e82
14 changed files with 219 additions and 147 deletions
|
@ -225,7 +225,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_OVERWATCH),
|
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_OVERWATCH),
|
||||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||||
ALT_T(KC_APP), KC_LEAD,
|
ALT_T(KC_APP), KC_LGUI,
|
||||||
KC_HOME,
|
KC_HOME,
|
||||||
KC_SPC,KC_BSPC,KC_END,
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
// right hand
|
// right hand
|
||||||
|
@ -234,7 +234,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||||
TG(_OVERWATCH),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
TG(_OVERWATCH),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||||
KC_LALT, CTL_T(KC_ESC),
|
KC_RGUI, CTL_T(KC_ESC),
|
||||||
KC_PGUP,
|
KC_PGUP,
|
||||||
KC_PGDN,KC_DELETE, KC_ENT
|
KC_PGDN,KC_DELETE, KC_ENT
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
MIDI_ENABLE = no
|
|
||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
|
|
||||||
EXTRAFLAGS = -flto
|
EXTRAFLAGS = -flto
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLED_NUM 7 // Number of LEDs
|
#define RGBLED_NUM 14 // Number of LEDs
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
#define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
#define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
#define RGBLIGHT_VAL_STEP 12
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
|
|
@ -47,10 +47,10 @@ bool check_dtimer(uint8_t dtimer) {
|
||||||
|
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
enum {
|
enum {
|
||||||
TD_DIABLO_1 = 0,
|
TD_D3_1 = 0,
|
||||||
TD_DIABLO_2,
|
TD_D3_2,
|
||||||
TD_DIABLO_3,
|
TD_D3_3,
|
||||||
TD_DIABLO_4
|
TD_D3_4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,10 +89,10 @@ void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
//Tap Dance Definitions
|
//Tap Dance Definitions
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
// tap once to disable, and more to enable timed micros
|
// tap once to disable, and more to enable timed micros
|
||||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
[TD_D3_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
[TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
[TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||||
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
[TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_ESC, _______, _______, _______,\
|
KC_ESC, _______, _______, _______,\
|
||||||
KC_S, KC_F, KC_I, KC_M, \
|
KC_S, KC_F, KC_I, KC_M, \
|
||||||
KC_1, KC_2, KC_3, KC_4, \
|
KC_1, KC_2, KC_3, KC_4, \
|
||||||
TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), \
|
TD(TD_D3_1), TD(TD_D3_2), TD(TD_D3_3), TD(TD_D3_4), \
|
||||||
_______, KC_DIABLO_CLEAR, KC_Q, SFT_T(KC_SPACE) \
|
_______, KC_DIABLO_CLEAR, KC_Q, SFT_T(KC_SPACE) \
|
||||||
),
|
),
|
||||||
#else
|
#else
|
||||||
|
@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_OVERWATCH, _______, _______, XXXXXXX,\
|
KC_OVERWATCH, _______, _______, XXXXXXX,\
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_JUSTGAME, \
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_JUSTGAME, \
|
||||||
KC_SYMM, KC_DOOMFIST, KC_TORB, KC_GOODGAME, \
|
KC_SYMM, KC_TORB, XXXXXXX, KC_GOODGAME, \
|
||||||
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_GLHF \
|
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_GLHF \
|
||||||
),
|
),
|
||||||
[_MEDIA] = KEYMAP( /* Base */
|
[_MEDIA] = KEYMAP( /* Base */
|
||||||
|
@ -226,7 +226,7 @@ void matrix_init_keymap(void) {
|
||||||
|
|
||||||
void matrix_scan_keymap(void) {
|
void matrix_scan_keymap(void) {
|
||||||
numlock_led_off();
|
numlock_led_off();
|
||||||
if (is_overwatch && biton32(layer_state) == _MACROS) {
|
if ((is_overwatch && biton32(layer_state) == _MACROS) || (biton32(layer_state) == _NAV)) {
|
||||||
numlock_led_on();
|
numlock_led_on();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
MIDI_ENABLE = no
|
MIDI_ENABLE = no
|
||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
|
||||||
EXTRAFLAGS = -flto
|
EXTRAFLAGS = -flto
|
||||||
|
|
||||||
|
|
|
@ -61,5 +61,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define C6_AUDIO
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,11 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "orthodox.h"
|
#include "orthodox.h"
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
#include "drashna.h"
|
#include "drashna.h"
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
@ -36,38 +33,6 @@ extern keymap_config_t keymap_config;
|
||||||
#define XXXXXXX KC_NO
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
|
||||||
#ifdef TAP_DANCE_ENABLE
|
|
||||||
enum {
|
|
||||||
TD_FLSH = 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// on the fourth tap, set the keyboard on flash state
|
|
||||||
// and set the underglow to red, because red == bad
|
|
||||||
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count >= 4) {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_mode(1);
|
|
||||||
rgblight_setrgb(0xff, 0x00, 0x00);
|
|
||||||
#endif
|
|
||||||
reset_tap_dance(state);
|
|
||||||
reset_keyboard();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Tap Dance Definitions
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
//Once for Blue, Twice for Green, Thrice for Red, and four to flash
|
|
||||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_flsh_finished, NULL),
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = KEYMAP(\
|
[_QWERTY] = KEYMAP(\
|
||||||
|
@ -106,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
),
|
),
|
||||||
|
|
||||||
[_ADJUST] = KEYMAP(\
|
[_ADJUST] = KEYMAP(\
|
||||||
KC_MAKE, KC_RESET, TD(TD_FLSH), _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
|
||||||
)
|
)
|
||||||
|
@ -114,8 +79,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef FAUXCLICKY_ENABLE
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A4, 0.0625); // (_D4, 0.25);
|
||||||
return true;
|
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A4, 0.0625); // (_C4, 0.125);
|
||||||
}
|
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 0.25); // (_C4, 0.25);
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
FAUXCLICKY_ENABLE = no
|
FAUXCLICKY_ENABLE = yes
|
||||||
EXTRAFLAGS = -flto
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
include ../../../../Makefile
|
include ../../../../Makefile
|
||||||
|
|
|
@ -38,10 +38,10 @@ bool check_dtimer(uint8_t dtimer) {
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TD_DIABLO_1 = 0,
|
TD_D3_1 = 0,
|
||||||
TD_DIABLO_2,
|
TD_D3_2,
|
||||||
TD_DIABLO_3,
|
TD_D3_3,
|
||||||
TD_DIABLO_4
|
TD_D3_4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,10 +80,10 @@ void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
//Tap Dance Definitions
|
//Tap Dance Definitions
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
// tap once to disable, and more to enable timed micros
|
// tap once to disable, and more to enable timed micros
|
||||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
[TD_D3_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
[TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
[TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||||
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
[TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -92,33 +92,33 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_NUMLOCK] = KEYMAP(
|
[_NUMLOCK] = KEYMAP(
|
||||||
LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
MEDIA, KC_CALC, COVECUBE,KC_P7, KC_P8, KC_P9, KC_PAST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
MEDIA, KC_CALC, COVECUBE, KC_P7, KC_P8, KC_P9, KC_PAST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_P00, KC_PDOT, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
KC_LEFT, KC_DOWN, K C_RGHT, KC_P0, KC_KP_00,KC_PDOT, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
||||||
),
|
),
|
||||||
|
|
||||||
[_DIABLO] = KEYMAP(
|
[_DIABLO] = KEYMAP(
|
||||||
KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_DIABLO_CLEAR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_LCTL, TD(TD_D3_1), TD(TD_D3_2), TD(TD_D3_3), TD(TD_D3_4), KC_Z, KC_DIABLO_CLEAR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_LALT, KC_F4, KC_F5, KC_F8, KC_F9, KC_F10, SFT_T(KC_SPACE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
KC_LALT, KC_F4, KC_F5, KC_F8, KC_F9, KC_F10, SFT_T(KC_SPACE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
||||||
),
|
),
|
||||||
|
|
||||||
[_OVERWATCH] = KEYMAP( // Game pad layout designed primarily for Overwatch
|
[_OVERWATCH] = KEYMAP( // Game pad layout designed primarily for Overwatch
|
||||||
LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MACROS] = KEYMAP(
|
[_MACROS] = KEYMAP(
|
||||||
LMACRO, XXXXXXX, GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
LMACRO, XXXXXXX, GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_SYMM, KC_TORB, KC_DOOMFIST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_GLHF, KC_GOODGAME, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
KC_GLHF, KC_GOODGAME, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
// Add reconfigurable functions here, for keymap customization
|
||||||
|
// This allows for a global, userspace functions, and continued
|
||||||
|
// customization of the keymap. Use _keymap instead of _user
|
||||||
|
// functions in the keymaps
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
void matrix_init_keymap(void) {}
|
void matrix_init_keymap(void) {}
|
||||||
|
|
||||||
|
@ -13,8 +17,15 @@ __attribute__ ((weak))
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
__attribute__ ((weak))
|
||||||
|
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_overwatch = false;
|
||||||
|
|
||||||
|
// Call user matrix init, set default RGB colors and then
|
||||||
|
// call the keymap's init function
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
uint8_t default_layer = eeconfig_read_default_layer();
|
uint8_t default_layer = eeconfig_read_default_layer();
|
||||||
|
@ -44,6 +55,8 @@ void matrix_init_user(void) {
|
||||||
matrix_init_keymap();
|
matrix_init_keymap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No global matrix scan code, so just run keymap's matix
|
||||||
|
// scan function
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
matrix_scan_keymap();
|
matrix_scan_keymap();
|
||||||
}
|
}
|
||||||
|
@ -61,16 +74,10 @@ void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
default_layer_set(default_layer);
|
default_layer_set(default_layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Defines actions tor my global custom keycodes. Defined in drashna.h file
|
||||||
|
// Then runs the _keymap's recod handier if not processed here
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
uint16_t kc;
|
|
||||||
if (is_overwatch) {
|
|
||||||
kc = KC_BSPC;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
kc = KC_ENTER;
|
|
||||||
}
|
|
||||||
#ifdef CONSOLE_ENABLE
|
#ifdef CONSOLE_ENABLE
|
||||||
xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed);
|
xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
#endif
|
#endif
|
||||||
|
@ -143,6 +150,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
#if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_ergodox_ez))
|
||||||
case KC_OVERWATCH:
|
case KC_OVERWATCH:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
is_overwatch = !is_overwatch;
|
is_overwatch = !is_overwatch;
|
||||||
|
@ -154,8 +162,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_SALT:
|
case KC_SALT:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("Salt, salt, salt...");
|
SEND_STRING("Salt, salt, salt...");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
|
@ -165,8 +173,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_MORESALT:
|
case KC_MORESALT:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("Please sir, can I have some more salt?!");
|
SEND_STRING("Please sir, can I have some more salt?!");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
|
@ -176,10 +184,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_SALTHARD:
|
case KC_SALTHARD:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("Your salt only makes my penis that much harder, and even more aggressive!");
|
SEND_STRING("Your salt only makes me harder, and even more aggressive!");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
unregister_code(KC_ENTER);
|
unregister_code(KC_ENTER);
|
||||||
}
|
}
|
||||||
|
@ -187,8 +195,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_GOODGAME:
|
case KC_GOODGAME:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("Good game, everyone!");
|
SEND_STRING("Good game, everyone!");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
|
@ -198,8 +206,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_GLHF:
|
case KC_GLHF:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("Good luck, have fun!!!");
|
SEND_STRING("Good luck, have fun!!!");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
|
@ -209,8 +217,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_SYMM:
|
case KC_SYMM:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("Left click to win!");
|
SEND_STRING("Left click to win!");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
|
@ -218,21 +226,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case KC_DOOMFIST:
|
|
||||||
if (!record->event.pressed) {
|
|
||||||
register_code(kc);
|
|
||||||
unregister_code(kc);
|
|
||||||
_delay_ms(50);
|
|
||||||
SEND_STRING("Hey, look at me. I'm Doomfist, and I'm overpowered! All I do is spam punches all day! I'm DPS, tank and defense, rolled into one! All I need is team healing to be complete!");
|
|
||||||
register_code(KC_ENTER);
|
|
||||||
unregister_code(KC_ENTER);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case KC_JUSTGAME:
|
case KC_JUSTGAME:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.");
|
SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
|
@ -242,8 +239,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_TORB:
|
case KC_TORB:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("That was positively riveting!");
|
SEND_STRING("That was positively riveting!");
|
||||||
register_code(KC_ENTER);
|
register_code(KC_ENTER);
|
||||||
|
@ -253,8 +250,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case KC_AIM:
|
case KC_AIM:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
register_code(kc);
|
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
unregister_code(kc);
|
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER));
|
SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER));
|
||||||
_delay_ms(50);
|
_delay_ms(50);
|
||||||
|
@ -262,13 +259,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case KC_MAKE:
|
case KC_MAKE:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
|
||||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP " RGBLIGHT_ENABLE=yes" SS_TAP(X_ENTER));
|
#ifndef CATERINA_BOOTLOADER
|
||||||
|
SEND_STRING(":teensy ");
|
||||||
#else
|
#else
|
||||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP " RGBLIGHT_ENABLE=no"SS_TAP(X_ENTER));
|
SEND_STRING(" ");
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
SEND_STRING("RGBLIGHT_ENABLE=yes ");
|
||||||
|
#else
|
||||||
|
SEND_STRING("RGBLIGHT_ENABLE=no ");
|
||||||
|
#endif
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
SEND_STRING("AUDIO_ENABLE=yes ");
|
||||||
|
#else
|
||||||
|
SEND_STRING("AUDIO_ENABLE=no ");
|
||||||
|
#endif
|
||||||
|
#ifdef FAUXCLICKY_ENABLE
|
||||||
|
SEND_STRING("FAUXCLICKY_ENABLE=yes ");
|
||||||
|
#else
|
||||||
|
SEND_STRING("FAUXCLICKY_ENABLE=no ");
|
||||||
|
#endif
|
||||||
|
SEND_STRING(SS_TAP(X_ENTER));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -295,21 +310,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case KC_P00:
|
|
||||||
if (!record->event.pressed) {
|
|
||||||
register_code(KC_P0);
|
|
||||||
unregister_code(KC_P0);
|
|
||||||
register_code(KC_P0);
|
|
||||||
unregister_code(KC_P0);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return process_record_keymap(keycode, record);
|
return process_record_keymap(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Runs state check and changes underglow color and animation
|
||||||
uint32_t layer_state_set_kb(uint32_t state) {
|
// on layer change, no matter where the change was initiated
|
||||||
|
// Then runs keymap's layer change check
|
||||||
|
uint32_t layer_state_set_user (uint32_t state) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
uint8_t default_layer = eeconfig_read_default_layer();
|
uint8_t default_layer = eeconfig_read_default_layer();
|
||||||
|
|
||||||
|
@ -329,7 +337,6 @@ uint32_t layer_state_set_kb(uint32_t state) {
|
||||||
case _MACROS:
|
case _MACROS:
|
||||||
rgblight_set_orange;
|
rgblight_set_orange;
|
||||||
is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
|
is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
|
||||||
rgblight_mode(18);
|
|
||||||
break;
|
break;
|
||||||
case _MEDIA:
|
case _MEDIA:
|
||||||
rgblight_set_green;
|
rgblight_set_green;
|
||||||
|
@ -375,5 +382,5 @@ uint32_t layer_state_set_kb(uint32_t state) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return state;
|
return layer_state_set_keymap (state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,7 @@
|
||||||
#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
|
#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__attribute__ ((weak))
|
extern bool is_overwatch;
|
||||||
bool is_overwatch = false;
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||||
|
@ -59,15 +58,13 @@ enum custom_keycodes {
|
||||||
KC_SALTHARD,
|
KC_SALTHARD,
|
||||||
KC_GOODGAME,
|
KC_GOODGAME,
|
||||||
KC_SYMM,
|
KC_SYMM,
|
||||||
KC_DOOMFIST,
|
|
||||||
KC_JUSTGAME,
|
KC_JUSTGAME,
|
||||||
KC_GLHF,
|
KC_GLHF,
|
||||||
KC_TORB,
|
KC_TORB,
|
||||||
KC_AIM,
|
KC_AIM,
|
||||||
KC_MAKE,
|
KC_MAKE,
|
||||||
KC_RESET,
|
KC_RESET,
|
||||||
KC_P00,
|
NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes
|
||||||
NEWPLACEHOLDER
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
|
||||||
SRC += drashna.c
|
SRC += drashna.c
|
||||||
|
EXTRAFLAGS = -flto
|
||||||
|
|
82
users/drashna/template.c
Normal file
82
users/drashna/template.c
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
#include "drashna.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
#include "action.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
// Add reconfigurable functions here, for keymap customization
|
||||||
|
// This allows for a global, userspace functions, and continued
|
||||||
|
// customization of the keymap. Use _keymap instead of _user
|
||||||
|
// functions in the keymaps
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
__attribute__ ((weak))
|
||||||
|
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call user matrix init, then call the keymap's init function
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
matrix_init_keymap();
|
||||||
|
}
|
||||||
|
|
||||||
|
// No global matrix scan code, so just run keymap's matix
|
||||||
|
// scan function
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
matrix_scan_keymap();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Defines actions tor my global custom keycodes. Defined in drashna.h file
|
||||||
|
// Then runs the _keymap's recod handier if not processed here,
|
||||||
|
// And use "NEWPLACEHOLDER" for new safe range
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_MAKE:
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
|
||||||
|
#ifndef CATERINA_BOOTLOADER
|
||||||
|
SEND_STRING(":teensy ");
|
||||||
|
#else
|
||||||
|
SEND_STRING(" ");
|
||||||
|
#endif
|
||||||
|
SEND_STRING(SS_TAP(X_ENTER));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case KC_RESET:
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
reset_keyboard();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EPRM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case VRSN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return process_record_keymap(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs state check and changes underglow color and animation
|
||||||
|
// on layer change, no matter where the change was initiated
|
||||||
|
// Then runs keymap's layer change check
|
||||||
|
uint32_t layer_state_set_user (uint32_t state) {
|
||||||
|
return layer_state_set_keymap (state);
|
||||||
|
}
|
18
users/drashna/template.h
Normal file
18
users/drashna/template.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef USERSPACE
|
||||||
|
#define USERSPACE
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// Define layer names
|
||||||
|
#define BASE 0
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||||
|
EPRM,
|
||||||
|
VRSN,
|
||||||
|
KC_MAKE,
|
||||||
|
KC_RESET,
|
||||||
|
NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in a new issue