aboutsummaryrefslogtreecommitdiff
path: root/keyboards/hub16/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/hub16/keymaps/default/keymap.c')
-rwxr-xr-xkeyboards/hub16/keymaps/default/keymap.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/keyboards/hub16/keymaps/default/keymap.c b/keyboards/hub16/keymaps/default/keymap.c
index a77c8bc78..2d12dba0d 100755
--- a/keyboards/hub16/keymaps/default/keymap.c
+++ b/keyboards/hub16/keymaps/default/keymap.c
@@ -18,16 +18,22 @@
18// Function key we are 'wrapping' usual key presses in 18// Function key we are 'wrapping' usual key presses in
19#define KC_WRAP KC_F24 19#define KC_WRAP KC_F24
20 20
21// Keyboard Layers
22enum keyboard_layers{
23 _BASE = 0,
24 _CONTROL
25};
26
21// Tap Dance Declarations 27// Tap Dance Declarations
22enum { TD_TO_LED = 0, TD_TO_DEFAULT = 1 }; 28enum tap_dance { TD_TO_LED = 0, TD_TO_DEFAULT = 1 };
23 29
24qk_tap_dance_action_t tap_dance_actions[] = { 30qk_tap_dance_action_t tap_dance_actions[] = {
25 // Tap once for HID, twice to toggle layer 1 31 // Tap once for standard key, twice to toggle to control layer
26 [TD_TO_LED] = ACTION_TAP_DANCE_DUAL_ROLE(_______, 1), 32 [TD_TO_LED] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _CONTROL),
27 [TD_TO_DEFAULT] = ACTION_TAP_DANCE_DUAL_ROLE(_______, 0)}; 33 [TD_TO_DEFAULT] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _BASE)};
28 34
29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30 [0] = LAYOUT( /* Base */ 36 [_BASE] = LAYOUT( /* Base */
31 KC_S, KC_V, 37 KC_S, KC_V,
32 KC_A, KC_B, KC_C, KC_D, 38 KC_A, KC_B, KC_C, KC_D,
33 KC_E, KC_F, KC_G, KC_H, 39 KC_E, KC_F, KC_G, KC_H,
@@ -35,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35 KC_M, KC_N, KC_O, TD(TD_TO_LED) 41 KC_M, KC_N, KC_O, TD(TD_TO_LED)
36 ), 42 ),
37 43
38 [1] = LAYOUT( /* LED Control */ 44 [_CONTROL] = LAYOUT( /* LED Control */
39 KC_NO, KC_NO, 45 KC_NO, KC_NO,
40 _______, RGB_MOD, RGB_RMOD, RGB_TOG, 46 _______, RGB_MOD, RGB_RMOD, RGB_TOG,
41 RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, 47 RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI,
@@ -72,7 +78,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
72 78
73// Below stolen from TaranVH (https://github.com/TaranVH/2nd-keyboard/blob/master/HASU_USB/F24/keymap.c) 79// Below stolen from TaranVH (https://github.com/TaranVH/2nd-keyboard/blob/master/HASU_USB/F24/keymap.c)
74// Shoutout to drashna on the QMK discord for basically writing this for me.... :P 80// Shoutout to drashna on the QMK discord for basically writing this for me.... :P
75
76bool process_record_user(uint16_t keycode, keyrecord_t *record) { 81bool process_record_user(uint16_t keycode, keyrecord_t *record) {
77 static uint8_t f24_tracker; 82 static uint8_t f24_tracker;
78 switch (keycode) { 83 switch (keycode) {