From 0537a59920d912a819e78eb052fbbc856f5ed6ac Mon Sep 17 00:00:00 2001 From: Taylor Gonzalez Date: Fri, 20 Jul 2018 11:07:54 -0500 Subject: Keymap: Added a keymap for the planck light (#3434) * Moved F row to raise * Moved mouse keys over one space and removed unneccessary code * Moved delete on lower * Added CTRL functions * Added Print Screen * Added README.md file * Updated CTRL * Updated readme to current CTRL * Minor Changes * Updated mouse speeds * Unknown changes * Updated README and keymaps * Removed caps from number row and put it in special * Moved around equals sign again * Updated mouse key speed * Pull Request Updates --- keyboards/planck/keymaps/pickle_jr/README.md | 102 ++++++++++++++ keyboards/planck/keymaps/pickle_jr/config.h | 35 +++++ keyboards/planck/keymaps/pickle_jr/keymap.c | 196 +++++++++++++++++++++++++++ keyboards/planck/keymaps/pickle_jr/rules.mk | 18 +++ 4 files changed, 351 insertions(+) create mode 100644 keyboards/planck/keymaps/pickle_jr/README.md create mode 100644 keyboards/planck/keymaps/pickle_jr/config.h create mode 100644 keyboards/planck/keymaps/pickle_jr/keymap.c create mode 100644 keyboards/planck/keymaps/pickle_jr/rules.mk (limited to 'keyboards/planck') diff --git a/keyboards/planck/keymaps/pickle_jr/README.md b/keyboards/planck/keymaps/pickle_jr/README.md new file mode 100644 index 0000000000..64e9c23c1f --- /dev/null +++ b/keyboards/planck/keymaps/pickle_jr/README.md @@ -0,0 +1,102 @@ +Pickle\_Jr's Layout +=================== + +Thanks for checking out my layout! This is the layout I have on my planck. + +Main +------ +``` + ,---------------------------------------------------------------------------------------------------. + | Tab/CALC | Q | W | E | R | T | Y | U | I | O | P | "/CALC | + |----------+----------+------+------+------+-------------+------+------+-------+----------+---------| + | Esc | A | S | D | F | G | H | J | K | L | ;/Nav | Enter | + |----------+----------+------+------+------+------|------+------+------+-------+----------+---------| + | (/SFT | Z | X | C | V | B | N | M | , | . | / | )/SFT | + |----------+----------+------+------+------+------+------+------+------+-------+----------+---------| + | [/SPC | CTRL |PrintS| GUI | Bksp |Lower |Raise | SPC | ALT |VIMSAVE| CTRL | ]/SPC | + `---------------------------------------------------------------------------------------------------' +``` + +Lower +----- +``` + ,-----------------------------------------------------------------------------------. + | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + |------+------+------+------+------+-------------+------+------+------+------+------| + | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | DEL | | | | | + `-----------------------------------------------------------------------------------' +``` + +Raise +----- +``` + ,-----------------------------------------------------------------------------------. + | | | | | | | | | | | | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | ! | @ | # | $ | % | ^ | & | * | - | = | + | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | ~ | ` | CTRL | | | | | _ | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | | + `-----------------------------------------------------------------------------------' +``` + +Special (SPC on main) +------- +``` + ,------------------------------------------------------------------------------------. + | | M2 | MUP | M1 | WUP | | CAPS | | | | | | + |------+------+------+------+------+--------------+------+------+------+------+------| + | |MLEFT |MDOWN |MRIGHT|WDOWN | | | | | | | | + |------+------+------+------+------+------|-------+------+------+------+------+------| + | |WLEFT | M3 |WRIGHT| | |CTLALTD| | | | | | + |------+------+------+------+------+------+-------+------+------+------+------+------| + | | PREV | PLAY | NEXT | | | LOCK | | MUTE | VOL- | VOL+ | | + `------------------------------------------------------------------------------------' +``` + +Calc +---- +``` + ,-----------------------------------------------------------------------------------. + | | F7 | F8 | F9 | | | * | 7 | 8 | 9 | / | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | F4 | F5 | F6 | | | + | 4 | 5 | 6 | - | \ | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | F1 | F2 | F3 | | | | 1 | 2 | 3 | = | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | F11 | F12 | | DEL | Bksp | 0 | | | | RET | + `-----------------------------------------------------------------------------------' +``` + +Nav +--- +``` + ,-----------------------------------------------------------------------------------. + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | HOME | PGUP | PGDN | END | LEFT | DOWN | UP |RIGHT | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | | | + `-----------------------------------------------------------------------------------' +``` + +Adjust (Lower + Raise) +---------------------- +``` + ,-------------------------------------------------------------------------------------------. + | | Reset| |RGB_TOG|RGB_MOD|RGB_HUI|RGB_HUD|RGB_SAI|RGB_SAD|RGB_VAI|RGB_VAD| Del | + |------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+------| + | | |MU_MOD|Aud on |Audoff |AGnorm |AGswap | | | | | | + |------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+------| + | |Voice-|Voice+|Mus on |Musoff |MIDIon |MIDIof |TERMon |TERMof | | | | + |------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+------| + | | | | | | | | | | | | + `-------------------------------------------------------------------------------------------' +``` diff --git a/keyboards/planck/keymaps/pickle_jr/config.h b/keyboards/planck/keymaps/pickle_jr/config.h new file mode 100644 index 0000000000..52e736088a --- /dev/null +++ b/keyboards/planck/keymaps/pickle_jr/config.h @@ -0,0 +1,35 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) +#endif + +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* + * 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 diff --git a/keyboards/planck/keymaps/pickle_jr/keymap.c b/keyboards/planck/keymaps/pickle_jr/keymap.c new file mode 100644 index 0000000000..317ebcf399 --- /dev/null +++ b/keyboards/planck/keymaps/pickle_jr/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _SPECIAL 3 +#define _CALC 4 +#define _NAV 5 +#define _ADJUST 6 + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define LPSFT SFT_T(KC_RPRN) +#define LCCTL CTL_T(KC_LCBR) +#define RCCTL MT(MOD_RCTL,KC_RCBR) +#define RPSFT MT(MOD_RSFT,KC_LPRN) + +#define SCOLNAV LT(_NAV,KC_SCLN) +#define TABCALC LT(_CALC, KC_TAB) +#define QUOCALC LT(_CALC, KC_QUOT) +#define LBRACK LT(_SPECIAL,KC_LBRC) +#define RBRACK LT(_SPECIAL,KC_RBRC) + +#define LOCK RGUI(KC_L) + +enum custom_keycoedes { + CTLALTD = SAFE_RANGE, + VIMSAVE, + VIMWQ +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed) { + switch(keycode) { + case CTLALTD: + SEND_STRING(SS_DOWN(X_LCTRL)SS_DOWN(X_LALT)SS_DOWN(X_DELETE)SS_UP(X_DELETE)SS_UP(X_LALT)SS_UP(X_LCTRL)); + return false; + case VIMSAVE: + SEND_STRING(":w"); + return false; + } + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,----------------------------------------------------------------------------------------------------. + * | Tab/CALC | Q | W | E | R | T | Y | U | I | O | P | "/CALC | + * |----------+----------+-------+------+------+-------------+------+------+-------+----------+---------| + * | Esc | A | S | D | F | G | H | J | K | L | ;/Nav | Enter | + * |----------+----------+-------+------+------+------|------+------+------+-------+----------+---------| + * | (/SFT | Z | X | C | V | B | N | M | , | . | / | )/SFT | + * |----------+----------+-------+------+------+------+------+------+------+-------+----------+---------| + * | [/SPC | CTRL |PrintS | GUI | Bksp |Lower |Raise | SPC | ALT |VIMSAVE| CTRL | ]/SPC | + * `----------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + TABCALC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, QUOCALC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCOLNAV, KC_ENT , + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + LBRACK , KC_LCTL, KC_PSCR, KC_LGUI, KC_BSPC, LOWER, RAISE, KC_SPC, KC_RALT, VIMSAVE, KC_RCTL, RBRACK +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | DEL | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = 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 , + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_TRNS, _______, KC_DEL, _______, _______, _______, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ! | @ | # | $ | % | ^ | & | * | - | = | + | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | ~ | ` | CTRL | | | | | _ | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, KC_PLUS, _______, + _______, _______, KC_TILD, KC_GRV, KC_LCTRL, _______, KC_PIPE, _______, KC_UNDS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_TRNS, _______, _______, _______, _______, _______ +), + +/* Special + * ,------------------------------------------------------------------------------------. + * | | M2 | MUP | M1 | WUP | | CAPS | | | | | | + * |------+------+------+------+------+--------------+------+------+------+------+------| + * | |MLEFT |MDOWN |MRIGHT|WDOWN | |PRTSCRE| | | | | | + * |------+------+------+------+------+------|-------+------+------+------+------+------| + * | |WLEFT | M3 |WRIGHT| | |CTLALTD| | | | | | + * |------+------+------+------+------+------+-------+------+------+------+------+------| + * | | PREV | PLAY | NEXT | | | LOCK | | MUTE | VOL- | VOL+ | | + * `------------------------------------------------------------------------------------' + */ +[_SPECIAL] = LAYOUT_planck_grid( + _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_U, _______, KC_CAPS, _______, _______, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, + _______, KC_WH_L, KC_BTN3, KC_WH_R, _______, _______, CTLALTD, _______, _______, _______, _______, _______, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, LOCK, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS +), + +/* Calc + * ,-----------------------------------------------------------------------------------. + * | | F7 | F8 | F9 | | | * | 7 | 8 | 9 | / | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F4 | F5 | F6 | | | + | 4 | 5 | 6 | - | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F1 | F2 | F3 | | | | 1 | 2 | 3 | = | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F11 | F12 | | DEL | Bksp | 0 | | | | RET | + * `-----------------------------------------------------------------------------------' + */ +[_CALC] = LAYOUT_planck_grid( + KC_TRNS, KC_F7, KC_F8, KC_F9, _______, _______, KC_ASTR, KC_7, KC_8, KC_9, KC_BSLS, KC_TRNS, + _______, KC_F4, KC_F5, KC_F6, _______, _______, KC_PLUS, KC_4, KC_5, KC_6, KC_MINS, KC_BSLS, + _______, KC_F1, KC_F2, KC_F3, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQL, _______, + _______, _______, KC_F11, KC_F12, _______, KC_DEL, KC_BSPC, KC_0, _______, _______, KC_ENT, _______ +), + +/* Nav + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | HOME | PGUP | PGDN | END | LEFT | DOWN | UP |RIGHT | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NAV] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-------------------------------------------------------------------------------------------. + * | | Reset| |RGB_TOG|RGB_MOD|RGB_HUI|RGB_HUD|RGB_SAI|RGB_SAD|RGB_VAI|RGB_VAD| Del | + * |------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+------| + * | | |MU_MOD|Aud on |Audoff |AGnorm |AGswap | | | | | | + * |------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+------| + * | |Voice-|Voice+|Mus on |Musoff |MIDIon |MIDIof |TERMon |TERMof | | | | + * |------+------+------+-------+-------+-------+-------+-------+-------+-------+-------+------| + * | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, 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, _______, _______, _______, + _______, _______, _______, _______, _______, KC_TRNS, KC_TRNS, _______, _______, _______, _______, _______ +) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}; + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +}; diff --git a/keyboards/planck/keymaps/pickle_jr/rules.mk b/keyboards/planck/keymaps/pickle_jr/rules.mk new file mode 100644 index 0000000000..d452c706d0 --- /dev/null +++ b/keyboards/planck/keymaps/pickle_jr/rules.mk @@ -0,0 +1,18 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +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 +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file -- cgit v1.2.3