summaryrefslogtreecommitdiff
path: root/keyboards/gboards/gergoplex
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2022-06-27 16:38:28 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2022-06-27 16:38:28 +0200
commit98b9909429aea0869f7a6f2f44ab386a4a3ff094 (patch)
treee1080a61bb89a75edc70818489f8044adf597c48 /keyboards/gboards/gergoplex
parentb610965fd6d851484025166fb255078b1c809261 (diff)
parentfa3dd373b4925734d9843ae6014349069ffec353 (diff)
downloadqmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.tar.gz
qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.zip
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/gboards/gergoplex')
-rw-r--r--keyboards/gboards/gergoplex/config.h2
-rw-r--r--keyboards/gboards/gergoplex/gergoplex.h29
-rw-r--r--keyboards/gboards/gergoplex/info.json50
-rw-r--r--keyboards/gboards/gergoplex/keymaps/colemak-dhm/config.h4
-rw-r--r--keyboards/gboards/gergoplex/keymaps/colemak-dhm/rules.mk1
-rw-r--r--keyboards/gboards/gergoplex/keymaps/default/config.h4
-rw-r--r--keyboards/gboards/gergoplex/keymaps/default/rules.mk1
-rw-r--r--keyboards/gboards/gergoplex/keymaps/georgepetri/config.h3
-rw-r--r--keyboards/gboards/gergoplex/keymaps/georgepetri/gergoplex.def1
-rw-r--r--keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c119
-rw-r--r--keyboards/gboards/gergoplex/keymaps/georgepetri/rules.mk3
-rw-r--r--keyboards/gboards/gergoplex/keymaps/tgrosinger/combos.def11
-rw-r--r--keyboards/gboards/gergoplex/keymaps/tgrosinger/config.h4
-rw-r--r--keyboards/gboards/gergoplex/keymaps/tgrosinger/gergoplex.def17
-rw-r--r--keyboards/gboards/gergoplex/keymaps/tgrosinger/keymap.c286
-rw-r--r--keyboards/gboards/gergoplex/keymaps/tgrosinger/readme.md12
-rw-r--r--keyboards/gboards/gergoplex/keymaps/tgrosinger/rules.mk18
-rw-r--r--keyboards/gboards/gergoplex/matrix.c12
-rw-r--r--keyboards/gboards/gergoplex/rules.mk23
19 files changed, 550 insertions, 50 deletions
diff --git a/keyboards/gboards/gergoplex/config.h b/keyboards/gboards/gergoplex/config.h
index a6d8d6b1be..6a73ccc4ea 100644
--- a/keyboards/gboards/gergoplex/config.h
+++ b/keyboards/gboards/gergoplex/config.h
@@ -44,8 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { B1, B2, B3, D2, D3 }
#define UNUSED_PINS
#define IGNORE_MOD_TAP_INTERRUPT
-#define COMBO_ALLOW_ACTION_KEYS
-#define COMBO_VARIABLE_LEN
#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))
diff --git a/keyboards/gboards/gergoplex/gergoplex.h b/keyboards/gboards/gergoplex/gergoplex.h
index 507072a376..eda21d2a94 100644
--- a/keyboards/gboards/gergoplex/gergoplex.h
+++ b/keyboards/gboards/gergoplex/gergoplex.h
@@ -21,8 +21,8 @@
extern i2c_status_t mcp23018_status;
#define I2C_TIMEOUT 1000
-#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
-#define CPU_16MHz 0x00
+
+#define XXX KC_NO
// I2C aliases and register addresses (see "mcp23018.md")
#define I2C_ADDR 0x20 // 0b0100000
@@ -41,16 +41,15 @@ uint8_t init_mcp23018(void);
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \
L30, L31, L32, R30, R31, R32 \
- ) \
- { \
- {L04, L14, L24, KC_NO}, \
- {L03, L13, L23, L32}, \
- {L02, L12, L22, L31}, \
- {L01, L11, L21, L30}, \
- {L00, L10, L20, KC_NO}, \
- {R00, R10, R20, KC_NO}, \
- {R01, R11, R21, R30}, \
- {R02, R12, R22, R31}, \
- {R03, R13, R23, R32}, \
- {R04, R14, R24, KC_NO}, \
- }
+) { \
+ { L04, L14, L24, XXX }, \
+ { L03, L13, L23, L32 }, \
+ { L02, L12, L22, L31 }, \
+ { L01, L11, L21, L30 }, \
+ { L00, L10, L20, XXX }, \
+ { R00, R10, R20, XXX }, \
+ { R01, R11, R21, R30 }, \
+ { R02, R12, R22, R31 }, \
+ { R03, R13, R23, R32 }, \
+ { R04, R14, R24, XXX } \
+}
diff --git a/keyboards/gboards/gergoplex/info.json b/keyboards/gboards/gergoplex/info.json
new file mode 100644
index 0000000000..5aa696d5de
--- /dev/null
+++ b/keyboards/gboards/gergoplex/info.json
@@ -0,0 +1,50 @@
+{
+ "keyboard_name": "GergoPlex",
+ "url": "",
+ "maintainer": "germ",
+ "layouts": {
+ "LAYOUT_split_3x5_3": {
+ "layout": [
+ {"label":"L00", "x":0, "y":0.25},
+ {"label":"L01", "x":1, "y":0.125},
+ {"label":"L02", "x":2, "y":0},
+ {"label":"L03", "x":3, "y":0.125},
+ {"label":"L04", "x":4, "y":0.375},
+ {"label":"R00", "x":8, "y":0.375},
+ {"label":"R01", "x":9, "y":0.125},
+ {"label":"R02", "x":10, "y":0},
+ {"label":"R03", "x":11, "y":0.125},
+ {"label":"R04", "x":12, "y":0.25},
+
+ {"label":"L10", "x":0, "y":1.25},
+ {"label":"L11", "x":1, "y":1.125},
+ {"label":"L12", "x":2, "y":1},
+ {"label":"L13", "x":3, "y":1.125},
+ {"label":"L14", "x":4, "y":1.375},
+ {"label":"R10", "x":8, "y":1.375},
+ {"label":"R11", "x":9, "y":1.125},
+ {"label":"R12", "x":10, "y":1},
+ {"label":"R13", "x":11, "y":1.125},
+ {"label":"R14", "x":12, "y":1.25},
+
+ {"label":"L20", "x":0, "y":2.25},
+ {"label":"L21", "x":1, "y":2.125},
+ {"label":"L22", "x":2, "y":2},
+ {"label":"L23", "x":3, "y":2.125},
+ {"label":"L24", "x":4, "y":2.375},
+ {"label":"R20", "x":8, "y":2.375},
+ {"label":"R21", "x":9, "y":2.125},
+ {"label":"R22", "x":10, "y":2},
+ {"label":"R23", "x":11, "y":2.125},
+ {"label":"R24", "x":12, "y":2.25},
+
+ {"label":"L30", "x":2, "y":3.5},
+ {"label":"L31", "x":3.25, "y":3.625, "w":1.5},
+ {"label":"L32", "x":5, "y":3.125, "h":2},
+ {"label":"R30", "x":7, "y":3.125, "h":2},
+ {"label":"R31", "x":8.25, "y":3.625, "w":1.5},
+ {"label":"R32", "x":10, "y":3.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/gboards/gergoplex/keymaps/colemak-dhm/config.h b/keyboards/gboards/gergoplex/keymaps/colemak-dhm/config.h
new file mode 100644
index 0000000000..1b30cc73b3
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/colemak-dhm/config.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#define COMBO_ALLOW_ACTION_KEYS
+#define COMBO_VARIABLE_LEN
diff --git a/keyboards/gboards/gergoplex/keymaps/colemak-dhm/rules.mk b/keyboards/gboards/gergoplex/keymaps/colemak-dhm/rules.mk
index e882b8008d..620cab16c0 100644
--- a/keyboards/gboards/gergoplex/keymaps/colemak-dhm/rules.mk
+++ b/keyboards/gboards/gergoplex/keymaps/colemak-dhm/rules.mk
@@ -10,6 +10,7 @@ DEBUG_MATRIX = no
CONSOLE_ENABLE = no
#Combos!
+COMBO_ENABLE = yes
VPATH += keyboards/gboards/
ifeq ($(strip $(DEBUG_MATRIX)), yes)
diff --git a/keyboards/gboards/gergoplex/keymaps/default/config.h b/keyboards/gboards/gergoplex/keymaps/default/config.h
new file mode 100644
index 0000000000..1b30cc73b3
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/default/config.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#define COMBO_ALLOW_ACTION_KEYS
+#define COMBO_VARIABLE_LEN
diff --git a/keyboards/gboards/gergoplex/keymaps/default/rules.mk b/keyboards/gboards/gergoplex/keymaps/default/rules.mk
index e882b8008d..620cab16c0 100644
--- a/keyboards/gboards/gergoplex/keymaps/default/rules.mk
+++ b/keyboards/gboards/gergoplex/keymaps/default/rules.mk
@@ -10,6 +10,7 @@ DEBUG_MATRIX = no
CONSOLE_ENABLE = no
#Combos!
+COMBO_ENABLE = yes
VPATH += keyboards/gboards/
ifeq ($(strip $(DEBUG_MATRIX)), yes)
diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h b/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h
index a60188ef90..f66c334b85 100644
--- a/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h
+++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h
@@ -24,3 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#undef DEBOUNCE
#define DEBOUNCE 25
+
+#define COMBO_ALLOW_ACTION_KEYS
+#define COMBO_VARIABLE_LEN
diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/gergoplex.def b/keyboards/gboards/gergoplex/keymaps/georgepetri/gergoplex.def
index 239d351b70..d50d431c8b 100644
--- a/keyboards/gboards/gergoplex/keymaps/georgepetri/gergoplex.def
+++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/gergoplex.def
@@ -3,4 +3,5 @@
COMB(hjEnt, KC_ENT, KC_H, KC_J)
COMB(loDel, KC_DEL, KC_L, KC_O)
COMB(pscBspace, KC_BSPC, KC_P, KC_SCLN)
+COMB(sdEsc, KC_ESC, KC_D, KC_F)
COMB(fgEsc, KC_ESC, KC_F, KC_G)
diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c b/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c
index de3bcf67ad..e3b8944814 100644
--- a/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c
+++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c
@@ -24,15 +24,36 @@
enum {
_ALPHA, // default
+ _GAME, // gaming
_SPECIAL, // special characters
_NUMBERS // numbers/function/motion
};
+typedef enum {
+ TD_NONE,
+ TD_UNKNOWN,
+ TD_SINGLE_TAP,
+ TD_DOUBLE_TAP,
+ TD_TRIPLE_TAP
+} td_state_t;
+
+typedef struct {
+ bool is_press_action;
+ td_state_t state;
+} td_tap_t;
+
+enum {
+ GAME
+};
+
+td_state_t cur_dance(qk_tap_dance_state_t *state);
+
+void ql_finished(qk_tap_dance_state_t *state, void *user_data);
+void ql_reset(qk_tap_dance_state_t *state, void *user_data);
+
#define KC_CTL_A MT(MOD_LCTL, KC_A) // Tap for A, hold for Control
#define KC_SFT_Z MT(MOD_RSFT, KC_Z) // Tap for Z, hold for Shift
#define KC_SFT_SL MT(MOD_RSFT, KC_SLSH) // Tap for slash, hold for Shift
-
-#define KC_ALT_ENT MT(MOD_LALT, KC_ENT) // Tap for Enter, hold for Alt (Option)
#define KC_SPE_SPC LT(_SPECIAL, KC_SPC) // Tap for Space, hold for Special layer
#define KC_NUM_SPC LT(_NUMBERS, KC_SPC) // Tap for Space, hold for Numbers layer
@@ -41,7 +62,7 @@ enum {
* ,-------------------------------. ,-------------------------------.
* | | | | | | | | | | | |
* |-------+-----+-----+-----+-----| |-----+-----+-----+-DEL-+-BSPC--|
- * | | | | ESC | | ENT | | | |
+ * | | | ESC ESC | | ENT | | | |
* |-------+-----+-----+-RMB-+-LMB-| |-----+-----+-----+-----+-------|
* | | | | | | | | | | | |
* `-------------------------------' `-------------------------------'
@@ -51,7 +72,7 @@ enum {
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Keymap 0: Alpha layer
+ /* Alpha layer
*
* ,-------------------------------. ,-------------------------------.
* | Q | W | E | R | T | | Y | U | I | O | P |
@@ -60,17 +81,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------|
* | SHFT Z| X | C | V | B | | N | M | , | . |SHFT / |
* `-------------------------------' `-------------------------------'
- * .--------------------------. .----------------------.
- * | META | ENT ALT | SPC SPE | | SPC NUM | TAB | SHFT |
- * '--------------------------' '----------------------'
+ * .----------------------. .----------------------.
+ * | META | ALT | SPC SPE | | SPC NUM | TAB | SHFT |
+ * '----------------------' '----------------------'
*/
[_ALPHA] = LAYOUT_split_3x5_3(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_CTL_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
- KC_SFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SFT_SL,
- KC_LGUI, KC_ALT_ENT, KC_SPE_SPC, KC_NUM_SPC, KC_TAB, KC_RSFT),
+ KC_SFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD(GAME), KC_DOT, KC_SFT_SL,
+ KC_LGUI, KC_LALT, KC_SPE_SPC, KC_NUM_SPC, KC_TAB, KC_RSFT),
- /* Keymap 1: Special characters layer
+ /* Gaming layer
+ *
+ * ,-------------------------------. ,-------------------------------.
+ * | ~ | Q | W | E | R | | Y | U | I | O | P |
+ * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------|
+ * | CTRL | A | S | D | F | | H | J | K | L | ; |
+ * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------|
+ * | SHFT | Z | X | C | V | | N | M | , | . |SHFT / |
+ * `-------------------------------' `-------------------------------'
+ * .------------------. .----------------------.
+ * | META | ALT | SPC | | SPC NUM | TAB | SHFT |
+ * '------------------' '----------------------'
+ */
+ [_GAME] = LAYOUT_split_3x5_3(
+ KC_TILD, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P,
+ KC_LCTL , KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, TD(GAME), KC_DOT, KC_SFT_SL,
+ KC_LGUI, KC_LALT, KC_SPC, KC_NUM_SPC, KC_TAB, KC_RSFT),
+
+ /* Special characters layer
*
* ,-------------------------------. ,-------------------------------.
* | ! | @ | { | } | | | | ` | - | = | / | \ |
@@ -80,16 +120,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | % | ^ | [ | ] | | | & | ~ | + | * | |
* `-------------------------------' `-------------------------------'
* .-------------------. .-----------------.
- * | | | | | | | |
+ * | | | | | | " | _ |
* '-------------------' '-----------------'
*/
[_SPECIAL] = LAYOUT_split_3x5_3(
KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_MINS, KC_EQL , KC_SLSH, KC_BSLS,
KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_QUOT,
KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TRNS, KC_AMPR, KC_TILD, KC_PLUS, KC_ASTR, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LSFT(KC_QUOTE), LSFT(KC_MINS)),
- /* Keymap 2: Numbers/Function/Motion layer
+ /* Numbers/Function/Motion layer
*
* ,-------------------------------. ,-------------------------------.
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
@@ -108,3 +148,56 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS,
KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
+
+bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_CTL_A:
+ return false;
+ default:
+ return true;
+ }
+}
+
+td_state_t cur_dance(qk_tap_dance_state_t *state) {
+ if (state->count == 1)
+ return TD_SINGLE_TAP;
+ if (state->count == 2)
+ return TD_DOUBLE_TAP;
+ else if (state->count == 3)
+ return TD_TRIPLE_TAP;
+ return TD_UNKNOWN;
+}
+
+static td_tap_t ql_tap_state = {
+ .is_press_action = true,
+ .state = TD_NONE
+};
+
+void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
+ ql_tap_state.state = cur_dance(state);
+ switch (ql_tap_state.state) {
+ case TD_SINGLE_TAP:
+ tap_code(KC_COMMA);
+ break;
+ case TD_DOUBLE_TAP:
+ tap_code(KC_COMMA);
+ tap_code(KC_COMMA);
+ break;
+ case TD_TRIPLE_TAP:
+ if (layer_state_is(_GAME))
+ layer_off(_GAME);
+ else
+ layer_on(_GAME);
+ break;
+ default:
+ break;
+ }
+}
+
+void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
+ ql_tap_state.state = TD_NONE;
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [GAME] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275)
+};
diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/rules.mk b/keyboards/gboards/gergoplex/keymaps/georgepetri/rules.mk
index e882b8008d..74d02c23bd 100644
--- a/keyboards/gboards/gergoplex/keymaps/georgepetri/rules.mk
+++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/rules.mk
@@ -10,8 +10,11 @@ DEBUG_MATRIX = no
CONSOLE_ENABLE = no
#Combos!
+COMBO_ENABLE = yes
VPATH += keyboards/gboards/
ifeq ($(strip $(DEBUG_MATRIX)), yes)
OPT_DEFS += -DDEBUG_MATRIX
endif
+
+TAP_DANCE_ENABLE = yes
diff --git a/keyboards/gboards/gergoplex/keymaps/tgrosinger/combos.def b/keyboards/gboards/gergoplex/keymaps/tgrosinger/combos.def
new file mode 100644
index 0000000000..ef953d53f5
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/tgrosinger/combos.def
@@ -0,0 +1,11 @@
+// List any combo dictionaries you want loaded to your device below!
+
+// QMK wide includes
+//#include "combos/germ-vim-helpers.def"
+//#include "combos/germ-mouse-keys.def"
+
+// User includes
+#include "gergoplex.def"
+
+// Word completion
+// #include "combos/eng-combos.def"
diff --git a/keyboards/gboards/gergoplex/keymaps/tgrosinger/config.h b/keyboards/gboards/gergoplex/keymaps/tgrosinger/config.h
new file mode 100644
index 0000000000..1b30cc73b3
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/tgrosinger/config.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#define COMBO_ALLOW_ACTION_KEYS
+#define COMBO_VARIABLE_LEN
diff --git a/keyboards/gboards/gergoplex/keymaps/tgrosinger/gergoplex.def b/keyboards/gboards/gergoplex/keymaps/tgrosinger/gergoplex.def
new file mode 100644
index 0000000000..c7a93ed294
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/tgrosinger/gergoplex.def
@@ -0,0 +1,17 @@
+// Gergoplex specfic combos
+
+COMB(qwGrav, KC_GRV, KC_W, KC_Q)
+COMB(wsEsc, KC_ESC, KC_W, KC_S)
+COMB(sdBackspace, KC_BSPC, KC_S, KC_D)
+COMB(dfTab, KC_TAB, KC_D, KC_F)
+COMB(cvEnter, KC_ENT, KC_C, KC_V)
+
+COMB(ioMinus, KC_MINS, KC_I, KC_O)
+COMB(opBackslash, KC_BSLS, KC_O, KC_P)
+COMB(hjLess, KC_LT, KC_H, KC_J)
+COMB(klGreat, KC_GT, KC_K, KC_L)
+COMB(jkColon, KC_COLN, KC_J, KC_K)
+COMB(mcUnder, KC_UNDS, KC_M, KC_COMM)
+COMB(nmQuote, KC_QUOT, KC_N, KC_M)
+
+SUBS(pasta, "I'd just like to interject for a moment.", KC_H, KC_J, KC_K, KC_L)
diff --git a/keyboards/gboards/gergoplex/keymaps/tgrosinger/keymap.c b/keyboards/gboards/gergoplex/keymaps/tgrosinger/keymap.c
new file mode 100644
index 0000000000..74c0899fdb
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/tgrosinger/keymap.c
@@ -0,0 +1,286 @@
+/* Copyright 2022 Tony Grosinger
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include "g/keymap_combo.h"
+
+enum {
+ _ALPHA, // Default
+ _SYMB, // Symbols
+ _NUMB, // Numbers
+ _ARROWS, // Arrows and OS
+ _TMUX, // TMUX Nav layer
+ _POPOS, // Gnome Shell, aka PopOS
+};
+
+
+// Macros
+enum custom_keycodes {
+ TMUX_NEW = SAFE_RANGE,
+ TMUX_ZOOM,
+ TMUX_SCROLL,
+ TMUX_PN_LT,
+ TMUX_PN_UP,
+ TMUX_PN_DN,
+ TMUX_PN_RT,
+ TMUX_WN_LT,
+ TMUX_WN_RT,
+ TMUX_SP_VT,
+ TMUX_SP_HZ,
+ VIM_CLIP_CP,
+ VIM_CLIP_PST,
+ VIM_MACRO,
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case TMUX_NEW:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ SEND_STRING("c");
+ }
+ break;
+ case TMUX_ZOOM:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ SEND_STRING("z");
+ }
+ break;
+ case TMUX_SCROLL:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ SEND_STRING("[");
+ }
+ break;
+ case TMUX_PN_LT:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ tap_code(KC_LEFT);
+ }
+ break;
+ case TMUX_PN_DN:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ tap_code(KC_DOWN);
+ }
+ break;
+ case TMUX_PN_UP:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ tap_code(KC_UP);
+ }
+ break;
+ case TMUX_PN_RT:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ tap_code(KC_RIGHT);
+ }
+ break;
+ case TMUX_WN_LT:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ SEND_STRING("p");
+ }
+ break;
+ case TMUX_WN_RT:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ SEND_STRING("n");
+ }
+ break;
+ case TMUX_SP_VT:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ SEND_STRING("%");
+ }
+ break;
+ case TMUX_SP_HZ:
+ if (record->event.pressed) {
+ tap_code16(C(KC_B));
+ SEND_STRING("\"");
+ }
+ break;
+ case VIM_CLIP_CP:
+ if (record->event.pressed) {
+ tap_code16(S(KC_QUOTE));
+ tap_code16(S(KC_EQUAL));
+ tap_code(KC_Y);
+ }
+ break;
+ case VIM_CLIP_PST:
+ if (record->event.pressed) {
+ tap_code16(S(KC_QUOTE));
+ tap_code16(S(KC_EQUAL));
+ tap_code(KC_P);
+ }
+ break;
+ case VIM_MACRO:
+ if (record->event.pressed) {
+ tap_code16(S(KC_2));
+ tap_code(KC_Q);
+ }
+ break;
+ /*
+ case LAYRMOD:
+ // Act as a mod key if held, or toggle a layer if tapped
+ // replace KC_LCTL with desired mod, and _TARGET with desired layer name / number
+ if (record->event.pressed) {
+ uint8_t key_timer = timer_read();
+ register_mods(MOD_BIT(KC_LCTL));
+ } else {
+ unregister_mods(MOD_BIT(KC_LCTL));
+ if (timer_elapsed(key_timer) < 200) {
+ layer_invert(_TARGET);
+ }
+ }
+ return false;
+ break;
+ */
+ }
+ return true;
+}
+
+/* Combos
+ *
+ * ,-----------------------------. ,-----------------------------.
+ * | ` | | | | | | MINS | BSLH |
+ * |-----+----ESC----+-----+-----| |-----+-----+-----+-----------|
+ * | | BSPC TAB | | | LES COLN GRT | |
+ * |-----+-----+-----+--RMB+-LMB-| |-----+-----+-----+-----------|
+ * | | | ENT | | | QUO UNDR | | |
+ * `-----+-----+-----+-----+-----' `-----------------------------'
+ * .-------------------------. .-------------------.
+ * | | | | | | | |
+ * '-------------------------' '-------------------'
+ */
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap 0: Default layer
+ * ,------------------------------. ,----------------------------------.
+ * | Q | W | E | R | T | | Y | U | I | O | P |
+ * |------+-----+-----+-----+-----| |-----+-----+-----+-------+--------|
+ * |CTRL/A| S | D | F | G | | H | J | K | L | CTRL/; |
+ * |------+-----+-----+-----+-----| |-----+-----+-----+-------+--------|
+ * |SHFT/Z|ALT/X| C | V | B | | N | M | < | ALT/> | SHFT/? |
+ * `------+-----+-----+------+----' `----------------------------------'
+ * .-----------------. .----------------------.
+ * | |GUI |SPC(NUM)| |SPC(SYM)|TMUX | PopOS |
+ * '-----------------' '----------------------'
+ */
+ [_ALPHA] = LAYOUT_split_3x5_3(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
+ MT(MOD_LCTL, KC_A),KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN),
+ MT(MOD_LSFT, KC_Z),MT(MOD_LALT, KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, MT(MOD_LALT, KC_DOT), MT(MOD_RSFT, KC_SLSH),
+
+ KC_NO, KC_LGUI, LT(_NUMB, KC_SPC), // Left
+ LT(_SYMB, KC_SPC), MO(_TMUX), MO(_POPOS) // Right
+ ),
+
+ /* Keymap 1: Symbols layer
+ * ,------------------------------. ,-------------------------------.
+ * | ! | @ | # | $ | % | | ^ | & | * | + | = |
+ * |------+-----+-----+-----+-----| |-----+-----+-----+-----+-------|
+ * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
+ * |------+-----+-----+-----+-----| |-----+-----+-----+-----+-------|
+ * | | | | | | | | | | F11 | F12 |
+ * `------+-----+-----+-----+-----' `-------------------------------'
+ * .-----------------. .-----------------.
+ * | | DEL | MO3 | | HLD | SPC | |
+ * '-----------------' '-----------------'
+ */
+ [_SYMB] = LAYOUT_split_3x5_3(
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_PLUS, KC_EQL,
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12,
+ KC_NO, KC_DEL, MO(_ARROWS), KC_TRNS, KC_SPC, KC_NO
+ ),
+
+ /* Keymap 2: Number layer
+ * ,------------------------------. ,-------------------------------.
+ * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
+ * |------+-----+-----+-----+-----| |-----+-----+-----+-----+-------|
+ * | CTRL | | ( | ) | | | | 4 | 7 | 6 | |
+ * |------+-----+-----+-----+-----| |-----+-----+-----+-----+-------|
+ * | SHFT | | [ | ] | | | | 1 | 2 | 3 | . |
+ * `------+-----+-----+-----+-----' `-------------------------------'
+ * .-----------------. .-----------------.
+ * | | | HLD | | MO3 | 0 | |
+ * '-----------------' '-----------------'
+ */
+ [_NUMB] = LAYOUT_split_3x5_3(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
+ KC_LCTL, KC_NO, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO,
+ KC_LSFT, KC_NO, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_DOT,
+ KC_NO,KC_NO,KC_TRNS, MO(_ARROWS),KC_0,KC_NO
+ ),
+
+ /* Keymap 3: Arrows and OS
+ * ,------------------------------. ,------------------------------------.
+ * | | | | | | | | | | | |
+ * |------+-----+-----+-----+-----| |-------+-------+------+-------+-----|
+ * | CTRL |HOME | PUP | | | | LEFT | DOWN | UP | RIGHT | |
+ * |------+-----+-----+-----+-----| |-------+-------+------+-------+-----|
+ * | SHFT |END | PDN | | | | | | | | |
+ * `------+-----+-----+-----+-----' `------------------------------------'
+ * .-----------------. .-----------------.
+ * | | | HLD | | HLD | | |
+ * '-----------------' '-----------------'
+ */
+ [_ARROWS] = LAYOUT_split_3x5_3(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_LCTL, KC_HOME, KC_PGUP, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO,
+ KC_LSFT, KC_END, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO,KC_NO,KC_TRNS, KC_TRNS,KC_NO,KC_NO
+ ),
+
+ /* Keymap 4: Tmux navigation layer
+ * ,----------------------------------. ,---------------------------------------.
+ * | Vi Mcr | | | | SP VT | | Vi Ynk| | | | Vi PT |
+ * |--------+-----+-----+-----+-------| |-------+-------+-------+-------+-------|
+ * | | SCRL| | | | | PN LT | PN DN | PN UP | PN RT | SP HZ |
+ * |--------+-----+-----+-----+-------| |-------+-------+-------+-------+-------|
+ * | ZOOM | KILL| NEW | | | | W LT | | | W RT | |
+ * `--------+-----+-----+-----+-------' `---------------------------------------'
+ * .-----------------. .-----------------.
+ * | | | | | | HLD | |
+ * '-----------------' '-----------------'
+ */
+ [_TMUX] = LAYOUT_split_3x5_3(
+ VIM_MACRO, KC_NO, KC_NO, KC_NO, TMUX_SP_VT, VIM_CLIP_CP, KC_NO, KC_NO, KC_NO, VIM_CLIP_PST,
+ KC_NO, TMUX_SCROLL, KC_NO, KC_NO, KC_NO, TMUX_PN_LT, TMUX_PN_DN, TMUX_PN_UP, TMUX_PN_RT, TMUX_SP_HZ,
+ TMUX_ZOOM, KC_NO, TMUX_NEW, KC_NO, KC_NO, TMUX_WN_LT, KC_NO, KC_NO, TMUX_WN_RT, KC_NO,
+ KC_NO,KC_NO,KC_NO, KC_NO,KC_TRNS,KC_NO
+ ),
+
+ /* Keymap 5: Gnome Shell (PopOS)
+ * ,------------------------------. ,--------------------------------------.
+ * | | | | | | | MV-DWN| D-DWN | D-UP | MV-UP | Flip |
+ * |------+-----+-----+-----+-----| |-------+-------+-------+-------+------|
+ * | | | | | | | W-L | W-DWN | W-UP | W-R | |
+ * |------+-----+-----+-----+-----| |-------+-------+-------+-------+------|
+ * | | | | | | | Scrns | Apps | Close | | |
+ * `------+-----+-----+-----+-----' `--------------------------------------'
+ * .-----------------. .-----------------.
+ * | | | | | | | HLD |
+ * '-----------------' '-----------------'
+ */
+ [_POPOS] = LAYOUT_split_3x5_3(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, SGUI(KC_J), LCTL(LGUI(KC_J)), LCTL(LGUI(KC_K)), SGUI(KC_K), LGUI(KC_O),
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LGUI(KC_D), LGUI(KC_A), LGUI(KC_Q), KC_NO, KC_NO,
+ KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_TRNS
+ ),
+};
diff --git a/keyboards/gboards/gergoplex/keymaps/tgrosinger/readme.md b/keyboards/gboards/gergoplex/keymaps/tgrosinger/readme.md
new file mode 100644
index 0000000000..0a53aa1cbf
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/tgrosinger/readme.md
@@ -0,0 +1,12 @@
+# GergoPlex
+
+This keymap I created for the GergoPlex with a focus on:
+
+- Keeping keys close to their normal locations when possible (number/symbol rows)
+- Work well for vim, tmux, and Ubuntu default desktop shortcuts
+- Work okay for OSx shortcuts
+
+## Firmware Building
+
+ util/docker_build.sh gboards/gergoplex:tgrosinger
+ util/docker_build.sh gboards/gergoplex:tgrosinger:flash
diff --git a/keyboards/gboards/gergoplex/keymaps/tgrosinger/rules.mk b/keyboards/gboards/gergoplex/keymaps/tgrosinger/rules.mk
new file mode 100644
index 0000000000..620cab16c0
--- /dev/null
+++ b/keyboards/gboards/gergoplex/keymaps/tgrosinger/rules.mk
@@ -0,0 +1,18 @@
+#----------------------------------------------------------------------------
+# make gboards/gergoplex:default:flash
+# Make sure you have dfu-programmer installed!
+#----------------------------------------------------------------------------
+
+#Debug options
+VERBOSE = no
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = no
+CONSOLE_ENABLE = no
+
+#Combos!
+COMBO_ENABLE = yes
+VPATH += keyboards/gboards/
+
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
diff --git a/keyboards/gboards/gergoplex/matrix.c b/keyboards/gboards/gergoplex/matrix.c
index 716390241a..d5b046fe40 100644
--- a/keyboards/gboards/gergoplex/matrix.c
+++ b/keyboards/gboards/gergoplex/matrix.c
@@ -152,11 +152,6 @@ uint8_t matrix_scan(void) {
return 1;
}
-bool matrix_is_modified(void) // deprecated and evidently not called.
-{
- return true;
-}
-
inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
@@ -169,13 +164,6 @@ void matrix_print(void) {
print("\n");
}
}
-uint8_t matrix_key_count(void) {
- uint8_t count = 0;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- count += bitpop16(matrix[i]);
- }
- return count;
-}
// Remember this means ROWS
static void init_cols(void) {
diff --git a/keyboards/gboards/gergoplex/rules.mk b/keyboards/gboards/gergoplex/rules.mk
index 1d0ba8cae2..31a7d6bae8 100644
--- a/keyboards/gboards/gergoplex/rules.mk
+++ b/keyboards/gboards/gergoplex/rules.mk
@@ -1,15 +1,22 @@
+# MCU name
MCU = atmega32u4
+# Bootloader selection
BOOTLOADER = atmel-dfu
-CUSTOM_MATRIX = yes
-MOUSEKEY_ENABLE = yes # Mouse keys
-COMBO_ENABLE = yes
-EXTRAKEY_ENABLE = yes
-CONSOLE_ENABLE = no
-NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-COMMAND_ENABLE = yes
-BOOTMAGIC_ENABLE = lite
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+CUSTOM_MATRIX = yes
LAYOUTS = split_3x5_3