diff options
author | Alex Ong <the.onga@gmail.com> | 2019-01-04 19:39:14 +1100 |
---|---|---|
committer | Alex Ong <the.onga@gmail.com> | 2019-01-04 19:39:14 +1100 |
commit | 47c91fc7f75ae0a477e55b687aa0fc30da0a283c (patch) | |
tree | 65ad39452748ff2e6d4a83ce54ede6ca22c9ada9 /keyboards/ergodox_ez/keymaps/hacker_dvorak | |
parent | ac9b88e8ccbbf38762871504cd827ff0d941c426 (diff) | |
parent | 563ce3f225d981ce460c12ca5130dfe47af41df0 (diff) |
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'keyboards/ergodox_ez/keymaps/hacker_dvorak')
22 files changed, 1091 insertions, 0 deletions
diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore b/keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore new file mode 100644 index 0000000000..504afef81f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +package-lock.json diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h new file mode 100644 index 0000000000..e188d95d51 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -0,0 +1,88 @@ +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#pragma once + + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#undef DEBOUNCE +#define DEBOUNCE 10 + +#undef IGNORE_MOD_TAP_INTERRUPT + +#undef FORCE_NKRO +#define FORCE_NKRO + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 5 + +#define LEADER_TIMEOUT 1000 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define QMK_KEYS_PER_SCAN 4 +#define DANCING_TERM 175 + +#define ONESHOT_TAP_TOGGLE 5 +#define ONESHOT_TIMEOUT 5000 + +#define COMBO_COUNT 4 +#define COMBO_TERM 200 + + +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 24 + +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 24 + +#undef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 24 + +#undef RGBLIGHT_BRI_STEP +#define RGBLIGHT_BRI_STEP 24 + +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 + + +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 10 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 15 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 20 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 200 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 20 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 200 + + +// #undef NO_DEBUG +// #define NO_DEBUG + +// #undef NO_PRINT +// #define NO_PRINT + +// #define RETRO_TAPPING +// #define TAPPING_FORCE_HOLD + +// #define AUTO_SHIFT_TIMEOUT 150 +// #define NO_AUTO_SHIFT_SPECIAL +// #define NO_AUTO_SHIFT_NUMERIC +// #define NO_AUTO_SHIFT_ALPHA + +// #define EXTRA_LONG_COMBOS +// #define EXTRA_EXTRA_LONG_COMBOS +// #define COMBO_ALLOW_ACTION_KEYS + +// #define RGBLIGHT_SLEEP diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js new file mode 100644 index 0000000000..23f19d18af --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js @@ -0,0 +1,19 @@ +let gulp = require('gulp'); +let run = require('gulp-run-command').default; + + +gulp.task('clean', run('rm -rf ../../../../.build')); + +gulp.task('build', ['clean'], run('make -C ../../../../ ergodox_ez:hacker_dvorak', { + ignoreErrors: true +})); + +gulp.task('watch', ['build'], () => { + gulp.watch([ + 'keymap.c', + 'config.h', + 'rules.mk', + ], ['build']); +}); + +gulp.task('default', ['watch']); diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c new file mode 100644 index 0000000000..65878a67cb --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c @@ -0,0 +1,353 @@ +// Keyboard keymap: +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DVORAK] = LAYOUT_ergodox( + + // HACKER DVORAK left hand + + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // ESCAPE | | | | | | START RECORDING // + // | | | | | | // + KC_ESC, TD(GRV_TILD), TD(AT_DLR), TD(LCBR_LABK), TD(LPRN_LBRC), TD(EXLM_QUES), DYN_REC_START1, // + // | ~ | $ | < | [ | ? | // + // | TAP DANCE: ` | TAP DANCE: @ TAP DANCE: { | TAP DANCE: ( | TAP DANCE: ! | DYNAMIC MARCO 1 // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // TAB | MOD TAP: ALT+SHIFT | MOD TAP: CTRL+ALT | MOD TAP: CTRL+SHIFT | P | Y | // + // | | | | | | // + KC_TAB, TD(NONE_LEAD), TD(QUOT_DQUO), TD(DOT_COMM), ALL_T(KC_P), MEH_T(KC_Y), DYN_MACRO_PLAY1, // + // | LEAD | " | , | | | // + // | TAP DANCE: NONE | TAP DANCE: ' | TAP DANCE: . | MOD TAP: HYPER | MOD TAP: MEH | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| PLAY DYNAMIC MACRO 1 // + // | MOD TAP: ALT | MOD TAP: CTRL | LAYER TAP: SHIFT | LAYER TAP: ARROW KEYS | MOD TAP: GUI | // + // | | | | Ü | | // + TD(EQL_PLUS), ALT_T(KC_A), CTL_T(KC_O), SFT_T(KC_E), LT(ARROWS, KC_U), LGUI_T(KC_I), //-----------------------// + // + | Á | Ó | É | Ú | Í | // + // TAP DANCE: = | TAP DANCE: A | TAP DANCE: O | TAP DANCE: E | TAP DANCE: U | TAP DANCE: I | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| META // + // STOP RECORDING | MOD TAP: GUI+SHIFT+ALT | Q | J | K | X | // + // | | | | | | // + DYN_REC_STOP, TD(SCLN_COLN), SGUI_T(KC_Q), LT(MEDIA_FN, KC_J), LT(NUMPAD, KC_K), LCAG_T(KC_X), KC_LGUI, // + // | : | | | | | // + // DYNAMIC MACRO | TAP DANCE: ; | MOD TAP: SHIFT+GUI | LAYER TAP: MEDIA/F-KEYS | LAYER TAP: ATM NUMPAD | MOD TAP: CTL+ALT+GUI | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // LAYERS SWITCHER | APPLICATION MENU | | | // + // | | | | SCROLL // + TG(LAYERS), KC_APP, KC_NLCK, KC_SLCK, KC_CAPS, // + // | | | | NUM // + // LAYER TOGGLE | | | | TAP DANCE: CAPS // + //------------------------+-------------------------+-------------------------+-------------------------+------------------------// + + // HACKER DVORAK left thumb + + //------------------------+------------------------// + // MOUSE WHEEL LEFT | MOUSE WHEEL RIGHT // + // | // + KC_WH_L, KC_WH_R, // + // | // + // | // + //-------------------------+-------------------------+------------------------// + // | | HOME // + // | | // + /* SPACE | BACKSPACE */ KC_HOME, // + // | | // + // | | // + KC_SPC, KC_BSPC, //-----------------------// + // | | END // + // | | // + /* | */ KC_END, // + // | | // + // | | // + //-------------------------+-------------------------+------------------------// + + // HACKER DVORAK right hand + + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + DYN_REC_START2, TD(APMR_PIPE), TD(RPRN_RBRC), TD(RCBR_RABK), TD(HASH_PERC), TD(ASTR_CIRC), XXXXXXX, // + // | | | | | | // + // | | | | | | // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + DYN_MACRO_PLAY2, MEH_T(KC_F), ALL_T(KC_G), C_S_T(KC_C), LCA_T(KC_R), LAS_T(KC_L), TD(SLSH_BSLS), // + // | | | | | | // + // | | | | | | // + // |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + /*-----------------------*/ LGUI_T(KC_D), LT(MOUSE, KC_H), SFT_T(KC_T), CTL_T(KC_N), ALT_T(KC_S), TD(MINS_UNDS), // + // | | | | | | // + // | | | | | | // + // |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | | | // + // | | | | | | // + KC_LGUI, LCAG_T(KC_B), LT(HYPER, KC_M), LT(MEDIA_FN, KC_W), SGUI_T(KC_V), LGAS_T(KC_Z), COMPOSE, // + // | | | | | | // + // | | | | | | ⎄ // + //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// + // | | | | // + // | | | | // + KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_SYSREQ, // + // | | | | // + // | | | | // + //------------------------+-------------------------+-------------------------+-------------------------+------------------------// + + // HACKER DVORAK right thumb + + //------------------------+------------------------// + // | // + // | // + KC_WH_U, KC_WH_D, // + // | // + // | // + //------------------------+-------------------------+------------------------// + // | | // + // | | // + KC_PGUP, // | // + // | | // + // | | // + //------------------------| | // + // | | // + // | | // + KC_PGDN, KC_DEL, KC_ENT // + // | | // + // | | // + //------------------------+-------------------------+------------------------// + + ), + + [PLOVER] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN3, GUI_T(KC_NO), + KC_ESC, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN5, PV_NUM, + KC_TAB, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, + KC_CLCK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, + XXXXXXX, TG(LAYERS), PV_NUM, PV_NUM, PV_NUM, + + // left thumb + KC_SPACE, KC_BSPACE, + KC_HOME, + PV_A, PV_O, KC_END, + + // right hand + KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, KC_UP, KC_APPLICATION, XXXXXXX, KC_MS_WH_UP, + PV_NUM, KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_MS_WH_DOWN, + PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, + PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, + PV_NUM, PV_NUM, PV_NUM, PV_NUM, XXXXXXX, + + // right thumb + KC_DELETE, KC_ENTER, + KC_PGUP, + KC_PGDOWN, PV_E, PV_U + ), + + [GAMING] = LAYOUT_ergodox( + // left hand + KC_ESCAPE, GUI_T(KC_MINS), KC_I, KC_O, KC_P, ALGR_T(KC_EQL), KC_T, + KC_TAB, KC_LALT, KC_Q, KC_W, KC_E, ALL_T(KC_R), KC_G, + LT(MOUSE, KC_GRV), KC_LCTRL, KC_A, KC_S, KC_D, MEH_T(KC_F), + KC_BSLS, KC_LSHIFT, KC_Z, KC_X, KC_C, SCMD_T(KC_V), KC_M, + XXXXXXX, TG(LAYERS), KC_COMM, KC_DOT, KC_LBRC, + + // left thumb + MO(MEDIA_FN), KC_NLCK, + KC_SCLN, + KC_SPACE, KC_ENTER, KC_BSPACE, + + // right hand + KC_QUOT, KC_Y, KC_K, KC_U, KC_KP_7, KC_KP_8, KC_KP_9, + KC_MS_WH_UP, KC_H, KC_J, KC_L, KC_KP_4, KC_KP_2, KC_KP_6, + KC_B, KC_MS_UP, KC_N, KC_KP_1, KC_KP_5, KC_KP_3, + KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_UP, KC_KP_0, KC_SLASH, + KC_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, + + // right thumb + KC_MS_BTN5, MO(HYPER), + KC_MS_BTN4, + KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1 + ), + + [ARROWS] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, SCMD_T(KC_NO), MEH_T(KC_NO), ALL_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_LCTRL, KC_LSHIFT, XXXXXXX, _______, XXXXXXX, + XXXXXXX, KC_RALT, KC_LALT, GUI_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // left thumb + XXXXXXX, XXXXXXX, + KC_HOME, + KC_SPACE, KC_BSPACE, KC_END, + + // right hand + LGUI(KC_X), XXXXXXX, LCTL(KC_X), KC_MS_WH_UP, XXXXXXX, XXXXXXX, XXXXXXX, + LGUI(KC_C), XXXXXXX, LCTL(KC_C), KC_UP, SCTL(KC_C), LCTL(KC_Z), LGUI(KC_Z), + KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_APPLICATION, + LGUI(KC_V), XXXXXXX, LCTL(KC_V), KC_MS_WH_DOWN, SCTL(KC_V), LCTL(KC_Y), SGUI(KC_Z), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, + + // right thumb + XXXXXXX, XXXXXXX, + KC_PGUP, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), + + [MOUSE] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_UP, LCTL(KC_X), XXXXXXX, LGUI(KC_X), + LGUI(KC_Z), LCTL(KC_Z), SCTL(KC_C), KC_MS_UP, LCTL(KC_C), KC_MS_BTN4, LGUI(KC_C), + KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_RIGHT, + LGUI(KC_Z), LCTL(KC_Y), SCTL(KC_V), KC_MS_WH_DOWN, LCTL(KC_V), KC_MS_BTN5, LGUI(KC_V), + KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + KC_MS_BTN1, KC_MS_BTN2, XXXXXXX, + + // right hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, ALL_T(KC_NO), MEH_T(KC_NO), SCMD_T(KC_NO), XXXXXXX, + XXXXXXX, _______, KC_MS_ACCEL1, KC_LSHIFT, KC_LCTRL, KC_MS_ACCEL2, + XXXXXXX, XXXXXXX, XXXXXXX, GUI_T(KC_NO), KC_LALT, KC_RALT, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, KC_MS_ACCEL0 + ), + + [NUMPAD] = LAYOUT_ergodox( + // left hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, GUI_T(KC_NO), XXXXXXX, ALL_T(KC_NO), XXXXXXX, XXXXXXX, + _______, KC_LCTRL, KC_LSHIFT, _______, MEH_T(KC_NO), XXXXXXX, + XXXXXXX, KC_RALT, KC_LALT, XXXXXXX, SCMD_T(KC_NO), XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // left thumb + XXXXXXX, XXXXXXX, + KC_HOME, + KC_SPACE, KC_BSPACE, KC_END, + + // right hand + KC_X, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_O, KC_I, KC_1, KC_2, KC_3, KC_SLSH, KC_PERC, + KC_M, KC_4, KC_5, KC_6, KC_PLUS, KC_MINS, + KC_L, KC_J, KC_7, KC_8, KC_9, KC_ASTR, KC_CIRC, + KC_DOT, KC_0, KC_COMM, KC_UNDS, KC_BSLS, + + // right thumb + XXXXXXX, XXXXXXX, + KC_PGUP, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), + + [LAYERS] = LAYOUT_ergodox( + // left hand + 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, + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + + // right hand + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, TO(DVORAK), TO(PLOVER), TO(GAMING), XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + + [MEDIA_FN] = LAYOUT_ergodox( + // left hand + KC_VOLD, KC_MUTE, RGB_TOG, XXXXXXX, KC_MAIL, KC_FIND, KC_WWW_REFRESH, + KC_MPRV, KC_F9, KC_F7, KC_F5, KC_F3, KC_F1, KC_WWW_HOME, + KC_PAUS, KC_F19, KC_F17, KC_F15, KC_F13, KC_F11, + RGB_HUD, XXXXXXX, XXXXXXX, _______, KC_F23, KC_F21, KC_WWW_BACK, + RGB_VAD, KC_CLCK, KC_PSCREEN, XXXXXXX, MO(FIRMWARE), + + // left thumb + _______, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, KC_MEDIA_EJECT, + + // right hand + KC_WWW_FAVORITES, KC_MYCM, KC_CALC, XXXXXXX, RGB_MOD, RGB_M_P, KC_VOLU, + KC_WWW_SEARCH, KC_F2, KC_F4, KC_F6, KC_F8, KC_F10, KC_MNXT, + KC_F12, KC_F14, KC_F16, KC_F18, KC_F20, KC_MPLY, + KC_WWW_FORWARD, KC_F22, KC_F24, _______, XXXXXXX, XXXXXXX, RGB_HUI, + KC_PWR, XXXXXXX, KC_SLEP, KC_WAKE, RGB_VAI, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + RGB_GREEN, XXXXXXX, XXXXXXX + ), + + [HYPER] = LAYOUT_ergodox( + // left hand + XXXXXXX, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), XXXXXXX, + XXXXXXX, HYPR(KC_F6), HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), XXXXXXX, + XXXXXXX, HYPR(KC_F11), HYPR(KC_F12), HYPR(KC_F13), HYPR(KC_F14), HYPR(KC_F15), + XXXXXXX, HYPR(KC_F16), HYPR(KC_F17), HYPR(KC_F18), HYPR(KC_F19), HYPR(KC_F20), XXXXXXX, + XXXXXXX, HYPR(KC_F21), HYPR(KC_F22), HYPR(KC_F23), HYPR(KC_F24), + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + + // right hand + 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, + + // right thumb + XXXXXXX, _______, + XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + + [FIRMWARE] = LAYOUT_ergodox( + + // left hand + 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, _______, + + // left thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + RESET, XXXXXXX, XXXXXXX, + + // right hand + 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, + + // right thumb + XXXXXXX, XXXXXXX, + XXXXXXX, + XXXXXXX, XXXXXXX, EEP_RST + ) +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c new file mode 100644 index 0000000000..e5eba18202 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c @@ -0,0 +1,5 @@ +// Keycode aliases +#define SCTL(kc) LSFT(LCTL(kc)) // Modifier keys: SHIFT+CTRL+kc combination. +#define LGAS_T(kc) MT(MOD_LGUI | MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, GUI+ALT+SHIFT when held. +#define LAS_T(kc) MT(MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, ALT+SHIFT whin held. +#define COMPOSE KC_RALT // Compose key (used to input characters like á, ñ, ü). diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c new file mode 100644 index 0000000000..368062172b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c @@ -0,0 +1,8 @@ +// Define custom user keycodes: +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // Can always be here. + RGB_GREEN, // To set default RGB layer as green once. + MY_CUSTOM_MACRO, // Custom macro example. + MY_OTHER_MACRO, // Custom macro example. + DYNAMIC_MACRO_RANGE // Should always be the last. +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c new file mode 100644 index 0000000000..af06d2bd81 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H // Includes the QMK-verse. +#include "keymap_plover.h" // Includes the Plover keymap for easier readability. + + +// TODO: No eeprom changes unless needed, custom rgb settings for animations. +#include "keycodes/aliases_definitions.c" +#include "layers/layers_definitions.c" +#include "tap_dance/tap_dance_setup.c" +#include "tap_dance/tap_dances.c" +#include "user/matrix_scan_user.c" +#include "tap_dance/mod_tap_layer_dances/none_lead.c" +#include "tap_dance/tap_dance_actions.c" +#include "keycodes/custom_keycodes.c" +#include "dynamic_macro.h" // Includes dynamic macro definitions, needed *after* the custom keycodes. +#include "hacker_dvorak.c" +#include "user/eeconfig_init_user.c" +#include "user/process_record_user.c" +#include "plover/plover_mode.c" +#include "user/layer_set_state_user.c" diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c new file mode 100644 index 0000000000..f190e4f6f9 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c @@ -0,0 +1,12 @@ +enum layers { // Hacker Dvorak keyboard layers: + DVORAK = 0, // * Dvorak base layer. + PLOVER = 1, // * Steno layer for use with Plover. + GAMING = 2, // * Gaming layer intended for general purpose playing. + ARROWS = 3, // * Arrows movement keys and edition shortcuts. + MOUSE = 4, // * Mouse movement keys and edition shortcuts. + NUMPAD = 5, // * ATM style numpad with symbols and letters that should suffice to input any numeric literal. + LAYERS = 6, // * Layer switcher used to change between DVORAK, PLOVER and GAMING layers. + MEDIA_FN = 7, // * Media, RGB and function keys from F1 to F24 in symmetric fashion. + HYPER = 8, // * Hot keys layer (uses hyper + F1 .. F24) suitable for global shortcut tasks. + FIRMWARE = 9 // * Layer with firmware related functionality, like the reset and EEPROM keys. +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_dictionary.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_dictionary.c new file mode 100644 index 0000000000..8d5fa00a7d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_dictionary.c @@ -0,0 +1,14 @@ +LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(TD(APMR_PIPE)) { + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_U); + + unregister_code(KC_U); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + } +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c new file mode 100644 index 0000000000..1e89c4bfca --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c @@ -0,0 +1,14 @@ +LEADER_EXTERNS(); + +void qk_leader_start(void) { + if (!leading) { + leading = true; + leader_time = timer_read(); + leader_sequence_size = 0; + leader_sequence[0] = 0; + leader_sequence[1] = 0; + leader_sequence[2] = 0; + leader_sequence[3] = 0; + leader_sequence[4] = 0; + } +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json b/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json new file mode 100644 index 0000000000..116911e46b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json @@ -0,0 +1,15 @@ +{ + "name": "hacker_dvorak", + "version": "1.0.0", + "description": "Inspired by the [*Programmer Dvorak*](https://www.kaufmann.no/roland/dvorak) keyboard layout, cherry picked ideas from other layouts in the [EZ Repository](https://configure.ergodox-ez.com/search?q=dvorak&legacy=true), a character distribution [heatmap vizualizer](https://run.plnkr.co/plunks/5EEO8nJ2wRzYAfT3), my own subjective use cases and lots of trial and error.", + "main": "gulpfile.js", + "scripts": { + "test": "test" + }, + "author": "SalchiPapa", + "license": "GPL-2.0", + "dependencies": { + "gulp": "^3.9.1", + "gulp-run-command": "0.0.9" + } +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/plover/plover_mode.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/plover/plover_mode.c new file mode 100644 index 0000000000..b388264907 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/plover/plover_mode.c @@ -0,0 +1,20 @@ +// TODO: improve feedback +void plover_toggle(void) { + // Press "PHROLG" + register_code(PV_LP); + register_code(PV_LH); + register_code(PV_LR); + register_code(PV_O); + register_code(PV_RL); + register_code(PV_RG); + + // Release "PHROLG" + unregister_code(PV_LP); + unregister_code(PV_LH); + unregister_code(PV_LR); + unregister_code(PV_O); + unregister_code(PV_RL); + unregister_code(PV_RG); +} + +bool PLOVER_MODE = false; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md b/keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md new file mode 100644 index 0000000000..8089a6d55a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/readme.md @@ -0,0 +1,62 @@ +# [Ergodox EZ Hacker Dvorak Layout](https://configure.ergodox-ez.com/layouts/Wadz/latest/0) + +Inspired by the [*Programmer Dvorak*](https://www.kaufmann.no/roland/dvorak) keyboard layout, cherry picked ideas from other layouts in the [EZ Repository](https://configure.ergodox-ez.com/search?q=dvorak&legacy=true), a character distribution [heatmap vizualizer](https://run.plnkr.co/plunks/5EEO8nJ2wRzYAfT3), my own subjective use cases and lots of trial and error. + +## Setup + +Configure your OS keyboard layout to US, or the keymap will be incorrect. + +## Limitations + +I plan to use [QMK](https://docs.qmk.fm) in the future, in order to overcome some limitations of the Ergodox EZ [graphical configurator](https://configure.ergodox-ez.com/layouts/default/latest/0)), however I will defer that, until more progress is made to the new [configurator](https://medium.com/the-ergo/the-configurator-is-out-of-beta-e107aec80cae). + +## Layers + +1. Dvorak + * US Dvorak layout. + * All symbols (including shifted symbols). + * All modifier are dual keys positioned near the home row. +2. Querty + * Used to overcome the limitation pointed above, when your OS layout is set to Dvorak instead of US, this way you can use + Standard Dvorak (available by default on all the main operating systems) on other normal keybdoards and Hacker Dvorak on + the Ergodox EZ Shine at the same time, without changing back and forth tho OS layout. +3. Gaming + * Still in development. + * Left side is mainly "normal" Qwerty. + * Right side is mainly for movement, either using the mouse, the arrow keys, the number pad or the `H`, `J`, `K`, `L` as direction keys. +4. Arrows + * Arrow keys navigation. + * All modifier keys. + * Common text edititng shortcuts (doesn't work for MacOS). +5. Mouse + * Mouse navigation. + * All modifier keys. + * Common text edititng shortcuts (doesn't work for MacOS). +6. Numpad + * ATM style numpad. + * All modifier keys. + * Letters from `A` to `F` for hexadecimal numbers (`B` is also used for binary numeric literals in most programming + languages, ie. `0b11001`). + * `X` for hexadecimal numeric literals in most programming languages, ie. `0xbeef`. + * `O` for octal numeric literals in most programming languages, ie `0o123`. + * `J` for complex numeric literals in Python, ie. `3j`. + * `I` and `M` for complex Julia numeric literals, ie. `3im`. + * Common symbols for mathematical operations. +7. Hyper Fn + * Useful for custom global shortcuts. +8. Media Fn + * Media keys. + * Function keys. + * EZ Shine keys. +9. Meh Fn + * Useful for custom application shortcuts. +10. Meh Fn + + * Useful for custom standard shortcuts. + +## To Do + +Add images. + +*** + +Please comment below if you have any ideas or suggestions. If you have used this layout or used it as a base, I'd love to hear about your experience! diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk new file mode 100644 index 0000000000..51a9ff0d49 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk @@ -0,0 +1,40 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file + +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes # Mouse keys(+4700b). +EXTRAKEY_ENABLE = yes # Audio control and System control(+450b). +RGBLIGHT_ENABLE = yes +LEADER_ENABLE = yes + +UNICODE_ENABLE = no +COMMAND_ENABLE = no # Commands for debug and configuration +SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard. + + +# This are by default off: +# COMBO_ENABLE = no +# UCIS_ENABLE = no # For Unicode. +# UNICODEMAP_ENABLE = no +# SLEEP_LED_ENABLE = no # Turn off leds when computer is sleeping. +# KEY_LOCK_ENABLE = no # (+1730b) +# CONSOLE_ENABLE = no # Console for debug(+400b) +# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000b) +# API_SYSEX_ENABLE = no +# MIDI_ENABLE = no +# BLUETOOTH_ENABLE = no +# AUDIO_ENABLE = no +# FAUXCLICKY_ENABLE = no +# VARIABLE_TRACE = no +# BACKLIGHT_ENABLE = no +# RGB_MATRIX_ENABLE = no + +# POINTING_DEVICE_ENABLE = no + +# AUTO_SHIFT_ENABLE = no +# AUTO_SHIFT_MODIFIERS = no + +# This don't need argument? +# CUSTOM_MATRIX # Custom matrix file for the ErgoDox EZ +# SPLIT_KEYBOARD diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c new file mode 100644 index 0000000000..6debc1ce45 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c @@ -0,0 +1,40 @@ +//instanalize an instance of 'tap' for the None - Lead tap dance. +static tap none_lead_state = { + .is_press_action = true, + .state = 0 +}; + +void none_lead_finished(qk_tap_dance_state_t *state, void *user_data) { + none_lead_state.state = current_dance(state); + switch (none_lead_state.state) { + case SINGLE_TAP: + register_code(KC_NO); + break; + + case SINGLE_HOLD: + register_code(KC_LALT); + register_code(KC_LSFT); + break; + + case DOUBLE_TAP: + qk_leader_start(); + break; + } +} + +void none_lead_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (none_lead_state.state) { + case SINGLE_TAP: + unregister_code(KC_NO); + break; + + case SINGLE_HOLD: + unregister_code(KC_LALT); + unregister_code(KC_LSFT); + break; + + case DOUBLE_TAP: + break; + } + none_lead_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c new file mode 100644 index 0000000000..550e1f7c84 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c @@ -0,0 +1,20 @@ +// Register the double tap dances: +qk_tap_dance_action_t tap_dance_actions[] = { + [EQL_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), + [MINS_UNDS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), + [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS), + [GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), + [QUOT_DQUO] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_DQUO), + [SCLN_COLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLN), + [ASTR_CIRC] = ACTION_TAP_DANCE_DOUBLE(KC_ASTR, KC_CIRC), + [APMR_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_AMPR, KC_PIPE), + [EXLM_QUES] = ACTION_TAP_DANCE_DOUBLE(KC_EXLM, KC_QUES), + [HASH_PERC] = ACTION_TAP_DANCE_DOUBLE(KC_HASH, KC_PERC), + [AT_DLR] = ACTION_TAP_DANCE_DOUBLE(KC_AT, KC_DLR), + [LPRN_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC), + [RPRN_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC), + [LCBR_LABK] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LABK), + [RCBR_RABK] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RABK), + [DOT_COMM] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COMM), + [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, none_lead_finished, none_lead_reset, DANCING_TERM) +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_setup.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_setup.c new file mode 100644 index 0000000000..340ccca133 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_setup.c @@ -0,0 +1,75 @@ +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, // Send two single taps. + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7, + TRIPLE_SINGLE_TAP = 8 // Send three single taps. +}; + +/* Return an integer that corresponds to what kind of tap dance should be executed. + * + * How to figure out tap dance state: interrupted and pressed. + * + * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit + * under the tapping term. This is typically indicitive that you are trying to "tap" the key. + * + * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term + * has ended, but the key is still being pressed down. This generally means the key is being "held". + * + * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold" + * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters. + * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters. + * + * Good places to put an advanced tap dance: + * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon + * + * Criteria for "good placement" of a tap dance key: + * Not a key that is hit frequently in a sentence + * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or + * in a web form. So 'tab' would be a poor choice for a tap dance. + * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the + * letter 'p', the word 'pepper' would be quite frustating to type. + * + * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested + * + */ +int current_dance(qk_tap_dance_state_t *state) { + int current_state = 0; + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + current_state = SINGLE_TAP; + } else { + current_state = SINGLE_HOLD; //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. + } + } else if (state->count == 2) { + /* + * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap + * action when hitting 'pp'. Suggested use case for this return value is when you want to send two + * keystrokes of the key, and not the 'double tap' action/macro. + */ + if (state->interrupted) { + current_state = DOUBLE_SINGLE_TAP; + } else if (state->pressed) { + current_state = DOUBLE_HOLD; + } else { + current_state = DOUBLE_TAP; + } + } else if (state->count == 3) { + if (state->interrupted) { + current_state = TRIPLE_SINGLE_TAP; + } else if (state->pressed) { + current_state = TRIPLE_HOLD; + } else { + current_state = TRIPLE_TAP; + } + } + return current_state; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c new file mode 100644 index 0000000000..3d44698729 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c @@ -0,0 +1,74 @@ + //--------------------------------------------------------------------------------------------// + // | | | | | // + // Single tap | Single hold | Double tap | Double hold | Triple tap | Triple hold // +// Mod tap dances: // | | | | | // +enum tap_dances { //--------------------------------------------------------------------------------------------// + // | | | | | // + EQL_PLUS = 0, // = | + | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + MINS_UNDS = 1, // - | _ | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + SLSH_BSLS = 2, // / | \ | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + GRV_TILD = 3, // ` | ~ | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + QUOT_DQUO = 4, // ' | " | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + SCLN_COLN = 5, // ; | : | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + ASTR_CIRC = 6, // * | ^ | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + APMR_PIPE = 7, // & | | | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + EXLM_QUES = 8, // ! | ? | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + HASH_PERC = 9, // # | % | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + AT_DLR = 10, // @ | $ | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + LPRN_LBRC = 11, // ( | [ | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + RPRN_RBRC = 12, // ) | ] | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + LCBR_LABK = 13, // { | < | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + RCBR_RABK = 14, // } | > | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + DOT_COMM = 15, // . | , | | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + NONE_LEAD = 16, // NONE | ALT+SHIFT | LEAD | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/eeconfig_init_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/eeconfig_init_user.c new file mode 100644 index 0000000000..41b7b66941 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/eeconfig_init_user.c @@ -0,0 +1,3 @@ +// void eeconfig_init_user(void) { +// +// }; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c new file mode 100644 index 0000000000..e2eeed6fa9 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c @@ -0,0 +1,121 @@ + +uint32_t layer_state_set_user(uint32_t state) { + uint8_t layer = biton32(state); + + switch (layer) { + case DVORAK: + rgblight_sethsv_noeeprom_green(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case PLOVER: + rgblight_sethsv_noeeprom_red(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + + if (!(PLOVER_MODE)) { + plover_toggle(); + PLOVER_MODE = true; + } + + break; + + case GAMING: + rgblight_sethsv_noeeprom_red(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case ARROWS: + rgblight_sethsv_noeeprom_blue(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case MOUSE: + rgblight_sethsv_noeeprom_blue(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case NUMPAD: + rgblight_sethsv_noeeprom_blue(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case LAYERS: + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case MEDIA_FN: + rgblight_sethsv_noeeprom_yellow(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case HYPER: + rgblight_sethsv_noeeprom_magenta(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + case FIRMWARE: + rgblight_sethsv_noeeprom_magenta(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + + if (PLOVER_MODE) { + plover_toggle(); + PLOVER_MODE = false; + } + + break; + + default: + break; + } + + return state; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/matrix_scan_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/matrix_scan_user.c new file mode 100644 index 0000000000..3b78079cca --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/matrix_scan_user.c @@ -0,0 +1,12 @@ +#include "../leader/leader_setup.c" + +bool MATRIX_SCANNED = false; + +void matrix_scan_user(void) { + if (!(MATRIX_SCANNED)) { + rgblight_sethsv_noeeprom_green(); + MATRIX_SCANNED = true; + } + + #include "../leader/leader_dictionary.c" +}; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/process_record_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/process_record_user.c new file mode 100644 index 0000000000..7644635824 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/process_record_user.c @@ -0,0 +1,75 @@ +// TODO: Improve this currently there is no feedback if activated by other means. +bool CAPS_LOCK = false; +bool NUM_LOCK = false; +bool SCROLL_LOCK = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + switch (keycode) { + case KC_CLCK: + if (record->event.pressed) { + if (!(CAPS_LOCK)) { + ergodox_right_led_1_on(); + CAPS_LOCK = true; + } else { + ergodox_right_led_1_off(); + CAPS_LOCK = false; + } + } + + return true; + + case KC_NLCK: + if (record->event.pressed) { + if (!(NUM_LOCK)) { + ergodox_right_led_2_on(); + NUM_LOCK = true; + } else { + ergodox_right_led_2_off(); + NUM_LOCK = false; + } + } + + return true; + + case KC_SLCK: + if (record->event.pressed) { + if (!(SCROLL_LOCK)) { + ergodox_right_led_3_on(); + SCROLL_LOCK = true; + } else { + ergodox_right_led_3_off(); + SCROLL_LOCK = false; + } + } + + return true; + + case KC_MS_WH_UP ... KC_MS_WH_RIGHT: + if (record->event.pressed) { + if (SCROLL_LOCK) { + return false; + } else { + return true; + } + } + + case MY_CUSTOM_MACRO: + if (record->event.pressed) { + SEND_STRING("QMK is the best thing ever!"); // this is our macro! + return false; + } + + case MY_OTHER_MACRO: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("ac")); // selects all and copies + return false; + } + + default: + return true; + } +} |