diff options
-rw-r--r-- | keyboard/planck/keymaps/cbbrowne/keymap.c | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/keyboard/planck/keymaps/cbbrowne/keymap.c b/keyboard/planck/keymaps/cbbrowne/keymap.c index bd09f65c8..03bea940f 100644 --- a/keyboard/planck/keymaps/cbbrowne/keymap.c +++ b/keyboard/planck/keymaps/cbbrowne/keymap.c @@ -44,6 +44,15 @@ - What's the keystroke to get from X to console these days? - I do indeed want a sweet number pad! - A layer for doing console switching would not be a bad idea + - Random data generator + - A key that generates values in the range 0-9 at random + - A key that generates values in the range a-z at random + - A key that generates values in the range a-z,A-Z,0-9 at random + + - Figure out the MACRO example in https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md + - section 2.3.2 + - where does the HELLO come from??? + - What are the types of the T() calls? */ enum layers { @@ -96,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TRNS, DF(_KP), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_KP] = { /* Key Pad */ - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_KP_ENTER, KC_KP_PLUS, KC_KP_PLUS, KC_KP_ENTER, KC_KP_ENTER}, + {KC_ESC, M(1), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_KP_ENTER, KC_KP_PLUS, KC_KP_PLUS, KC_KP_ENTER, KC_KP_ENTER}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_KP_MINUS, KC_7, KC_8, KC_9, KC_KP_DOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_KP_PLUS, KC_4, KC_5, KC_6, KC_0}, {BL_STEP, M(0), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QW), KC_1, KC_2, KC_3, KC_0} @@ -118,7 +127,6 @@ enum macro_id { M_USERNAME }; - const uint16_t PROGMEM fn_actions[] = { }; @@ -126,17 +134,22 @@ const uint16_t PROGMEM fn_actions[] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + } else { + unregister_code(KC_RSFT); + } + break; + case 1: + return (record->event.pressed ? + MACRO( T(C), T(B), T(B), T(R), T(O), T(W), T(N), T(E)) : + MACRO_NONE ); + break; + } + return MACRO_NONE; }; |