summaryrefslogtreecommitdiff
path: root/keyboards/stront/keymaps/i2c/keymap.c
diff options
context:
space:
mode:
authorEvgenii Vilkov <zzeneg@gmail.com>2023-07-07 16:11:22 +0200
committerGitHub <noreply@github.com>2023-07-08 00:11:22 +1000
commitc6a3802051321d9ae3ba6b55541f18a76f724913 (patch)
tree792d207d61e017f4e2a3e27f2a108e0cab153f15 /keyboards/stront/keymaps/i2c/keymap.c
parentd7c43dbd9d78ad0fa521692145a8b0dae318c940 (diff)
[Keyboard] Add stront keyboard (#21035)
Diffstat (limited to 'keyboards/stront/keymaps/i2c/keymap.c')
-rw-r--r--keyboards/stront/keymaps/i2c/keymap.c107
1 files changed, 107 insertions, 0 deletions
diff --git a/keyboards/stront/keymaps/i2c/keymap.c b/keyboards/stront/keymaps/i2c/keymap.c
new file mode 100644
index 0000000000..793a2495c7
--- /dev/null
+++ b/keyboards/stront/keymaps/i2c/keymap.c
@@ -0,0 +1,107 @@
+// Copyright 2023 zzeneg (@zzeneg)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+enum layer_number {
+ // clang-format off
+ _QWERTY = 0,
+ _GAME,
+ _NAV,
+ _NUMBER,
+ _SYMBOL,
+ _FUNC,
+ _SYS
+ // clang-format on
+};
+
+// Left-hand home row mods
+#define HOME_A LGUI_T(KC_A)
+#define HOME_S LALT_T(KC_S)
+#define HOME_D LCTL_T(KC_D)
+#define HOME_F LSFT_T(KC_F)
+
+// Right-hand home row mods
+#define HOME_J RSFT_T(KC_J)
+#define HOME_K RCTL_T(KC_K)
+#define HOME_L LALT_T(KC_L)
+#define HOME_SCLN RGUI_T(KC_SCLN)
+
+// bottom mods
+#define SYM_SPC LT(_SYMBOL, KC_SPC)
+#define NUM_TAB LT(_NUMBER, KC_TAB)
+#define FUNC_ESC LT(_FUNC, KC_ESC)
+#define FUNC_ENT LT(_FUNC, KC_ENT)
+#define NAV_BSPC LT(_NAV, KC_BSPC)
+#define RALT_DEL LALT_T(KC_DEL)
+
+// game layer mods
+#define LALT_Q LALT_T(KC_Q)
+#define LSFT_MINS LSFT_T(KC_MINS)
+#define LCTL_ESC LCTL_T(KC_ESC)
+#define LGUI_QUOT LGUI_T(KC_QUOT)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* QWERTY
+ * .---------------------------. .---------------------------.
+ * | W | E | R | T | | Y | U | I | O |
+ * .------+------+------+------+------+------| |------+------+------+------+------+------.
+ * | Q | A | S | D | F | G | | H | J | K | L | P | ; |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | - | Z | X | C | V | B |--------. .--------| N | M | , | . | / | ' |
+ * '-----------------------------------------/ / \ \-----------------------------------------'
+ * | Esc | Tab | / Space / \ Enter \ | Bsps | Del |
+ * |_FUNC | _NUM | /_SYMBOL/ \ _FUNC \ | _NAV | RAlt |
+ * `-------------''-------' '-------''-------------'
+ */
+ // clang-format off
+ [_QWERTY] = LAYOUT(
+ KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O,
+ KC_Q, HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_H, HOME_J, HOME_K, HOME_L, HOME_SCLN, KC_P,
+ KC_MINS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
+ FUNC_ESC, NUM_TAB, SYM_SPC, FUNC_ENT, NAV_BSPC, RALT_DEL
+ ),
+
+ [_GAME] = LAYOUT(
+ KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O,
+ LALT_Q, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_P,
+ LSFT_MINS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LGUI_QUOT,
+ LCTL_ESC, NUM_TAB, SYM_SPC, FUNC_ENT, NAV_BSPC, RALT_DEL
+ ),
+
+ [_NAV] = LAYOUT(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP,
+ XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PAUS,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, KC_INS, KC_APP, XXXXXXX,
+ FUNC_ESC, NUM_TAB, SYM_SPC, XXXXXXX, _______, RALT_DEL
+ ),
+
+ [_NUMBER] = LAYOUT(
+ KC_7, KC_8, KC_9, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_EQL, KC_0, KC_4, KC_5, KC_6, KC_LBRC, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX,
+ KC_MINS, KC_BSLS, KC_1, KC_2, KC_3, KC_RBRC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_ENT, _______, TG(_GAME), FUNC_ENT, NAV_BSPC, RALT_DEL
+ ),
+
+ [_SYMBOL] = LAYOUT(
+ LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_GRV), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ LSFT(KC_EQL), LSFT(KC_0), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_LBRC), XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX,
+ LSFT(KC_MINS), LSFT(KC_BSLS), LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ MO(_SYS), KC_BSPC, _______, FUNC_ENT, NAV_BSPC, RALT_DEL
+ ),
+
+ [_FUNC] = LAYOUT(
+ KC_F7, KC_F8, KC_F9, KC_CAPS, XXXXXXX, KC_PSCR, KC_SCRL, KC_NUM,
+ KC_F12, KC_F11, KC_F4, KC_F5, KC_F6, KC_F12, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX,
+ XXXXXXX, KC_F10, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, KC_MNXT, KC_MPLY, _______, XXXXXXX, MO(_SYS)
+ ),
+
+ [_SYS] = LAYOUT(
+ BL_DOWN, BL_UP, BL_TOGG, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P,
+ EH_LEFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EH_RGHT, EH_RGHT, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, EH_LEFT,
+ _______, QK_BOOT, _______, _______, QK_BOOT, _______
+ )
+ // clang-format on
+};