diff options
Diffstat (limited to 'keyboards/planck/keymaps')
-rw-r--r-- | keyboards/planck/keymaps/callum/config.h | 8 | ||||
-rw-r--r-- | keyboards/planck/keymaps/callum/keymap.c | 262 | ||||
-rw-r--r-- | keyboards/planck/keymaps/callum/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/planck/keymaps/motform/config.h | 39 | ||||
-rw-r--r-- | keyboards/planck/keymaps/motform/keymap.c | 211 | ||||
-rw-r--r-- | keyboards/planck/keymaps/motform/readme.md | 11 | ||||
-rw-r--r-- | keyboards/planck/keymaps/motform/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/planck/keymaps/priyadi/config.h | 22 | ||||
-rw-r--r-- | keyboards/planck/keymaps/priyadi/rules.mk | 11 | ||||
-rw-r--r-- | keyboards/planck/keymaps/roguepullrequest/keymap.c | 8 | ||||
-rw-r--r-- | keyboards/planck/keymaps/roguepullrequest/readme.md | 13 | ||||
-rw-r--r-- | keyboards/planck/keymaps/tom/keymap.c | 11 |
12 files changed, 433 insertions, 165 deletions
diff --git a/keyboards/planck/keymaps/callum/config.h b/keyboards/planck/keymaps/callum/config.h index 49f61dee5..e66db1d7e 100644 --- a/keyboards/planck/keymaps/callum/config.h +++ b/keyboards/planck/keymaps/callum/config.h @@ -1,7 +1,7 @@ #define MOUSEKEY_DELAY 0 #define MOUSEKEY_INTERVAL 16 -#define MOUSEKEY_MAX_SPEED 10 -#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 20 +#define MOUSEKEY_TIME_TO_MAX 100 #define MOUSEKEY_WHEEL_DELAY 0 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 02456aa7d..08d0c69b8 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -1,4 +1,3 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" #include "planck.h" #include "action_layer.h" @@ -38,28 +37,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func | * `-----------------------------------------------------------------------' */ - [_COLEMAK] = { - { - KC_TAB, KC_Q, KC_W, KC_F, - KC_P, KC_G, KC_J, KC_L, - KC_U, KC_Y, KC_SCLN, KC_MINS - }, - { - KC_BSPC, KC_A, KC_R, KC_S, - KC_T, KC_D, KC_H, KC_N, - KC_E, KC_I, KC_O, KC_QUOT - }, - { - KC_LSFT, KC_Z, KC_X, KC_C, - KC_V, KC_B, KC_K, KC_M, - KC_COMM, KC_DOT, KC_SLSH, KC_RSFT - }, - { - FUNC, KC_LCTL, KC_LALT, KC_LGUI, - SYMB, KC_ENT, KC_SPC, MOVE, - KC_RGUI, KC_RALT, KC_RCTL, FUNC - } - }, + [_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, + KC_P, KC_G, KC_J, KC_L, + KC_U, KC_Y, KC_SCLN, KC_MINS, + + KC_BSPC, KC_A, KC_R, KC_S, + KC_T, KC_D, KC_H, KC_N, + KC_E, KC_I, KC_O, KC_QUOT, + + KC_LSFT, KC_Z, KC_X, KC_C, + KC_V, KC_B, KC_K, KC_M, + KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + + FUNC, KC_LCTL, KC_LALT, KC_LGUI, + SYMB, KC_ENT, KC_SPC, MOVE, + KC_RGUI, KC_RALT, KC_RCTL, FUNC + ), /* QWERTY * ,-----------------------------------------------------------------------. @@ -72,96 +66,81 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func | * `-----------------------------------------------------------------------' */ - [_QWERTY] = { - { - KC_TAB, KC_Q, KC_W, KC_E, - KC_R, KC_T, KC_Y, KC_U, - KC_I, KC_O, KC_P, KC_MINS - }, - { - KC_BSPC, KC_A, KC_S, KC_D, - KC_F, KC_G, KC_H, KC_J, - KC_K, KC_L, KC_SCLN, KC_QUOT - }, - { - KC_LSFT, KC_Z, KC_X, KC_C, - KC_V, KC_B, KC_N, KC_M, - KC_COMM, KC_DOT, KC_SLSH, KC_RSFT - }, - { - FUNC, KC_LCTL, KC_LALT, KC_LGUI, - SYMB, KC_ENT, KC_SPC, MOVE, - KC_RGUI, KC_RALT, KC_RCTL, FUNC - } - }, + [_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, + KC_R, KC_T, KC_Y, KC_U, + KC_I, KC_O, KC_P, KC_MINS, + + KC_BSPC, KC_A, KC_S, KC_D, + KC_F, KC_G, KC_H, KC_J, + KC_K, KC_L, KC_SCLN, KC_QUOT, + + KC_LSFT, KC_Z, KC_X, KC_C, + KC_V, KC_B, KC_N, KC_M, + KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + + FUNC, KC_LCTL, KC_LALT, KC_LGUI, + SYMB, KC_ENT, KC_SPC, MOVE, + KC_RGUI, KC_RALT, KC_RCTL, FUNC + ), /* SYMB * ,-----------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |ndash| * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |Mouse| | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ - [_SYMB] = { - { - KC_ESC, KC_1, KC_2, KC_3, - KC_4, KC_5, KC_6, KC_7, - KC_8, KC_9, KC_0, _______ - }, - { - KC_DEL, KC_EXLM, KC_AT, KC_HASH, - KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, - KC_ASTR, KC_LPRN, KC_RPRN, _______ - }, - { - _______, KC_TILD, KC_GRV, KC_PLUS, - KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, - KC_RBRC, KC_LCBR, KC_RCBR, _______ - }, - { - _______, _______, _______, _______, - _______, _______, _______, MOUSE, - _______, _______, _______, _______ - } - }, + [_SYMB] = LAYOUT_planck_grid( + KC_ESC, KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, KC_0, A(KC_MINS), + + KC_DEL, KC_EXLM, KC_AT, KC_HASH, + KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, + KC_ASTR, KC_LPRN, KC_RPRN, A(KC_3), + + _______, KC_TILD, KC_GRV, KC_PLUS, + KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, + KC_RBRC, KC_LCBR, KC_RCBR, _______, + + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), /* MOVE * ,-----------------------------------------------------------------------. - * | | | | | | |CtrUp|Home | Up | End |Caps | Esc | + * | | | | | | |CtrUp|Home | Up | End |Caps |Mouse| * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | |SpaL |Left |Down |Right|SpaR | Del | + * | | | | | | |CtrL |Left |Down |Right|CtrR | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | | | | | |CtrDn|PgDn |PgUp |TabL |TabR | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | |Mouse| | | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ - [_MOVE] = { - { - AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D), - AC(KC_E), AC(KC_F), C(KC_UP), KC_HOME, - KC_UP, KC_END, KC_CAPS, KC_ESC - }, - { - AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J), - AC(KC_K), AC(KC_L), C(KC_LEFT), KC_LEFT, - KC_DOWN, KC_RGHT, C(KC_RIGHT), KC_DEL - }, - { - _______, AC(KC_M), AC(KC_N), AC(KC_O), - AC(KC_P), AC(KC_Q), C(KC_DOWN), KC_PGDN, - KC_PGUP, SC(KC_TAB), C(KC_TAB), _______ - }, - { - _______, _______, _______, _______, - MOUSE, _______, _______, _______, - _______, _______, _______, _______ - } - }, + [_MOVE] = LAYOUT_planck_grid( + AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D), + AC(KC_E), AC(KC_F), C(KC_UP), KC_HOME, + KC_UP, KC_END, KC_CAPS, MOUSE, + + AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J), + AC(KC_K), AC(KC_L), C(KC_LEFT), KC_LEFT, + KC_DOWN, KC_RGHT, C(KC_RIGHT), XXXXXXX, + + _______, AC(KC_M), AC(KC_N), AC(KC_O), + AC(KC_P), AC(KC_Q), C(KC_DOWN), KC_PGDN, + KC_PGUP, SC(KC_TAB), C(KC_TAB), _______, + + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), /* FUNC * ,-----------------------------------------------------------------------. @@ -169,67 +148,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn| * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | |Home |TabL |TabR |End | | | |Clmak|Qwrty| | + * | | | | | | | | | |Clmak|Qwrty| | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | | | |Prev |Mute |Play |Next | | | | | * `-----------------------------------------------------------------------' */ - [_FUNC] = { - { - RESET, KC_F1, KC_F2, KC_F3, - KC_F4, KC_F5, KC_F6, KC_F7, - KC_F8, KC_F9, KC_F10, KC_VOLU - }, - { - KC_POWER, KC_F11, KC_F12, KC_F13, - KC_F14, KC_F15, KC_F16, KC_F17, - KC_F18, KC_F19, KC_F20, KC_VOLD - }, - { - _______, XXXXXXX, KC_HOME, SC(KC_TAB), - C(KC_TAB), KC_END, XXXXXXX, XXXXXXX, - XXXXXXX, COLEMAK, QWERTY, _______ - }, - { - _______, _______, _______, _______, - KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, - _______, _______, _______, _______ - } - }, + [_FUNC] = LAYOUT_planck_grid( + RESET, KC_F1, KC_F2, KC_F3, + KC_F4, KC_F5, KC_F6, KC_F7, + KC_F8, KC_F9, KC_F10, KC_VOLU, + + KC_POWER, KC_F11, KC_F12, KC_F13, + KC_F14, KC_F15, KC_F16, KC_F17, + KC_F18, KC_F19, KC_F20, KC_VOLD, + + _______, XXXXXXX, KC_HOME, SC(KC_TAB), + C(KC_TAB), KC_END, XXXXXXX, XXXXXXX, + XXXXXXX, COLEMAK, QWERTY, _______, + + _______, _______, _______, _______, + KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, + _______, _______, _______, _______ + ), /* MOUSE * ,-----------------------------------------------------------------------. - * | | | | | | | | ScL |Up | ScR | | | + * | | |CtrL |CtrU |CtrR | B5 |CtrU | ScL |Up | ScR | | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | B4 | B3 | B2 | B1 | | |Left |Down |Right| | | + * | | | Ac0 | Ac1 | Ac2 | B4 |CtrL |Left |Down |Right|CtrR | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | Ac0 | Ac1 | Ac2 | | | ScD | ScU | | | | + * | | | |Home | End | B3 |CtrD | ScD | ScU |TabL |TabR | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | + * | | | | | | B2 | B1 | | | | | | * `-----------------------------------------------------------------------' */ - [_MOUSE] = { - { - _______, _______, C(KC_LEFT), C(KC_UP), - C(KC_RIGHT), _______, _______, KC_WH_L, - KC_MS_U, KC_WH_R, _______, _______ - }, - { - _______, KC_BTN4, KC_BTN3, KC_BTN2, - KC_BTN1, _______, _______, KC_MS_L, - KC_MS_D, KC_MS_R, _______, _______ - }, - { - _______, _______, KC_ACL0, KC_ACL1, - KC_ACL2, _______, _______, KC_WH_D, - KC_WH_U, _______, _______, _______ - }, - { - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______ - } - } + [_MOUSE] = LAYOUT_planck_grid( + _______, XXXXXXX, C(KC_LEFT), C(KC_UP), + C(KC_RIGHT), KC_BTN5, C(KC_UP), KC_WH_R, + KC_MS_U, KC_WH_L, XXXXXXX, XXXXXXX, + + _______, XXXXXXX, KC_ACL0, KC_ACL1, + KC_ACL2, KC_BTN4, C(KC_LEFT), KC_MS_L, + KC_MS_D, KC_MS_R, C(KC_RIGHT), XXXXXXX, + + _______, XXXXXXX, XXXXXXX, KC_HOME, + KC_END, KC_BTN3, C(KC_DOWN), KC_WH_U, + KC_WH_D, SC(KC_TAB), C(KC_TAB), _______, + + _______, _______, _______, _______, + _______, KC_BTN2, KC_BTN1, _______, + _______, _______, _______, _______ + ) }; #ifdef AUDIO_ENABLE @@ -267,6 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case SYMB: if (record->event.pressed) { + layer_off(_MOUSE); layer_on(_SYMB); } else { layer_off(_SYMB); @@ -274,6 +244,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case MOVE: if (record->event.pressed) { + layer_off(_MOUSE); layer_on(_MOVE); } else { layer_off(_MOVE); @@ -281,6 +252,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case FUNC: if (record->event.pressed) { + layer_off(_MOUSE); layer_on(_FUNC); } else { layer_off(_FUNC); @@ -289,8 +261,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case MOUSE: if (record->event.pressed) { layer_on(_MOUSE); - } else { - layer_off(_MOUSE); } return false; diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk index 4774c2c41..182322ae2 100644 --- a/keyboards/planck/keymaps/callum/rules.mk +++ b/keyboards/planck/keymaps/callum/rules.mk @@ -17,4 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/planck/keymaps/motform/config.h b/keyboards/planck/keymaps/motform/config.h new file mode 100644 index 000000000..6fa31cc8a --- /dev/null +++ b/keyboards/planck/keymaps/motform/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/motform/keymap.c b/keyboards/planck/keymaps/motform/keymap.c new file mode 100644 index 000000000..15f0e05fb --- /dev/null +++ b/keyboards/planck/keymaps/motform/keymap.c @@ -0,0 +1,211 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" +#include "keymap_swedish.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +/* These definitions can be removed once keymap_swe is properly vetted against MacOS */ +#define NO_DLR_MAC_V ALGR(LALT(KC_4)) +#define NO_AT_MAC_V ALGR(LALT(KC_2)) + +/* Esc when pressed, ctrl when used as a modifier */ +#define KC_ECTL MT(MOD_LCTL, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak_se + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | Ö | Å | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ECTR | A | R | S | T | D | H | N | E | I | O | Ä | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | SCSHE| Z | X | C | V | B | K | M | , | . | - |SCSHE | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | esc | CTRL | Alt | CMD |Lower |Space |Bksp |Raise | CMD | RALT | HYPER| MEH | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid +( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, NO_OSLH, NO_AA, + KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, NO_AE, + KC_SFTENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_SFTENT, + KC_ESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, KC_HYPR, KC_MEH + ), + +/* Lower +* ,-----------------------------------------------------------------------------------. +* | | PIPE | ' | @ | & | | DOWN | | RIGHT| ` | ´ | ~ | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | | ! | " | # | ? | % | LEFT | / | \ | = | + | * | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | | | | [ | { | | UP | } | ] | | | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | DEL | | Next | Vol- | Vol+ | Play | +* `-----------------------------------------------------------------------------------' +*/ +[_LOWER] = LAYOUT_planck_grid +( + _______, NO_PIPE_MAC, NO_APOS, NO_AT_MAC_V, NO_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, NO_GRV, NO_GRV, NO_TILD, + _______, KC_EXLM, NO_QUO2, KC_HASH, NO_QUES, KC_PERC, KC_LEFT, NO_SLSH, NO_BSLS_MAC, NO_EQL, KC_PPLS, KC_PAST, + _______, KC_NO, KC_NO, NO_LBRC, NO_LCBR_MAC, KC_NO, KC_UP, NO_RCBR_MAC, NO_RBRC, KC_NO, KC_NO, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + +/* Raise +* ,-----------------------------------------------------------------------------------. +* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | $ | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | | | | < | ( | | | ) | > |Pg Up |Pg Dn | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | | Next | Vol- | Vol+ | Play | +* `-----------------------------------------------------------------------------------' +*/ +[_RAISE] = LAYOUT_planck_grid +( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + NO_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_DLR_MAC_V, + _______, KC_NO, KC_NO, NO_LESS_MAC, NO_LPRN, KC_NO, KC_NO, NO_RPRN, NO_GRTR_MAC, KC_PGUP, KC_PGDN, KC_NO, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| Debug| | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TRMon |TRMoff| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid +( + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); + #else + register_code(KC_PGDN); + unregister_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); + #else + register_code(KC_PGUP); + unregister_code(KC_PGUP); + #endif + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/motform/readme.md b/keyboards/planck/keymaps/motform/readme.md new file mode 100644 index 000000000..47091c0aa --- /dev/null +++ b/keyboards/planck/keymaps/motform/readme.md @@ -0,0 +1,11 @@ +# Motform Planck Layout + +This layout is based off the [colemak-se](github.com/motform/colemak-se) +layout and features many tweaks to make working with Emacs and +evil-mode more ergonomi. As with the colemak layout itself, the idea +is to concentrate as much movement as possible to the home row. + +To properly use the layout in Emacs, set Super to LGUI and Meta to RGUI. +Unless you are running a permutation of the MacOS Swedish QWERTY-layout, +modifiers will probably not work. For future develoment, I’m planning +to add support for MS Windows SE-QWERTY in the form of a secondary layer. diff --git a/keyboards/planck/keymaps/motform/rules.mk b/keyboards/planck/keymaps/motform/rules.mk new file mode 100644 index 000000000..dcf16bef3 --- /dev/null +++ b/keyboards/planck/keymaps/motform/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/planck/keymaps/priyadi/config.h b/keyboards/planck/keymaps/priyadi/config.h index 876d057bf..c85e8656e 100644 --- a/keyboards/planck/keymaps/priyadi/config.h +++ b/keyboards/planck/keymaps/priyadi/config.h @@ -21,7 +21,8 @@ #define DOUBLESPACE_LAYER_ENABLE // #define TOLELOT_ENABLE -#define KEYMAP_CUSTOM( \ +#ifdef __AVR__ +#define LAYOUT( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ @@ -34,5 +35,24 @@ {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c}, \ {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \ } +#elif KEYBOARD_planck_rev6 +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + tp1, tp2, tp3 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} +#endif #endif diff --git a/keyboards/planck/keymaps/priyadi/rules.mk b/keyboards/planck/keymaps/priyadi/rules.mk index a999eb00f..17617b0b7 100644 --- a/keyboards/planck/keymaps/priyadi/rules.mk +++ b/keyboards/planck/keymaps/priyadi/rules.mk @@ -8,15 +8,22 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no + +ifeq ($(strip $(KEYBOARD)), planck/rev4) FAUXCLICKY_ENABLE = yes +BACKLIGHT_ENABLE = yes +AUDIO_ENABLE = no +endif + +ifeq ($(strip $(KEYBOARD)), planck/rev6) +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/roguepullrequest/keymap.c b/keyboards/planck/keymaps/roguepullrequest/keymap.c index 51c740dc4..177cb2b67 100644 --- a/keyboards/planck/keymaps/roguepullrequest/keymap.c +++ b/keyboards/planck/keymaps/roguepullrequest/keymap.c @@ -4,6 +4,7 @@ float mushroom[][2] = SONG(MARIO_MUSHROOM); #endif + extern keymap_config_t keymap_config; // Complex Tapdance hoopla @@ -26,7 +27,8 @@ enum { X_AT_FUN = 0, RSHIFT, LSHIFT, - TD_S + TD_S, + SLASH }; int cur_dance (qk_tap_dance_state_t *state); @@ -110,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Programmer Dvorak */ [_PDVORAK] = LAYOUT_planck_grid( KC_GESC, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, - KC_LAST, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, TD(TD_S), KC_SLASH, + KC_LAST, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, TD(TD_S), TD(SLASH), TD(LSHIFT), KC_QUOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(RSHIFT), TD(X_AT_FUN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ALT_TAB, KC_SPACE, KC_ENTER, MT(MOD_LCTL | MOD_LSFT, KC_LGUI), KC_PGUP, KC_PGDN, LT(_LOWER, KC_PLUS) ), @@ -245,6 +247,8 @@ qk_tap_dance_action_t tap_dance_actions[] = { [LSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lshift_finished, lshift_reset), [RSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rshift_finished, rshift_reset), [TD_S] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, s_finished, s_reset), + [SLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_BSLASH), + }; void shutdown_user(void) { clear_keyboard(); } diff --git a/keyboards/planck/keymaps/roguepullrequest/readme.md b/keyboards/planck/keymaps/roguepullrequest/readme.md index d3cae22ff..687a65fc9 100644 --- a/keyboards/planck/keymaps/roguepullrequest/readme.md +++ b/keyboards/planck/keymaps/roguepullrequest/readme.md @@ -1,12 +1,17 @@ # Programmer Dvorak for the Planck (Light) -| Magic | | UPPER | -|----------|---------|-------| -| | DEFAULT | | -| FUNCTION | | LOWER | +| | | | | | | | | | | | | +|----------|---------|-------|-----|------|-------|-------|------|------|------|------|------| +| GRAVE_ESC | ; [u]; [l]7 | , [u]% [l]5 | . [l]3 | p [l]1 | y [u]= [l]9 | f [u]* [l]0 | g [l]2 | c [l]4 | r [u]! [l]6 | l [u]# [l]8 | BKSP | +| LCTRL [TD]!$ | a | o | e | u | i | d | h | t | n | s [TD]- _ | / [TD]\ | +| LSHFT [TD]( [ { | ' | q | j | k | x | b | m | w | v | z | LSHFT [TD]) ] } | +| @ [TD]UPPER FUN RESET | LEFT | DOWN | UP | RIGHT | ALT_TAB | SPACE | ENTER | LGUI | PGUP | PGDOWN | = [TD]LOWER | # Layout notes +- [u] = UPPER symbol +- [l] = LOWER symbol +- [TD] = Tap Dances - ALT_TAB = cycle through windows as long as you keep tapping it keeps alt tabbing - LAST = "!$" = is useful for using the last parm in bash/zsh - More to come diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c index 6e3b08938..0ffff4e69 100644 --- a/keyboards/planck/keymaps/tom/keymap.c +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -224,14 +224,16 @@ bool music_mask_user(uint16_t keycode) { } } +#ifdef RGB_MATRIX_ENABLE +extern led_config_t g_led_config; +#endif + void rgb_matrix_indicators_user(void) { #ifdef RGB_MATRIX_ENABLE - rgb_led led; switch (biton32(layer_state)) { case _RAISE: for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - if ( led.modifier ) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { rgb_matrix_set_color(i, 0x6B, 0x00, 0x80); } else { rgb_matrix_set_color(i, 0x00, 0xFF, 0x00); @@ -241,8 +243,7 @@ void rgb_matrix_indicators_user(void) { case _LOWER: for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - if ( led.modifier ) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00); } else { rgb_matrix_set_color(i, 0x00, 0x67, 0xC7); |