aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/torn/keymaps/kinesish/config.h21
-rw-r--r--keyboards/torn/keymaps/kinesish/keymap.c165
-rw-r--r--keyboards/torn/keymaps/kinesish/readme.md6
-rw-r--r--keyboards/torn/keymaps/kinesish/rules.mk2
4 files changed, 194 insertions, 0 deletions
diff --git a/keyboards/torn/keymaps/kinesish/config.h b/keyboards/torn/keymaps/kinesish/config.h
new file mode 100644
index 000000000..734512e6c
--- /dev/null
+++ b/keyboards/torn/keymaps/kinesish/config.h
@@ -0,0 +1,21 @@
1/* Copyright 2020 Alexander Dergachev (alexander.dergachev@gmail.com)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#define TAPPING_TERM 200
20#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
21#define PERMISSIVE_HOLD_PER_KEY
diff --git a/keyboards/torn/keymaps/kinesish/keymap.c b/keyboards/torn/keymaps/kinesish/keymap.c
new file mode 100644
index 000000000..fcac46989
--- /dev/null
+++ b/keyboards/torn/keymaps/kinesish/keymap.c
@@ -0,0 +1,165 @@
1/* Copyright 2020 Alexander Dergachev (alexander.dergachev@gmail.com)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum torn_layers { _QWERTY, _LOWER, _RAISE, _ADJUST };
20
21#define G_DEL LGUI_T(KC_DEL)
22#define G_ENT RGUI_T(KC_ENT)
23
24#define C_BSPC LCTL_T(KC_BSPC)
25#define C_SPC RCTL_T(KC_SPC)
26
27#define S_EQL LSFT_T(KC_EQL)
28#define S_MINS RSFT_T(KC_MINS)
29
30#define R_TAB LT(_RAISE, KC_TAB)
31#define R_BSLS LT(_RAISE, KC_BSLS)
32
33#define L_GRV LT(_LOWER, KC_GRV)
34#define L_QUOT LT(_LOWER, KC_QUOT)
35
36// clang-format off
37const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
38
39/* Qwerty
40 * ,-----------------------------------------. ,-----------------------------------------.
41 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
42 * | Raise| | | | | | | | | | | | Raise|
43 * |------+------+------+------+------+------| |------+------+------+------+------+------|
44 * | ` | A | S | D | F | G | | H | J | K | L | ; | ' |
45 * | Lower| | | | | | | | | | | | Lower|
46 * |------+------+------+------+------+------| |------+------+------+------+------+------|
47 * | =+ | Z | X | C | V | B | | N | M | , | . | / | -_ |
48 * | Shift| | | | | | | | | | | | Shift|
49 * |------+------+------+------+------+------| |------+------+------+------+------+------|
50 * | ____ | Alt | Bksp | Del | |Enter |Space | Alt | ____ |
51 * | | | Ctrl | Gui | | Gui | Ctrl | | |
52 * `---------------------------' `---------------------------'
53 */
54[_QWERTY] = LAYOUT_split_3x6_4(
55 R_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, R_BSLS,
56 L_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, L_QUOT,
57 S_EQL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, S_MINS ,
58 _______, KC_LALT, C_BSPC, G_DEL, G_ENT, C_SPC, KC_RALT, _______
59),
60
61/* Lower
62 * ,-----------------------------------------. ,-----------------------------------------.
63 * | Esc | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
64 * |------+------+------+------+------+------| |------+------+------+------+------+------|
65 * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
66 * |------+------+------+------+------+------| |------+------+------+------+------+------|
67 * | | | | | | | | | | | [ | ] | |
68 * |------+------+------+------+------+------| |------+------+------+------+------+------|
69 * | ____ | Alt | Bksp | Del | |Enter |Space | Alt | ____ |
70 * | | | Ctrl | Gui | | Gui | Ctrl | | |
71 * `---------------------------' `---------------------------'
72 */
73[_LOWER] = LAYOUT_split_3x6_4(
74 KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
75 KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
76 KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_TRNS,
77 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
78),
79
80/* Raise
81 * ,-----------------------------------------. ,-----------------------------------------.
82 * | | F1 | F2 | F3 | F4 | F5 | | S+H | S+A+L| UP | S+A+R| S+E | |
83 * |------+------+------+------+------+------| |------+------+------+------+------+------|
84 * | | F6 | F7 | F8 | F9 | F10 | | Home | Left | Down | Right| End | PgUp |
85 * |------+------+------+------+------+------| |------+------+------+------+------+------|
86 * | | F11 | F12 | | | | | A+L | S+L | S+D | S+R | A+R | PgDn |
87 * |------+------+------+------+------+------| |------+------+------+------+------+------|
88 * | ____ | Alt | Bksp | Del | |Enter |Space | Alt | ____ |
89 * | | | Ctrl | Gui | | Gui | Ctrl | | |
90 * `---------------------------' `---------------------------'
91 */
92[_RAISE] = LAYOUT_split_3x6_4(
93 KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, S(KC_HOME), S(A(KC_LEFT)), KC_UP, S(A(KC_RGHT)), S(KC_END), KC_TRNS,
94 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGUP,
95 KC_TRNS, KC_F11, KC_F12, _______, _______, _______, A(KC_LEFT), S(KC_LEFT), S(KC_DOWN), S(KC_RGHT), A(KC_RGHT), KC_PGDN ,
96 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
97),
98
99/* Adjust
100 * ,-----------------------------------------. ,-----------------------------------------.
101 * | | | | | | | | | | | | | |
102 * |------+------+------+------+------+------| |------+------+------+------+------+------|
103 * | | | | | | | | | | | | | |
104 * |------+------+------+------+------+------| |------+------+------+------+------+------|
105 * | | | | | | | | | | | | | |
106 * |------+------+------+------+------+------| |------+------+------+------+------+------|
107 * | ____ | Alt | Bksp | Del | |Enter |Space | Alt | ____ |
108 * | | | Ctrl | Gui | | Gui | Ctrl | | |
109 * `---------------------------' `---------------------------'
110 */
111[_ADJUST] = LAYOUT_split_3x6_4(
112 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
113 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
114 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
115 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
116)
117
118};
119
120const uint16_t PROGMEM encoder_keymaps[][2][2] = {
121 [_QWERTY] = { { C(S(KC_TAB)), C(KC_TAB) }, { G(A(KC_LEFT)), G(A(KC_RIGHT)) } },
122 [_LOWER] = { { C(KC_LEFT), C(KC_RGHT) }, { KC__VOLDOWN, KC__VOLUP } },
123 [_RAISE] = { { G(KC_LEFT), G(KC_RGHT) }, { G(KC_TAB), G(S(KC_TAB)) } },
124 [_ADJUST] = { { KC_TRNS, KC_TRNS }, { KC_TRNS, KC_TRNS } },
125};
126// clang-format on
127
128layer_state_t layer_state_set_user(layer_state_t state) {
129 torn_set_led(0, IS_LAYER_ON_STATE(state, _RAISE));
130 torn_set_led(1, IS_LAYER_ON_STATE(state, _LOWER));
131 torn_set_led(2, IS_LAYER_ON_STATE(state, _ADJUST));
132 return state;
133}
134
135/*
136 * Enable `IGNORE_MOD_TAP_INTERRUPT` for all modifiers except `Shift`.
137 * For more info see `IGNORE_MOD_TAP_INTERRUPT_PER_KEY` in `docs/tap_hold.md`.
138 */
139
140bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
141 switch (keycode) {
142 case S_EQL:
143 return false;
144 case S_MINS:
145 return false;
146 default:
147 return true;
148 }
149}
150
151/*
152 * Enable `PERMISSIVE_HOLD` for `Shift` modifers.
153 * For more info see `PERMISSIVE_HOLD_PER_KEY` in `docs/tap_hold.md`.
154 */
155
156bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
157 switch (keycode) {
158 case S_EQL:
159 return true;
160 case S_MINS:
161 return true;
162 default:
163 return false;
164 }
165}
diff --git a/keyboards/torn/keymaps/kinesish/readme.md b/keyboards/torn/keymaps/kinesish/readme.md
new file mode 100644
index 000000000..481602e5b
--- /dev/null
+++ b/keyboards/torn/keymaps/kinesish/readme.md
@@ -0,0 +1,6 @@
1# A Custom Keymap for [Torn](https://github.com/rtitmuss/torn)
2
3## Keymap
4This keymap was inspired by default layout of Kinesis Advantage.
5
6The main idea behind this keymap is that you have all modifiers as well as layer keys duplicated on both halves.
diff --git a/keyboards/torn/keymaps/kinesish/rules.mk b/keyboards/torn/keymaps/kinesish/rules.mk
new file mode 100644
index 000000000..36b7ba9cb
--- /dev/null
+++ b/keyboards/torn/keymaps/kinesish/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes