diff options
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/ergodox/ez/keymaps/blakedietz/keymap.c | 289 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/Makefile | 2 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/README.md | 134 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/config.h | 24 | ||||
-rw-r--r-- | keyboards/hhkb/keymaps/blakedietz/keymap.c | 122 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/README.md | 129 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/blank_key_template.md | 13 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/config.h | 31 | ||||
-rw-r--r-- | keyboards/jd45/keymaps/blakedietz/keymap.c | 342 |
9 files changed, 1086 insertions, 0 deletions
diff --git a/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c new file mode 100644 index 0000000000..a88e6795ab --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c @@ -0,0 +1,289 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +/** + * This section of macros is for tap or hold functionality. Keys will fire off the second symbol in the name if tapped + * or fire the first symbol in the name if held. For example + * GUI_Z + * + * - will fire z if tapped + * - will fire cmd/super/win if held + */ +#define ALT_DOT ALT_T(KC_DOT) +#define ALT_X ALT_T(KC_X) +#define CTL_SLSH CTL_T(KC_SLSH) +#define CTL_Z CTL_T(KC_Z) +#define GUI_C GUI_T(KC_C) +#define GUI_COMM GUI_T(KC_COMM) +#define HPR_ESC ALL_T(KC_ESC) +#define HPR_QUO ALL_T(KC_QUOT) + +#define BASE 0 +#define SYMB 1 +#define MDIA 2 +#define MOUSE 3 +#define DEV 4 + +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| '" | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl|X/Alt |C/GUI | V | B | | | | N | M |,/GUI |./ALT |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,------------. + * |MOUSE | Home | | PgDn | PgUp| + * ,------|------|------| |------+-----+------. + * | | | ESC | | ESC | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | LGui | | LGui | | | + * `--------------------' `-------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DEV), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + + TG(MOUSE), KC_HOME, + KC_ESC, + KC_SPC, KC_BSPC, KC_LGUI, + + // right hand + KC_RGHT, 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, LT(MDIA, KC_SCLN), KC_QUOT, + MEH_T(KC_NO), KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT, + KC_DOWN, KC_UP, KC_LBRC, KC_RBRC, KC_FN1, + + KC_PGDN, KC_PGUP, + KC_ESC, + KC_LGUI, KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | Prev | Next | Mute | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | VolDn| VolUp| | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA +[MDIA] = KEYMAP( + // left hand + 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, 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, + // right hand + 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_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, 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 +), +[MOUSE] = KEYMAP( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, 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, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ACL2, KC_ACL1, KC_ACL0, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN1, KC_BTN2, 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 +), +[DEV] = KEYMAP( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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, 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 +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +// MACRODOWN only works in this function +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case SYMB: + // Binary 1 represented by the leds + // --* + ergodox_right_led_3_on(); + break; + case MDIA: + // Binary 2 represented by the leds + // -*- + ergodox_right_led_2_on(); + break; + case MOUSE: + // Binary 3 represented by the leds + // -** + ergodox_right_led_3_on(); + ergodox_right_led_2_on(); + break; + case DEV: + // Binary 4 represented by the leds + // *-- + ergodox_right_led_1_on(); + break; + default: + // none + break; + } +}; + +//bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QWERTY: +// return false +// break; +// case LOWER: +// if (record->event.pressed) { +// layer_on(_LOWER); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } else { +// layer_off(_LOWER); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } +// return false; +// break; +// case RAISE: +// if (record->event.pressed) { +// layer_on(_RAISE); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } else { +// layer_off(_RAISE); +// update_tri_layer(_LOWER, _RAISE, _ADJUST); +// } +// return false; +// break; +// } +// return true; +//} + diff --git a/keyboards/hhkb/keymaps/blakedietz/Makefile b/keyboards/hhkb/keymaps/blakedietz/Makefile new file mode 100644 index 0000000000..7c16b2c98d --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/Makefile @@ -0,0 +1,2 @@ +TAP_DANCE_ENABLE = no +UNICODE_ENABLE = no diff --git a/keyboards/hhkb/keymaps/blakedietz/README.md b/keyboards/hhkb/keymaps/blakedietz/README.md new file mode 100644 index 0000000000..c0f7fde7ad --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/README.md @@ -0,0 +1,134 @@ +# QMK HHKB Keymap: blakedietz + +<!-- TODO: Link to Hasu's geekhack page from his name --> +<!-- TODO: Link to the ergodox ez layout in this repository --> + +This is my (Blake Dietz's) own take on a QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. A lot of the + functionality was inspired by the ergodox ez default layout. + +## Dependencies + +### macOS + +```bash +brew tap osx-cross/avr +brew install avr-libc +brew install dfu-programmer +``` + +### Windows/Linux + +[Build Environment Setup](https://github.com/jackhumbert/qmk_firmware/wiki#build-environment-setup) + +## Flashing + +You will need to make sure that you have something that you can use to press the button on the alternate controller in +order to put it into boot mode. + +From the hhkb directory run the following: + +```bash +make clean +make hhkb-blakedietz-dfu +``` + +Press the button on the alternate controller to put the board into boot mode. + +You'll see an output similar to the following: + +```bash +make hhkb-blakedietz-dfu + +Making hhkb with keymap blakedietz and target dfu + +avr-gcc (GCC) 6.2.0 +Copyright (C) 2016 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +Size before: + text data bss dec hex filename + 0 22162 0 22162 5692 hhkb_blakedietz.hex + +Compiling: keyboards/hhkb/keymaps/blakedietz/keymap.c [OK] +Compiling: ./tmk_core/common/command.c [OK] +Linking: .build/hhkb_blakedietz.elf [OK] +Creating load file for Flash: .build/hhkb_blakedietz.hex [OK] + +Size after: + text data bss dec hex filename + 0 22162 0 22162 5692 hhkb_blakedietz.hex + +dfu-programmer: no device present. +Error: Bootloader not found. Trying again in 5s. +dfu-programmer: no device present. +Error: Bootloader not found. Trying again in 5s. +Bootloader Version: 0x00 (0) +Erasing flash... Success +Checking memory from 0x0 to 0x6FFF... Empty. +Checking memory from 0x0 to 0x56FF... Empty. +0% 100% Programming 0x5700 bytes... +[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success +0% 100% Reading 0x7000 bytes... +[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success +Validating... Success +0x5700 bytes written into 0x7000 bytes memory (77.68%). +``` + +### Layers + +#### Default + +##### A more "standard" layout + +This layout places tilde in the standard location. Backspace is moved to the two upper-right-most keys and pipe +is put back where it belongs (where backspace is on the default hhkb2 keymapping). + +##### Hyper key + +<!-- TODO: Link to Brett's article about the thyper key --> + +This layout throws out the HHKB's control key in favor of a Hyper key. Ctrl is instead placed on the z and / keys and +can be activated with a long press. I find that this is far more ergonomic as it's less of a reach and it allows you to +alternate to either hand when you need to use `ctrl` as a modifier. + +The hyper key can be held for hyper and tapped for escape. You'll find that this is quite nice for vim. + +Enter is also a hyper key. This allows for symmetry between control and enter. Hold for hyper, tap for enter. + +##### Tap to Hold + +###### CTL, ALT, GUI + +Since the HHKB does not have three super/meta keys, these keys were moved to pinky, ring and middle finger for ctrl, alt/ + option and super respectively. This is closer to home row which I've found causes less strain. + +The Alt and Super keys are instead replaced with layer toggle keys to go to dev and mouse mode respectively. + +###### Space + +Hold space to switch to dev mode. This will put you on a layer to have vim like arrow functionality on h,j,k and l. Use +this in editors that don't have vim keybindings. + +### Dev + +The Dev layer can be activated holding space or hitting the HHKB's Alt key. This will put you in a mode +where all function keys are available and left, right, up and down are mapped to their vim equivalents. The function + keys are mapped in such a way that you can use them for debugging. Typically I map debugging functions in all IDEs to + the following for a seamless debugging experience (e.g. jumping from Intellij to chrome dev tools and back): + + - f1 -> step over + - f2 -> step into + - f3 -> step out + - f4 -> continue + - f5 -> set break point on current line + +### Media + +The media layer can be activated by pressing and holding the semi-colon. I've also placed the play and pause key on the +apostrophe key in the media layer. This allows you to easily roll your pinky from the media toggle (semi-colon) to the +play/pause key in one fluid motion. + +I've also tried to logically map next/previous track along with volume up/down vim behavior. In vim since middle finger +goes up on k and index finger goes down on j, next/prev track is k/j respectively. ,/m changes volume up/down +respectively while toggled to the media layer. diff --git a/keyboards/hhkb/keymaps/blakedietz/config.h b/keyboards/hhkb/keymaps/blakedietz/config.h new file mode 100644 index 0000000000..e0d2bce0f1 --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/config.h @@ -0,0 +1,24 @@ +// Based off of this section: +// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file +#ifndef CONFIG_BLAKEDIETZ_H +#define CONFIG_BLAKEDIETZ_H + +// Bring in original defaults +#include "../../config.h" + +// Define mousekey settings +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_TIME_TO_MAX 5 +#define MOUSEKEY_WHEEL_DELAY 0 + +// Set up tapdance functionality +//#define TAPPING_TOGGLE 1 +// TAPPING_TERM is set in config.h this defaults to 200 + +// 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.) +#define IGNORE_MOD_TAP_INTERRUPT + +#endif diff --git a/keyboards/hhkb/keymaps/blakedietz/keymap.c b/keyboards/hhkb/keymaps/blakedietz/keymap.c new file mode 100644 index 0000000000..ef29a5c80d --- /dev/null +++ b/keyboards/hhkb/keymaps/blakedietz/keymap.c @@ -0,0 +1,122 @@ +#include "hhkb.h" + +// Layer names +#define BASE 0 +#define DEV 1 +#define MOUSE 2 +#define MEDIA 3 + +// Required for leader function. Measured in ms +// #define LEADER_TIMEOUT 300 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |Lead| + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | \ | + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | Esc/Hyper | A | S | D | F | G | H | J | K | L |;/Media| ' | Enter | | | + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | Shift | Z/Ctl | X/Alt | C/Gui | V | B | N | M | ,/Gui | ./Alt | //Ctl | Shift | Dev | | | + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + TODO: Maybe add a photoshop layer for when I need to hold spacebar down. Maybe just make it a layer that you + |------+------+-----------------------+------+------| + | Dev |Mouse | ******* Space ******* | Dev |Mouse | + |------+------+-----------------------+------+------| + */ + + [BASE] = KEYMAP( // default layer + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_LEAD, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + ALL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MEDIA, KC_SCLN), KC_QUOT, ALL_T(KC_ENT), \ + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, KC_N, KC_M, GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, TG(DEV), \ + TG(DEV), TG(MOUSE), LT(DEV, KC_SPC), TG(MOUSE), TG(DEV)), + + /* Layer DEV: DEV mode (DEV Fn) + TODO: Add a cmd/tab function to the developer layer for quick switching between different applications when debugging + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | F1 | F2 | F3 | F4 | F5 | Left | Down | Up | Right | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [DEV] = KEYMAP( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, 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, TG(DEV), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Layer MOUSE: MOUSE mode (MOUSE Fn) + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [MOUSE] = KEYMAP( + 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_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, 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, TG(DEV), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Layer MEDIA: mode (Hold Semi-colon) + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | Previous | Next | | Play/Pause | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | Volume Down | Volume Up | Mute | | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [MEDIA] = KEYMAP( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/jd45/keymaps/blakedietz/README.md b/keyboards/jd45/keymaps/blakedietz/README.md new file mode 100644 index 0000000000..2e45a46d9b --- /dev/null +++ b/keyboards/jd45/keymaps/blakedietz/README.md @@ -0,0 +1,129 @@ +jeebak's JD45 layout +======================= +NOTE: This is a port of jeebak's planck layout, for jd45. + +This WIP keymap attempts to minimize fingers straying away from the home row. +To aid in this endeavor, when additional modifyer keys to switch layers are +needed, they will be mapped to home row keys. The `keymap.c` file will contain +the exact changes. The diagrams in this README shows the highlights of the +changes from the default mappings. + +I also decided to change all calls to `persistant_default_layer_set()` to +`default_layer_set()` since this is my personal perference. + +## Macros +``` +#define ALT_TAB M(KC_ALT_TAB) +``` + +## Base Layers (Qwerty/Colemak/Dvorak) +These base layers are mostly the same as the default mappings. The interesting +changes are shown below. + +- The `Ctrl/Esc`, will emit an `Escape` when tapped, and act as a `Control` key when held, +- `GUI/;` as `;` and `GUI`, +- `Alt/"` as `"` and `Alt`, +- `Sft/Ent` as `Enter` and `Shift`, and +- `Hyper/Tab` as `Tab` and `Hyper` + +A `TODO` item is to see if it can also act as a `CapsLock` when double-tapped. +The arrow keys, which have been moved to the +[TouchCursor](http://martin-stone.github.io/touchcursor/) layer, have been +replaced with the Media keys as shown. The `MC/kc` key activates the +`MouseCursor` layer when held, and emits the corresponding `kc` for its layer, +when tapped. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+------+------. + |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | [ | Bksp | + |---------`------`------`------`------`------`------`------`------`------`------`------`------| + | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L |GUI/; | Alt/" | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/Ent | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play | + `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' +``` + +## Lower Layer (Symbols and Function Keys) +The symbols and functions keys are essentially the same as the default mapping. +The most notable changes are that the symbol keys from the `RAISE` layer have +been moved here. The remaining Media keys replace those that are now on the +base layers. The `BACKLIT` key has also been moved here. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+------+------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | Bksp | + |---------`------`------`------`------`------`------`------`------`------`------`------`------| + | [ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | "|" | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | ] | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | \ | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | Brite | | | | | | | Prev | Next | Mute | + `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' +``` + +## Raise Layer (Numbers and Arithmetic Operators) +All of the numbers and arithmetic operators are available on this layer. Some +keys are duplicated for the convenience of their positions. The `0` and `$` +keys at the far left are for quick access to beginning and end of line in vim. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+------+------. + | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Bksp | + |---------`------`------`------`------`------`------`------`------`------`------`------`------| + | $ | 4 | 5 | 6 | . | + | . | 4 | 5 | 6 | * | "|" | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | = | 7 | 8 | 9 | 0 | - | . | 1 | 2 | 3 | / | \ | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | Brite | | | | | | | Prev | Next | Mute | + `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' +``` + +## TouchCursor layer plus personal customizations +[TouchCursor](http://martin-stone.github.io/touchcursor/) uses the `Space` key +as the modifier, with the `IJKL` home row keys representing the inverted-T of +the arrow keys. All of the default TouchCursor keymappings for the right hand +are represented below. My personalizations include all of the keys shown for +the left hand. Having the `Alt` and `Shift` keys (as well as the `Control` key +from the base layers) readily accessible from the home row allows quick word +jumps and highlighting when used in conjunction with the arrow keys. The +`Alt-Tab` macro is not only useful under Windows, but also under Mac when used +with alternative switchers like [HyperSwitch](https://bahoom.com/hyperswitch). +The `Cmd-Tab` and `Ctrl-Tab` sequences are duplicated for easy access while in +this layer. The `KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND,` and `KC_AGAIN` +keycodes do not seem to work. There are macros in place that'll "automatically" +choose the correct version (`Cmd-Tab` vs. `Alt-Tab`, `Cmd-C` vs. `Ctrl-C`, +etc.) depending on which layout you've currently selected (`AG_NORM` or +`AG_SWAP`) in the `_ADJUST` layer. The `Desk_L` and `Desk_R` macros are what I +use to switch between Virtual Desktops Left/Right. The `Tab_C`, `Tab_N` and +`Tab_R` are for "Close Tab," "New Tab" and "Reopen Closed Tab" for apps such as +Google Chrome. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+------+------. + | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | | + |---------`------`------`------`------`------`------`------`------`------`------`------`------| + | | Alt |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L| Desk_R | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | | Undo | Cut | Copy |Paste | ` | PgDn | Del |Tab_N |Tab_R |iTerm2| | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | | | | | | | | | | | + `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' +``` + +## Mouse Layer +The Mouse layer, closely mimics the layout/behaviour of the TouchCursor layer. +The `D` key (on QWERTY) is used to activate this layer. All 16 keycodes for the +mouse from the `doc/keycode.txt` file are represented, and logically located, +IMHO. The left and right click buttons are duplicated; on the right hand side, +for a quick click here and there, and again on the left hand side for when the +buttons need to be held for dragging things or highlighting text, thus allowing +the right hand to be free to use the up/down/left/right actions. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+------+------. + | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | | + |---------`------`------`------`------`------`------`------`------`------`------`------`------| + | |ACCL2 |