diff options
author | BenKesselring <bskesselring@gmail.com> | 2017-10-06 08:20:28 -0600 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-10-06 04:20:28 -1000 |
commit | ea819268f3d08868ca72bd7911de7979c866d8a5 (patch) | |
tree | 3fece682193ab1f46179f168c50aece2acbfcaf3 /layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c | |
parent | e0834cfda937ed9b89a31f4cf719e30cef8ec33e (diff) | |
download | firmware-ea819268f3d08868ca72bd7911de7979c866d8a5.tar.gz firmware-ea819268f3d08868ca72bd7911de7979c866d8a5.tar.bz2 firmware-ea819268f3d08868ca72bd7911de7979c866d8a5.zip |
Add new 4x12 ortho layout & add credit to XD75 port (#1782)
* add xd75, preliminary RGB'
* fix RGB
* add backlight support (probably)
* updated readme and tweaked keymap
* added xd75 to list in /keyboards
* copyright ALL the things, create blank slate for Colemak Mod-DH Split/Wide keymap
* Add preliminary split Colemak Mod-DH layout
* changing stuff to compile properly
* attribution
* moar attribution
* removed incomplete keymap
* Create Colemak Mod-DH Wide layout for 4x12 ortho.
* Move Adjust key
* Add layou timage to readme
* fix naming
* Fix stupid issue with not understanding how the keymap works
* forgot to switch COLEMAK to COLEMAKDH...
* Remove and link image
* Remove and link image
Diffstat (limited to 'layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c')
-rw-r--r-- | layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c b/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c new file mode 100644 index 000000000..218ff9374 --- /dev/null +++ b/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c @@ -0,0 +1,141 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _COLEMAKDH 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + COLEMAKDH = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Q | W | F | P | B | Tab | Bksp | J | L | U | Y | ; | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | A | R | S | T | G | Esc | " | M | N | E | I | O | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Z | X | C | D | V |Shift |Enter | K | H | , | . | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |Adjust|Space |Lower |Raise |Space | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAKDH] = LAYOUT_ortho_4x12( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_TAB, KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ + KC_A, KC_R, KC_S, KC_T, KC_G, KC_ESC, KC_QUOT, KC_M, KC_N, KC_E, KC_I, KC_O, \ + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LSFT, KC_ENT, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, LOWER, RAISE, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + 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; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} |