diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2019-05-22 16:07:48 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2019-05-22 16:07:48 +0200 |
commit | 351c98fad880ead66a6331657c67ab1d3f2924a7 (patch) | |
tree | a85969e87117aa195333070dd73a4f5dfe0e9bcb /keyboards/ergodox_ez/keymaps | |
parent | 6206231ae62248f30f8b99063052a15966487860 (diff) |
Commonly typed bits layer
Diffstat (limited to 'keyboards/ergodox_ez/keymaps')
-rw-r--r-- | keyboards/ergodox_ez/keymaps/jworthe/config.h | 123 | ||||
-rw-r--r-- | keyboards/ergodox_ez/keymaps/jworthe/keymap.c | 125 |
2 files changed, 179 insertions, 69 deletions
diff --git a/keyboards/ergodox_ez/keymaps/jworthe/config.h b/keyboards/ergodox_ez/keymaps/jworthe/config.h new file mode 100644 index 0000000000..23ae36c89f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/jworthe/config.h @@ -0,0 +1,123 @@ +#ifndef ERGODOX_EZ_JWORTHE_CONFIG_H +#define ERGODOX_EZ_JWORTHE_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoDox EZ +#define PRODUCT ErgoDox EZ +#define DESCRIPTION QMK keyboard firmware for Ergodox EZ + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 6 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +// #define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#ifndef LED_BRIGHTNESS_LO +#define LED_BRIGHTNESS_LO 15 +#endif +#ifndef LED_BRIGHTNESS_HI +#define LED_BRIGHTNESS_HI 255 +#endif +#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_HI) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 15 // Number of LEDs +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 255 +#define RGBLIGHT_VAL_STEP 12 + +/* fix space cadet rollover issue */ +#define DISABLE_SPACE_CADET_ROLLOVER + +#define RGBW_BB_TWI + +#define RGBW 1 + +/* + * The debounce filtering reports a key/switch change directly, + * without any extra delay. After that the debounce logic will filter + * all further changes, until the key/switch reports the same state for + * the given count of scans. + * So a perfect switch will get a short debounce period and + * a bad key will get a much longer debounce period. + * The result is an adaptive debouncing period for each switch. + * + * If you don't define it here, the matrix code will default to + * 5, which is now closer to 10ms, but still plenty according to + * manufacturer specs. + */ + +#define USB_MAX_POWER_CONSUMPTION 500 + +// RGB backlight +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 24 +#define DRIVER_2_LED_TOTAL 24 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + +// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF +/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ +/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */ +/* #define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00 */ +/* #define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00 */ +/* #define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF */ +/* #define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF */ +/* #define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF */ + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE + + +#endif diff --git a/keyboards/ergodox_ez/keymaps/jworthe/keymap.c b/keyboards/ergodox_ez/keymaps/jworthe/keymap.c index bc4397fea0..fe197633fa 100644 --- a/keyboards/ergodox_ez/keymaps/jworthe/keymap.c +++ b/keyboards/ergodox_ez/keymaps/jworthe/keymap.c @@ -1,58 +1,59 @@ #include QMK_KEYBOARD_H #include "version.h" +#undef IGNORE_MOD_TAP_INTERRUPT + #define BASE 0 // default layer #define SYMB 1 // symbols #define MDIA 2 // media keys +#define TEXT 3 // common strings enum custom_keycodes { - UP = SAFE_RANGE, - DOWN, - LEFT, - RIGHT + EMAIL1 = SAFE_RANGE, + EMAIL2, + EMAIL3, + TESTPW, + KINDRG }; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case EMAIL1: + SEND_STRING("justin@worthe-it.co.za"); + return false; + case EMAIL2: + SEND_STRING("justin.worthe@gmail.com"); + return false; + case EMAIL3: + SEND_STRING("justin@jemstep.com"); + return false; + case TESTPW: + SEND_STRING("1qaz!QAZ"); + return false; + case KINDRG: + SEND_STRING("Kind regards," SS_TAP(X_ENTER) "Justin Wernick"); + return false; + } + } + return true; +} + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ~ | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -[BASE] = LAYOUT_ergodox( - // left hand - KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - MO(SYMB), KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_LCTRL, KC_LGUI, KC_LALT, MO(SYMB), KC_RGHT, - KC_DELT, KC_LGUI, - KC_HOME, - KC_SPC, KC_BSPC, KC_END, - // right hand - KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, - MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN, KC_RALT, KC_RGUI, KC_RCTRL, - KC_LEFT, KC_RIGHT, - KC_UP, - KC_DOWN, KC_TAB, KC_ENT + + +[BASE] = LAYOUT_ergodox_pretty( + +KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, TT(TEXT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, +KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, +MO(SYMB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, +KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, +KC_LCTRL, KC_LGUI, KC_LALT, MO(SYMB), KC_RGHT, KC_UP, KC_DOWN, KC_RALT, KC_RGUI, KC_RCTRL, + + KC_DELT, KC_LGUI, KC_LEFT, KC_RIGHT, + KC_HOME, KC_UP, + KC_SPC, KC_BSPC, KC_END, KC_DOWN, KC_TAB, KC_ENT + ), /* Keymap 1: Symbol Layer * @@ -136,33 +137,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK ), -}; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { +[TEXT] = LAYOUT_ergodox_pretty( + KC_TRNS, EMAIL1, EMAIL2, EMAIL3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, TESTPW, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KINDRG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - case UP: - { - if (keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) { - if (record->event.pressed) { - unregister_code(KC_LSFT); - register_code(KC_PGUP); - register_code(KC_LSFT); - } else { - unregister_code(KC_PGUP); - } - } else { - if (record->event.pressed) { - register_code(KC_UP); - } else { - unregister_code(KC_UP); - } - } - return false; - } - } - return true; -} + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +}; // Runs just one time when the keyboard initializes. void matrix_init_user(void) { |