From 01cdf4b348c18ff645bbf3b20263e87ff091ff4e Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sun, 26 Aug 2018 16:11:57 +0200 Subject: [PATCH 01/21] Add Initial layout configuration. --- .../lets_split/keymaps/geripgeri/config.h | 37 +++ .../lets_split/keymaps/geripgeri/keymap.c | 211 ++++++++++++++++++ .../lets_split/keymaps/geripgeri/rules.mk | 3 + 3 files changed, 251 insertions(+) create mode 100644 keyboards/lets_split/keymaps/geripgeri/config.h create mode 100644 keyboards/lets_split/keymaps/geripgeri/keymap.c create mode 100644 keyboards/lets_split/keymaps/geripgeri/rules.mk diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h new file mode 100644 index 000000000000..5a6261c4f7cf --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c new file mode 100644 index 000000000000..eda4e5103c46 --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -0,0 +1,211 @@ +#include QMK_KEYBOARD_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 _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + 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] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower | SPC | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + 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_ESC, 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_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, 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_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_DEL, \ + 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 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_DEL, \ + 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, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +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 QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk new file mode 100644 index 000000000000..457a3d01d4a4 --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif From 0fa27255297c12d45fd696d84ccfd8ff27e07f3b Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sun, 26 Aug 2018 16:23:59 +0200 Subject: [PATCH 02/21] Set arduino pro micro's built in RX LED as Numlock --- keyboards/lets_split/keymaps/geripgeri/keymap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index eda4e5103c46..e6c2d4c3cd0b 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -149,6 +149,15 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +void led_set_user(uint8_t usb_led) { + // Set arduino pro micro's built in RX LED as Numlock + if (usb_led & (1< Date: Mon, 27 Aug 2018 16:25:08 +0200 Subject: [PATCH 03/21] Enable Autoshift feautre. --- keyboards/lets_split/keymaps/geripgeri/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk index 457a3d01d4a4..1cb47dd77ba4 100644 --- a/keyboards/lets_split/keymaps/geripgeri/rules.mk +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -1,3 +1,4 @@ ifndef QUANTUM_DIR include ../../../../Makefile endif +AUTO_SHIFT_ENABLE = yes From 163e9a72d2a53f0fff7396b121f27fe1b2552cf2 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Mon, 27 Aug 2018 16:36:21 +0200 Subject: [PATCH 04/21] Remove DVORAK layout. --- .../lets_split/keymaps/geripgeri/keymap.c | 38 ++----------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index e6c2d4c3cd0b..c0572bc4643c 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -8,15 +8,13 @@ extern keymap_config_t keymap_config; // entirely and just use numbers. #define _QWERTY 0 #define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 +#define _LOWER 2 +#define _RAISE 3 #define _ADJUST 16 enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, - DVORAK, LOWER, RAISE, ADJUST, @@ -63,24 +61,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_ortho_4x12( \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | @@ -121,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk| | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -130,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) @@ -140,7 +120,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef AUDIO_ENABLE float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); #endif @@ -178,15 +157,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); From eb49ab102d22df238a3d45c03f7f4c801786c93b Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Mon, 27 Aug 2018 20:18:43 +0200 Subject: [PATCH 05/21] Add Numpad, update default layer. --- .../lets_split/keymaps/geripgeri/keymap.c | 137 ++++++++++-------- 1 file changed, 78 insertions(+), 59 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index c0572bc4643c..766e0a9db23f 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -10,6 +10,7 @@ extern keymap_config_t keymap_config; #define _COLEMAK 1 #define _LOWER 2 #define _RAISE 3 +#define _NUMPAD 4 #define _ADJUST 16 enum custom_keycodes { @@ -17,6 +18,7 @@ enum custom_keycodes { COLEMAK, LOWER, RAISE, + NUMPAD, ADJUST, }; @@ -26,33 +28,33 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower | SPC | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | ALT |Numpad| GUI |Lower | SPC | | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = LAYOUT_ortho_4x12( - 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_ESC, 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_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + 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_ESC, 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_ENT , \ + KC_LCTL, KC_LALT, NUMPAD, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| -------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| +------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_COLEMAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ @@ -62,15 +64,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------- |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | 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_DEL, \ @@ -80,15 +82,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | 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_DEL, \ @@ -98,23 +100,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk| | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) +), +/* Numpad + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | 7 | 8 | 9 | / | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | 4 | 5 | 6 | * | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | 3 | 2 | 1 | - | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | Bksp | 0 | | + | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_NUMPAD] = LAYOUT_ortho_4x12( \ + _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PSLS, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PAST, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ +) }; @@ -128,15 +147,6 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -void led_set_user(uint8_t usb_led) { - // Set arduino pro micro's built in RX LED as Numlock - if (usb_led & (1<event.pressed){ + layer_on(_NUMPAD); + PORTB &= ~(1<<0); + } else { + layer_off(_NUMPAD); + PORTB |= (1<<0); + } + break; } return true; } From 2e68d0c8535359de5661a5268642ee3acd55ae8b Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Wed, 12 Sep 2018 18:29:48 +0200 Subject: [PATCH 06/21] Update AutoShift timeout. --- keyboards/lets_split/keymaps/geripgeri/config.h | 3 +-- keyboards/lets_split/keymaps/geripgeri/rules.mk | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 5a6261c4f7cf..214c15cd2fd9 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -31,7 +31,6 @@ along with this program. If not, see . /* Select hand configuration */ #define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS +#define AUTO_SHIFT_TIMEOUT 130 #endif diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk index 1cb47dd77ba4..8000a6c849c5 100644 --- a/keyboards/lets_split/keymaps/geripgeri/rules.mk +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -2,3 +2,4 @@ ifndef QUANTUM_DIR include ../../../../Makefile endif AUTO_SHIFT_ENABLE = yes +AUTO_SHIFT_MODIFIERS = no From 54e4e21e7a53ddb3a327ffc1ae8d7f1118ee9b2b Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Fri, 21 Dec 2018 12:36:57 +0100 Subject: [PATCH 07/21] Beautify ASCII Art. --- .../lets_split/keymaps/geripgeri/keymap.c | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 766e0a9db23f..92b6045c659a 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -28,15 +28,15 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | ALT |Numpad| GUI |Lower | SPC | | Bksp |Raise | Left | Down | Up |Right | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | ALT |Numpad| GUI |Lower | SPC | | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ @@ -46,93 +46,93 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Colemak - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+------| -------+------+------+------+------+------| - * | Esc | A | R | S | T | D | | H | N | E | I | O | ' | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | - * |------+------+------+------+------+------| +------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_COLEMAK] = LAYOUT_ortho_4x12( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - KC_ESC, 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_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, 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_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower - * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+------- |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO ~ |ISO | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | 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_DEL, \ - 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 \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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 | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | 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_DEL, \ - 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 \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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| | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Numpad - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | 7 | 8 | 9 | / | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | 4 | 5 | 6 | * | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | 3 | 2 | 1 | - | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | Bksp | 0 | | + | | | - * `-----------------------------------------' `-----------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | 7 | 8 | 9 | / | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | 4 | 5 | 6 | * | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | 3 | 2 | 1 | - | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | Bksp | 0 | | + | | | + * `-----------------------------------------' `-----------------------------------------' */ [_NUMPAD] = LAYOUT_ortho_4x12( \ - _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PSLS, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PAST, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ + _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PSLS, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PAST, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ ) }; From b4eaa82ad6a1fdfc90bb4940aa72fe555d25e467 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Thu, 27 Dec 2018 23:22:44 +0100 Subject: [PATCH 08/21] Update keymap. --- .../lets_split/keymaps/geripgeri/config.h | 4 --- .../lets_split/keymaps/geripgeri/keymap.c | 33 ++++++++++--------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 214c15cd2fd9..2f5bdcc15084 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -23,13 +23,9 @@ along with this program. If not, see . #include "../../config.h" -/* Use I2C or Serial, not both */ - #define USE_SERIAL -// #define USE_I2C /* Select hand configuration */ - #define MASTER_LEFT #define AUTO_SHIFT_TIMEOUT 130 diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 92b6045c659a..6f2a24576c1e 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -65,45 +65,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | = | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * | | F1 | F2 | F3 | F4 | F5 | | F6 | Home | End | { | } | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO ~ |ISO | | | | | + * | | F7 | F8 | F9 | F10 | F11 | | F12 | Pgup |Pgdown| | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | |Insert| | Del | | 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_DEL, \ - 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 \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_HOME, KC_END, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_PGDOWN ,_______, _______, _______, \ + _______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise * ,-----------------------------------------. ,-----------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * | | F1 | F2 | F3 | F4 | F5 | | F6 | | | [ | ] | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | \ | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | 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_DEL, \ - 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_LBRC, KC_RBRC, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_BSLS, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------. ,-----------------------------------------. - * | | Reset| | | | | | | | | | | Del | + * | Reset|EEPRST| | | | | | | | | | | TGLAS| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk| | | | + * | | | |Aud on|Audoff|AGnorm| | |Qwerty|Colemk| | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -111,8 +111,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ + RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ASTG, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, QWERTY, COLEMAK, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -207,3 +207,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } + From 793139f59f8b2f93d020bda560a7f3ddbdbedc30 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Fri, 21 Dec 2018 13:10:49 +0100 Subject: [PATCH 09/21] Add Initial verison of RGB lighting. --- keyboards/lets_split/keymaps/geripgeri/config.h | 6 ++++++ keyboards/lets_split/keymaps/geripgeri/keymap.c | 8 ++++---- keyboards/lets_split/keymaps/geripgeri/rules.mk | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 2f5bdcc15084..44bdcc1e099e 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -30,3 +30,9 @@ along with this program. If not, see . #define AUTO_SHIFT_TIMEOUT 130 #endif + +// RGB lighting +#define RGBLIGHT_ANIMATIONS +#undef RGBLED_NUM +#define RGBLED_NUM 24 + diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 6f2a24576c1e..7daaee80625b 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -123,16 +123,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | 4 | 5 | 6 | * | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | 3 | 2 | 1 | - | | | + * | | VAI | SAI | SAD | HUI | HUD | | 3 | 2 | 1 | - | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | Bksp | 0 | | + | | | + * | | | | |RGBMFW|RGBTGL| | Bksp | 0 | | + | | | * `-----------------------------------------' `-----------------------------------------' */ [_NUMPAD] = LAYOUT_ortho_4x12( \ _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PSLS, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PAST, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ + _______, RGB_VAI,RGB_SAI,RGB_SAD, RGB_HUI,RGB_HUD, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ + _______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ ) }; diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk index 8000a6c849c5..e34d2939c464 100644 --- a/keyboards/lets_split/keymaps/geripgeri/rules.mk +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -3,3 +3,4 @@ ifndef QUANTUM_DIR endif AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_MODIFIERS = no +RGBLIGHT_ENABLE = yes From ab8e49500983c426f332910d4c039491f991df71 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Fri, 21 Dec 2018 17:37:39 +0100 Subject: [PATCH 10/21] Add Tap dance, hungarian letters. .Xmodmap example: https://github.com/geripgeri/dotfiles/commit/09f058753dd10e4ff8ab2aac7274b5600c466392 --- .../lets_split/keymaps/geripgeri/config.h | 1 + .../lets_split/keymaps/geripgeri/keymap.c | 60 ++++++++++++++++--- .../lets_split/keymaps/geripgeri/rules.mk | 2 + 3 files changed, 56 insertions(+), 7 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 44bdcc1e099e..9b6579f2e0c0 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -36,3 +36,4 @@ along with this program. If not, see . #undef RGBLED_NUM #define RGBLED_NUM 24 +#define TAPPING_TERM 200 diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 7daaee80625b..c63e9107eae4 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -20,8 +20,39 @@ enum custom_keycodes { RAISE, NUMPAD, ADJUST, + AE, + EE, + IE, }; +enum td_hungarian_letters { + U, + O +}; + + +void tap_dance_u_finished (qk_tap_dance_state_t *state, void *user_data) { + switch(state->count) { + case 1: SEND_STRING(SS_RALT("]")); break; + case 2: SEND_STRING(SS_RALT("-")); break; + case 3: SEND_STRING(SS_RALT("\\")); break; + } +} + +void tap_dance_o_finished (qk_tap_dance_state_t *state, void *user_data) { + switch(state->count) { + case 1: SEND_STRING(SS_RALT("=")); break; + case 2: SEND_STRING(SS_RALT("0")); break; + case 3: SEND_STRING(SS_RALT("[")); break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [U] = ACTION_TAP_DANCE_FN(tap_dance_u_finished), + [O] = ACTION_TAP_DANCE_FN(tap_dance_o_finished) +}; + + // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -101,20 +132,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------. ,-----------------------------------------. - * | Reset|EEPRST| | | | | | | | | | | TGLAS| + * | Reset|EEPRST| | EE | | | | | UE | IE | OE | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm| | |Qwerty|Colemk| | | | + * | | AE | |Aud on|Audoff|AGnorm| |Qwerty|Colemk| | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | + * | TGLAS| | | | | | | | | | | | | * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ - RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ASTG, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, QWERTY, COLEMAK, _______, _______, _______, \ + RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______,_______, \ + _______, AE, _______, AU_ON, AU_OFF, AG_NORM, QWERTY, COLEMAK, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Numpad @@ -203,7 +234,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_NUMPAD); PORTB |= (1<<0); } - break; + break; + case AE: + if(record->event.pressed) { + SEND_STRING(SS_RALT("'")); + } + break; + case EE: + if(record->event.pressed) { + SEND_STRING(SS_RALT(";")); + } + break; + case IE: + if(record->event.pressed) { + SEND_STRING(SS_RALT("z")); + } + break; } return true; } diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk index e34d2939c464..b318e569c42d 100644 --- a/keyboards/lets_split/keymaps/geripgeri/rules.mk +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -4,3 +4,5 @@ endif AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_MODIFIERS = no RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes + From 3d62710ef10ef476112e424fd87de808790e2afc Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Thu, 27 Dec 2018 23:04:23 +0100 Subject: [PATCH 11/21] Update RGB to use only noeeprom functions. --- .../lets_split/keymaps/geripgeri/config.h | 8 +- .../lets_split/keymaps/geripgeri/keymap.c | 92 ++++++++++++++++++- 2 files changed, 95 insertions(+), 5 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 9b6579f2e0c0..2c82d1181118 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -32,8 +32,14 @@ along with this program. If not, see . #endif // RGB lighting -#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP #undef RGBLED_NUM #define RGBLED_NUM 24 +#define RGBLIGHT_SLEEP + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_STATIC_GRADIENT #define TAPPING_TERM 200 diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index c63e9107eae4..a671d008bc12 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -23,6 +23,15 @@ enum custom_keycodes { AE, EE, IE, + VAD_NEE, + VAI_NEE, + SAI_NEE, + SAD_NEE, + HUI_NEE, + HUD_NEE, + TOG_NEE, + RGB_ANM, + RGB_PRE }; enum td_hungarian_letters { @@ -30,6 +39,8 @@ enum td_hungarian_letters { O }; +uint32_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1; + void tap_dance_u_finished (qk_tap_dance_state_t *state, void *user_data) { switch(state->count) { @@ -154,16 +165,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | 4 | 5 | 6 | * | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | VAI | SAI | SAD | HUI | HUD | | 3 | 2 | 1 | - | | | + * | VAI | VAD | SAI | SAD | HUI | HUD | | 3 | 2 | 1 | - | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | |RGBMFW|RGBTGL| | Bksp | 0 | | + | | | + * | | | |RGBMPR|RGBMFW|RGBTGL| | Bksp | 0 | | + | | | * `-----------------------------------------' `-----------------------------------------' */ [_NUMPAD] = LAYOUT_ortho_4x12( \ _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PSLS, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PAST, _______, _______, \ - _______, RGB_VAI,RGB_SAI,RGB_SAD, RGB_HUI,RGB_HUD, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ - _______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ + VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ + _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ ) }; @@ -250,7 +261,80 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_RALT("z")); } break; + case VAI_NEE: + if(record->event.pressed) { + rgblight_increase_val_noeeprom(); + } + break; + case VAD_NEE: + if(record->event.pressed) { + rgblight_decrease_val_noeeprom(); + } + break; + case SAI_NEE: + if(record->event.pressed) { + rgblight_increase_sat_noeeprom(); + } + break; + case SAD_NEE: + if(record->event.pressed) { + rgblight_decrease_sat_noeeprom(); + } + break; + case HUI_NEE: + if(record->event.pressed) { + rgblight_increase_hue_noeeprom(); + } + break; + case HUD_NEE: + if(record->event.pressed) { + rgblight_decrease_hue_noeeprom(); + } + break; + case TOG_NEE: + if(record->event.pressed) { + rgblight_toggle_noeeprom(); + } + break; + case RGB_ANM: + if(record->event.pressed) { + rgblight_step_noeeprom(); + rgb_mode = rgblight_get_mode(); + } + break; + case RGB_PRE: + if(record->event.pressed) { + rgblight_step_reverse_noeeprom(); + rgb_mode = rgblight_get_mode(); + } + break; } return true; } +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _RAISE: + rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _LOWER: + rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2 - 1); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _NUMPAD: + rgblight_setrgb_at(0,255,0, 0); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + default: + rgblight_mode_noeeprom(rgb_mode); + break; + } + return state; +} + +void led_set_user(uint8_t usb_led) { + rgblight_sethsv_noeeprom(38, 247, 127); + rgblight_mode_noeeprom(rgb_mode); +} + From dc7a7999e48cb95c59db710a3e8960a4718f8a2f Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sat, 23 Feb 2019 10:44:43 +0100 Subject: [PATCH 12/21] Change default rgb led color. --- keyboards/lets_split/keymaps/geripgeri/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index a671d008bc12..b3b01d43c945 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -334,7 +334,7 @@ uint32_t layer_state_set_user(uint32_t state) { } void led_set_user(uint8_t usb_led) { - rgblight_sethsv_noeeprom(38, 247, 127); + rgblight_sethsv_noeeprom(0, 255, 255); rgblight_mode_noeeprom(rgb_mode); } From 75214fa2504bdcaa113bde794fd0e125aa493175 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sat, 23 Feb 2019 11:34:49 +0100 Subject: [PATCH 13/21] Add `pragma once`. --- keyboards/lets_split/keymaps/geripgeri/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 2c82d1181118..1368257a73b7 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#pragma once + #ifndef CONFIG_USER_H #define CONFIG_USER_H From 54e7b1de7f06b5936c7055e50debfd04fd9d3fa0 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Mon, 26 Aug 2019 15:28:53 +0200 Subject: [PATCH 14/21] Emojis added. --- .../lets_split/keymaps/geripgeri/config.h | 2 +- .../lets_split/keymaps/geripgeri/keymap.c | 148 +++++++++++------- 2 files changed, 92 insertions(+), 58 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 1368257a73b7..9ed5a1159c3a 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -30,7 +30,7 @@ along with this program. If not, see . /* Select hand configuration */ #define MASTER_LEFT -#define AUTO_SHIFT_TIMEOUT 130 +#define AUTO_SHIFT_TIMEOUT 200 #endif // RGB lighting diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index b3b01d43c945..fb6ab81566dd 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -7,15 +7,13 @@ extern keymap_config_t keymap_config; // 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 _QWERTY 0 -#define _COLEMAK 1 -#define _LOWER 2 -#define _RAISE 3 -#define _NUMPAD 4 +#define _LOWER 1 +#define _RAISE 2 +#define _NUMPAD 3 #define _ADJUST 16 enum custom_keycodes { QWERTY = SAFE_RANGE, - COLEMAK, LOWER, RAISE, NUMPAD, @@ -31,9 +29,20 @@ enum custom_keycodes { HUD_NEE, TOG_NEE, RGB_ANM, - RGB_PRE + RGB_PRE, + SLIGHTLY, + SMILE, + JOY, + RELAXED, + HEART, + SAD, + CRY, + NETRURAL, + SCREAM, + THUMBSUP }; + enum td_hungarian_letters { U, O @@ -73,79 +82,62 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------. ,-----------------------------------------. * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | ALT |Numpad| GUI |Lower | SPC | | Bksp |Raise | Left | Down | Up |Right | + * | Ctrl | ALT |Numpad| GUI |Lower | Space| | Bksp |Raise | Left | Down | Up |Right | * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = LAYOUT_ortho_4x12( - 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, \ KC_ESC, 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_ENT , \ KC_LCTL, KC_LALT, NUMPAD, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), -/* Colemak - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | A | R | S | T | D | | H | N | E | I | O | ' | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------' `-----------------------------------------' - */ -[_COLEMAK] = LAYOUT_ortho_4x12( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - KC_ESC, 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_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), /* Lower * ,-----------------------------------------. ,-----------------------------------------. * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | = | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | | F6 | Home | End | { | } | | | + * | :) | :D | :'D | :$ | <3 | | | Home | Pgup | | { | } | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | Pgup |Pgdown| | | | + * | :( | :'( | :| | :O | +1 | | | End |Pgdown| | [ | ] |PrntSc| * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | |Insert| | Del | | 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_EQL, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_HOME, KC_END, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_PGDOWN ,_______, _______, _______, \ - _______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + SLIGHTLY, SMILE, JOY, RELAXED, HEART, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ + SAD, CRY, NETRURAL, SCREAM, THUMBSUP, _______, KC_END, KC_PGDOWN,_______, KC_LBRC, KC_RBRC, KC_PSCREEN, \ + _______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, TD(NEXTPREV), KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise * ,-----------------------------------------. ,-----------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | | F6 | | | [ | ] | | + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | \ | | + * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | 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_DEL, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_LBRC, KC_RBRC, _______, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_BSLS, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------. ,-----------------------------------------. * | Reset|EEPRST| | EE | | | | | UE | IE | OE | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | AE | |Aud on|Audoff|AGnorm| |Qwerty|Colemk| | | | | + * | | AE | |Aud on|Audoff| | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -153,28 +145,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ - RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______,_______, \ - _______, AE, _______, AU_ON, AU_OFF, AG_NORM, QWERTY, COLEMAK, _______, _______, _______, _______, \ + RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______, _______, \ + _______, AE, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Numpad * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | 7 | 8 | 9 | / | | | + * | | | | | | | | 7 | 8 | 9 | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | 4 | 5 | 6 | * | | | + * | | | | | | | | 4 | 5 | 6 | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | VAI | VAD | SAI | SAD | HUI | HUD | | 3 | 2 | 1 | - | | | + * | VAI | VAD | SAI | SAD | HUI | HUD | | 3 | 2 | 1 | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |RGBMPR|RGBMFW|RGBTGL| | Bksp | 0 | | + | | | + * | | | |RGBMPR|RGBMFW|RGBTGL| | Calc | 0 | + | | | | * `-----------------------------------------' `-----------------------------------------' */ [_NUMPAD] = LAYOUT_ortho_4x12( \ - _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PSLS, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PAST, _______, _______, \ - VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, KC_PMNS, _______, _______, \ - _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_BSPC, KC_0, _______, KC_PPLS, _______, _______ \ + _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ + VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, _______, _______, _______, \ + _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ \ ) }; @@ -200,15 +192,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -308,6 +291,57 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rgb_mode = rgblight_get_mode(); } break; + case SLIGHTLY: + if(record->event.pressed) { + SEND_STRING(":slightly_smiling_face:"); + } + break; + case SMILE: + if(record->event.pressed) { + SEND_STRING(":smile:"); + } + break; + case JOY: + if(record->event.pressed) { + SEND_STRING(":joy:"); + } + break; + case RELAXED: + if(record->event.pressed) { + SEND_STRING(":relaxed:"); + } + break; + case HEART: + if(record->event.pressed) { + SEND_STRING(":heart:"); + } + break; + case SAD: + if(record->event.pressed) { + SEND_STRING(":white_frowning_face:"); + } + break; + case CRY: + if(record->event.pressed) { + SEND_STRING(":cry:"); + } + break; + case NETRURAL: + if(record->event.pressed) { + SEND_STRING(":neutral_face:"); + } + break; + case SCREAM: + if(record->event.pressed) { + SEND_STRING(":scream:"); + } + break; + case THUMBSUP: + if(record->event.pressed) { + SEND_STRING(":+1:"); + } + break; + } return true; } From ff877f173a72aeb26c9f46b0b7f77f80d85f25c0 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sat, 7 Dec 2019 18:14:44 +0100 Subject: [PATCH 15/21] Add tap dance for hungarian letters, multimedia control, slash/backslash. --- .../lets_split/keymaps/geripgeri/keymap.c | 114 +++++++++++++----- 1 file changed, 87 insertions(+), 27 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index fb6ab81566dd..284a82a66647 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -43,35 +43,34 @@ enum custom_keycodes { }; -enum td_hungarian_letters { - U, - O +enum td_extra_keys { + U = 0 , + O = 1, + NEXTPREV = 2, + SLASH = 3 }; -uint32_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1; +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 +}; -void tap_dance_u_finished (qk_tap_dance_state_t *state, void *user_data) { - switch(state->count) { - case 1: SEND_STRING(SS_RALT("]")); break; - case 2: SEND_STRING(SS_RALT("-")); break; - case 3: SEND_STRING(SS_RALT("\\")); break; - } -} +int cur_dance (qk_tap_dance_state_t *state); -void tap_dance_o_finished (qk_tap_dance_state_t *state, void *user_data) { - switch(state->count) { - case 1: SEND_STRING(SS_RALT("=")); break; - case 2: SEND_STRING(SS_RALT("0")); break; - case 3: SEND_STRING(SS_RALT("[")); break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [U] = ACTION_TAP_DANCE_FN(tap_dance_u_finished), - [O] = ACTION_TAP_DANCE_FN(tap_dance_o_finished) -}; +void u_finished (qk_tap_dance_state_t *state, void *user_data); +void o_finished (qk_tap_dance_state_t *state, void *user_data); +uint32_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1; // Fillers to make layering more clear #define _______ KC_TRNS @@ -92,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, \ KC_ESC, 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_ENT , \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(SLASH), KC_ENT , \ KC_LCTL, KC_LALT, NUMPAD, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), @@ -109,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' `-----------------------------------------' */ [_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_EQL, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL, \ SLIGHTLY, SMILE, JOY, RELAXED, HEART, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ SAD, CRY, NETRURAL, SCREAM, THUMBSUP, _______, KC_END, KC_PGDOWN,_______, KC_LBRC, KC_RBRC, KC_PSCREEN, \ _______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, TD(NEXTPREV), KC_VOLD, KC_VOLU, KC_MPLY \ @@ -129,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_DEL, \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -341,7 +340,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(":+1:"); } break; - } return true; } @@ -372,3 +370,65 @@ void led_set_user(uint8_t usb_led) { rgblight_mode_noeeprom(rgb_mode); } + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. + else return SINGLE_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) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + //Assumes no one is trying to type the same letter three times (at least not quickly). + //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add + //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; //magic number. At some point this method will expand to work for more presses +} + +static tap utap_state = { + .is_press_action = true, + .state = 0 +}; + +static tap otap_state = { + .is_press_action = true, + .state = 0 +}; + + +void u_finished (qk_tap_dance_state_t *state, void *user_data) { + utap_state.state = cur_dance(state); + switch(utap_state.state) { + case SINGLE_TAP: SEND_STRING(SS_RALT("]")); break; + case DOUBLE_TAP: SEND_STRING(SS_RALT("-")); break; + case TRIPLE_TAP: SEND_STRING(SS_RALT("\\")); break; + } +} + +void o_finished (qk_tap_dance_state_t *state, void *user_data) { + otap_state.state = cur_dance(state); + switch(otap_state.state) { + case SINGLE_TAP: SEND_STRING(SS_RALT("=")); break; + case DOUBLE_TAP: SEND_STRING(SS_RALT("0")); break; + case TRIPLE_TAP: SEND_STRING(SS_RALT("[")); break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [U] = ACTION_TAP_DANCE_FN(u_finished), + [O] = ACTION_TAP_DANCE_FN(o_finished), + [NEXTPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), + [SLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_BSLS) + }; From 0f411633d69f755102eb9ca0bb901b05b4f95b85 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sat, 7 Dec 2019 18:27:52 +0100 Subject: [PATCH 16/21] Remove audio related code. --- .../lets_split/keymaps/geripgeri/keymap.c | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 284a82a66647..859479542a43 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -42,7 +42,6 @@ enum custom_keycodes { THUMBSUP }; - enum td_extra_keys { U = 0 , O = 1, @@ -95,7 +94,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, NUMPAD, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - /* Lower * ,-----------------------------------------. ,-----------------------------------------. * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | = | @@ -136,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------. ,-----------------------------------------. * | Reset|EEPRST| | EE | | | | | UE | IE | OE | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | AE | |Aud on|Audoff| | | | | | | | | + * | | AE | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -145,7 +143,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_4x12( \ RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______, _______, \ - _______, AE, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, \ + _______, AE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -166,14 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, _______, _______, _______, \ _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ \ -) - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif +)}; void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); @@ -184,9 +175,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif persistent_default_layer_set(1UL<<_QWERTY); } return false; @@ -370,7 +358,6 @@ void led_set_user(uint8_t usb_led) { rgblight_mode_noeeprom(rgb_mode); } - int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { if (state->interrupted || !state->pressed) return SINGLE_TAP; @@ -407,7 +394,6 @@ static tap otap_state = { .state = 0 }; - void u_finished (qk_tap_dance_state_t *state, void *user_data) { utap_state.state = cur_dance(state); switch(utap_state.state) { From 30bccd5d632a588b8502b3a6d7f025ec97d50ceb Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sat, 7 Dec 2019 22:03:41 +0100 Subject: [PATCH 17/21] Add Gaming layer. --- .../lets_split/keymaps/geripgeri/config.h | 1 + .../lets_split/keymaps/geripgeri/keymap.c | 43 ++++++++++++++++--- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 9ed5a1159c3a..ddf506516877 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -31,6 +31,7 @@ along with this program. If not, see . #define MASTER_LEFT #define AUTO_SHIFT_TIMEOUT 200 +#define NO_AUTO_SHIFT_NUMERIC #endif // RGB lighting diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 859479542a43..944058c6fc26 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -9,7 +9,8 @@ extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 -#define _NUMPAD 3 +#define _NUMPAD 3 +#define _GAMING 4 #define _ADJUST 16 enum custom_keycodes { @@ -18,6 +19,7 @@ enum custom_keycodes { RAISE, NUMPAD, ADJUST, + GAMING, AE, EE, IE, @@ -114,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Raise * ,-----------------------------------------. ,-----------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -138,14 +140,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | TGLAS| | | | | | | | | | | | | + * | TGLAS| | | | | | | | | | | |GAMING| * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______, _______, \ _______, AE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAMING \ ), /* Numpad @@ -162,8 +164,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMPAD] = LAYOUT_ortho_4x12( \ _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ - VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, _______, _______, _______, \ - _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ \ + VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, _______, _______, _______, \ + _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ \ +), + +/* Gaming + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | RAISE| | | | LOWER| | | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_GAMING] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______ \ )}; void persistent_default_layer_set(uint16_t default_layer) { @@ -175,6 +195,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { + rgb_mode = RGBLIGHT_MODE_BREATHING + 1; + autoshift_enable(); persistent_default_layer_set(1UL<<_QWERTY); } return false; @@ -207,6 +229,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case GAMING: + if (record->event.pressed) { + rgb_mode = RGBLIGHT_MODE_RAINBOW_SWIRL + 5; + autoshift_disable(); + default_layer_set(1UL<<_GAMING); + } + return false; + break; case NUMPAD: if(record->event.pressed){ layer_on(_NUMPAD); @@ -215,6 +245,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_NUMPAD); PORTB |= (1<<0); } + return false; break; case AE: if(record->event.pressed) { From 7d08af8f7f4c918fbf9bd3dbe5ee7cdbe7d388e8 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sun, 8 Dec 2019 10:51:00 +0100 Subject: [PATCH 18/21] Remove unnecessary code, update copyright. --- keyboards/lets_split/keymaps/geripgeri/config.h | 10 ++-------- keyboards/lets_split/keymaps/geripgeri/keymap.c | 6 ------ keyboards/lets_split/keymaps/geripgeri/rules.mk | 3 --- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index ddf506516877..4574fe2a958c 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -3,6 +3,7 @@ This is the c configuration file for the keymap Copyright 2012 Jun Wako Copyright 2015 Jack Humbert +Copyright 2019 Gergely Peidl 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 @@ -23,13 +24,6 @@ along with this program. If not, see . #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" - -#define USE_SERIAL - -/* Select hand configuration */ -#define MASTER_LEFT - #define AUTO_SHIFT_TIMEOUT 200 #define NO_AUTO_SHIFT_NUMERIC #endif @@ -37,7 +31,7 @@ along with this program. If not, see . // RGB lighting #define RGBLIGHT_SLEEP #undef RGBLED_NUM -#define RGBLED_NUM 24 +#define RGBLED_NUM 32 #define RGBLIGHT_SLEEP #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 944058c6fc26..d38e238f7703 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_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 @@ -73,10 +71,6 @@ void o_finished (qk_tap_dance_state_t *state, void *user_data); uint32_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------. ,-----------------------------------------. diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk index b318e569c42d..5cefc001771a 100644 --- a/keyboards/lets_split/keymaps/geripgeri/rules.mk +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -1,6 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_MODIFIERS = no RGBLIGHT_ENABLE = yes From 782594ff7f8f81731f1cbb1a90a429418392d33f Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Mon, 23 Dec 2019 15:32:53 +0100 Subject: [PATCH 19/21] Add readme.md --- keyboards/lets_split/keymaps/geripgeri/readme.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 keyboards/lets_split/keymaps/geripgeri/readme.md diff --git a/keyboards/lets_split/keymaps/geripgeri/readme.md b/keyboards/lets_split/keymaps/geripgeri/readme.md new file mode 100644 index 000000000000..09f1bedee79d --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/readme.md @@ -0,0 +1,3 @@ +# Personal Layout + +[Layout](http://www.keyboard-layout-editor.com/#/gists/8eae83bfb830d847c94c7ff423bbdc84) From 75a80232b905ece7452e61f5be237f44cc55f1cb Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Mon, 23 Dec 2019 21:18:51 +0100 Subject: [PATCH 20/21] Implement code review suggestions. --- .../lets_split/keymaps/geripgeri/config.h | 1 - .../lets_split/keymaps/geripgeri/keymap.c | 89 +++++++++---------- 2 files changed, 41 insertions(+), 49 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 4574fe2a958c..0e0b3fee18bf 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -32,7 +32,6 @@ along with this program. If not, see . #define RGBLIGHT_SLEEP #undef RGBLED_NUM #define RGBLED_NUM 32 -#define RGBLIGHT_SLEEP #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index d38e238f7703..e7197da4bd76 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -1,15 +1,13 @@ #include QMK_KEYBOARD_H -// 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 _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _NUMPAD 3 -#define _GAMING 4 -#define _ADJUST 16 +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _NUMPAD, + _GAMING, + _ADJUST +}; enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -43,10 +41,10 @@ enum custom_keycodes { }; enum td_extra_keys { - U = 0 , - O = 1, - NEXTPREV = 2, - SLASH = 3 + U, + O, + NEXTPREV, + SLASH }; typedef struct { @@ -84,10 +82,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = LAYOUT_ortho_4x12( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, \ - KC_ESC, 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, TD(SLASH), KC_ENT , \ - KC_LCTL, KC_LALT, NUMPAD, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, + KC_ESC, 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, TD(SLASH), KC_ENT, + KC_LCTL, KC_LALT, NUMPAD, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -101,11 +99,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | |Insert| | Del | | 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_EQL, \ - SLIGHTLY, SMILE, JOY, RELAXED, HEART, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ - SAD, CRY, NETRURAL, SCREAM, THUMBSUP, _______, KC_END, KC_PGDOWN,_______, KC_LBRC, KC_RBRC, KC_PSCREEN, \ - _______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, TD(NEXTPREV), KC_VOLD, KC_VOLU, KC_MPLY \ +[_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_EQL, + SLIGHTLY, SMILE, JOY, RELAXED, HEART, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_PIPE, + SAD, CRY, NETRURAL, SCREAM, THUMBSUP, _______, KC_END, KC_PGDOWN,_______, KC_LBRC, KC_RBRC, KC_PSCREEN, + _______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, TD(NEXTPREV), KC_VOLD, KC_VOLU, KC_MPLY ), /* Raise @@ -119,11 +117,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | * `-----------------------------------------' `-----------------------------------------' */ -[_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_DEL, \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +[_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_DEL, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust (Lower + Raise) @@ -137,11 +135,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | TGLAS| | | | | | | | | | | |GAMING| * `-----------------------------------------' `-----------------------------------------' */ -[_ADJUST] = LAYOUT_ortho_4x12( \ - RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______, _______, \ - _______, AE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAMING \ +[_ADJUST] = LAYOUT_ortho_4x12( + RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______, _______, + _______, AE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAMING ), /* Numpad @@ -155,11 +153,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | |RGBMPR|RGBMFW|RGBTGL| | Calc | 0 | + | | | | * `-----------------------------------------' `-----------------------------------------' */ -[_NUMPAD] = LAYOUT_ortho_4x12( \ - _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ - VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, _______, _______, _______, \ - _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ \ +[_NUMPAD] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, _______, _______, _______, + _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ ), /* Gaming @@ -174,24 +172,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' `-----------------------------------------' */ [_GAMING] = LAYOUT_ortho_4x12( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______ )}; -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 QWERTY: if (record->event.pressed) { rgb_mode = RGBLIGHT_MODE_BREATHING + 1; autoshift_enable(); - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; From bb9f1e27ed93b84679b3c1541a4fe6dcc5fe4d3d Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Thu, 26 Dec 2019 11:15:04 +0100 Subject: [PATCH 21/21] Implement code review suggestions #2 --- .../lets_split/keymaps/geripgeri/config.h | 4 - .../lets_split/keymaps/geripgeri/keymap.c | 200 ++++++------------ 2 files changed, 65 insertions(+), 139 deletions(-) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 0e0b3fee18bf..6e71ea2b935c 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -21,12 +21,8 @@ along with this program. If not, see . #pragma once -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - #define AUTO_SHIFT_TIMEOUT 200 #define NO_AUTO_SHIFT_NUMERIC -#endif // RGB lighting #define RGBLIGHT_SLEEP diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index e7197da4bd76..b268fb90c2b0 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -1,33 +1,16 @@ #include QMK_KEYBOARD_H enum layer_names { - _QWERTY, - _LOWER, - _RAISE, - _NUMPAD, - _GAMING, - _ADJUST + _QWERTY, + _LOWER, + _RAISE, + _NUMPAD, + _GAMING, + _ADJUST }; enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - NUMPAD, - ADJUST, - GAMING, - AE, - EE, - IE, - VAD_NEE, - VAI_NEE, - SAI_NEE, - SAD_NEE, - HUI_NEE, - HUD_NEE, - TOG_NEE, - RGB_ANM, - RGB_PRE, + NUMPAD = SAFE_RANGE, SLIGHTLY, SMILE, JOY, @@ -62,12 +45,15 @@ enum { TRIPLE_HOLD = 7 }; +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + int cur_dance (qk_tap_dance_state_t *state); void u_finished (qk_tap_dance_state_t *state, void *user_data); void o_finished (qk_tap_dance_state_t *state, void *user_data); -uint32_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1; +uint8_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -85,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, KC_ESC, 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, TD(SLASH), KC_ENT, - KC_LCTL, KC_LALT, NUMPAD, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LCTL, KC_LALT, MO(_NUMPAD), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -136,10 +122,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( - RESET, EEP_RST, _______, EE, _______, _______, _______, TD(U), IE, TD(O), _______, _______, - _______, AE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, EEP_RST, _______, RALT(KC_SCLN), _______, _______, _______, TD(U), RALT(KC_Z), TD(O), _______, _______, + _______, RALT(KC_QUOT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAMING + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_GAMING) ), /* Numpad @@ -148,16 +134,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | 4 | 5 | 6 | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | VAI | VAD | SAI | SAD | HUI | HUD | | 3 | 2 | 1 | | | | + * | VAI | SAI | HUI | | | | | 3 | 2 | 1 | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |RGBMPR|RGBMFW|RGBTGL| | Calc | 0 | + | | | | + * | | | | |RGBMOD|RGBTGL| | Calc | 0 | + | | | | * `-----------------------------------------' `-----------------------------------------' */ [_NUMPAD] = LAYOUT_ortho_4x12( _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, - VAI_NEE, VAD_NEE, SAI_NEE, SAD_NEE, HUI_NEE, HUD_NEE, KC_1, KC_2, KC_3, _______, _______, _______, - _______, _______, _______, RGB_PRE, RGB_ANM, TOG_NEE, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ + RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, + _______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ ), /* Gaming @@ -178,180 +164,118 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______ )}; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - rgb_mode = RGBLIGHT_MODE_BREATHING + 1; - autoshift_enable(); - set_single_persistent_default_layer(_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; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - case GAMING: - if (record->event.pressed) { - rgb_mode = RGBLIGHT_MODE_RAINBOW_SWIRL + 5; - autoshift_disable(); - default_layer_set(1UL<<_GAMING); - } - return false; - break; - case NUMPAD: - if(record->event.pressed){ - layer_on(_NUMPAD); - PORTB &= ~(1<<0); - } else { - layer_off(_NUMPAD); - PORTB |= (1<<0); - } - return false; - break; - case AE: - if(record->event.pressed) { - SEND_STRING(SS_RALT("'")); - } - break; - case EE: - if(record->event.pressed) { - SEND_STRING(SS_RALT(";")); - } - break; - case IE: - if(record->event.pressed) { - SEND_STRING(SS_RALT("z")); - } - break; - case VAI_NEE: + switch(keycode) { + case RGB_VAI: if(record->event.pressed) { rgblight_increase_val_noeeprom(); - } + } break; - case VAD_NEE: + case RGB_VAD: if(record->event.pressed) { rgblight_decrease_val_noeeprom(); - } + } break; - case SAI_NEE: + case RGB_SAI: if(record->event.pressed) { rgblight_increase_sat_noeeprom(); - } + } break; - case SAD_NEE: + case RGB_SAD: if(record->event.pressed) { rgblight_decrease_sat_noeeprom(); - } + } break; - case HUI_NEE: + case RGB_HUI: if(record->event.pressed) { rgblight_increase_hue_noeeprom(); - } + } break; - case HUD_NEE: + case RGB_HUD: if(record->event.pressed) { rgblight_decrease_hue_noeeprom(); - } + } break; - case TOG_NEE: + case RGB_TOG: if(record->event.pressed) { rgblight_toggle_noeeprom(); - } + } break; - case RGB_ANM: + case RGB_MOD: if(record->event.pressed) { rgblight_step_noeeprom(); rgb_mode = rgblight_get_mode(); - } + } break; - case RGB_PRE: + case RGB_RMOD: if(record->event.pressed) { rgblight_step_reverse_noeeprom(); rgb_mode = rgblight_get_mode(); - } + } break; + case SLIGHTLY: if(record->event.pressed) { SEND_STRING(":slightly_smiling_face:"); - } + } break; case SMILE: if(record->event.pressed) { SEND_STRING(":smile:"); - } + } break; case JOY: if(record->event.pressed) { SEND_STRING(":joy:"); - } + } break; case RELAXED: if(record->event.pressed) { SEND_STRING(":relaxed:"); - } + } break; case HEART: if(record->event.pressed) { SEND_STRING(":heart:"); - } + } break; case SAD: if(record->event.pressed) { SEND_STRING(":white_frowning_face:"); - } + } break; case CRY: if(record->event.pressed) { SEND_STRING(":cry:"); - } + } break; case NETRURAL: if(record->event.pressed) { SEND_STRING(":neutral_face:"); - } + } break; case SCREAM: if(record->event.pressed) { SEND_STRING(":scream:"); - } + } break; case THUMBSUP: if(record->event.pressed) { SEND_STRING(":+1:"); - } + } break; + default: + return true; } - return true; + return false; } -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + writePin(B0, !(state & (1UL << (_NUMPAD)))); + + switch(biton32(state)) { case _RAISE: rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); @@ -364,8 +288,14 @@ uint32_t layer_state_set_user(uint32_t state) { rgblight_setrgb_at(0,255,0, 0); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); break; + case _GAMING: + rgb_mode = RGBLIGHT_MODE_RAINBOW_SWIRL + 5; + autoshift_disable(); + break; default: - rgblight_mode_noeeprom(rgb_mode); + rgb_mode = RGBLIGHT_MODE_BREATHING + 1; + rgblight_mode_noeeprom(rgb_mode); + autoshift_enable(); break; } return state;