diff options
Diffstat (limited to 'keyboards/divergetm2/keymaps')
-rw-r--r-- | keyboards/divergetm2/keymaps/default/config.h | 23 | ||||
-rw-r--r-- | keyboards/divergetm2/keymaps/default/keymap.c | 199 | ||||
-rw-r--r-- | keyboards/divergetm2/keymaps/default/readme.md | 5 | ||||
-rw-r--r-- | keyboards/divergetm2/keymaps/xtonhasvim/config.h | 23 | ||||
-rw-r--r-- | keyboards/divergetm2/keymaps/xtonhasvim/keymap.c | 155 | ||||
-rw-r--r-- | keyboards/divergetm2/keymaps/xtonhasvim/readme.md | 9 | ||||
-rw-r--r-- | keyboards/divergetm2/keymaps/xtonhasvim/rules.mk | 3 |
7 files changed, 417 insertions, 0 deletions
diff --git a/keyboards/divergetm2/keymaps/default/config.h b/keyboards/divergetm2/keymaps/default/config.h new file mode 100644 index 000000000..ccd00621f --- /dev/null +++ b/keyboards/divergetm2/keymaps/default/config.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Copyright 2018 Christon DeWan (xton) | ||
2 | * Copyright 2017 IslandMan93 | ||
3 | * | ||
4 | * This program is free software: you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation, either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | // place overrides here | ||
21 | #define MASTER_RIGHT | ||
22 | #define PERMISSIVE_HOLD | ||
23 | #define TAPPING_TERM 150 | ||
diff --git a/keyboards/divergetm2/keymaps/default/keymap.c b/keyboards/divergetm2/keymaps/default/keymap.c new file mode 100644 index 000000000..fb5957cca --- /dev/null +++ b/keyboards/divergetm2/keymaps/default/keymap.c | |||
@@ -0,0 +1,199 @@ | |||
1 | /* Copyright 2018 Christon DeWan (xton) | ||
2 | * Copyright 2017 IslandMan93 | ||
3 | * | ||
4 | * This program is free software: you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation, either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | |||
21 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
22 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
23 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
24 | // entirely and just use numbers. | ||
25 | #define _QWERTY 0 | ||
26 | #define _COLEMAK 1 | ||
27 | #define _DVORAK 2 | ||
28 | #define _LOWER 3 | ||
29 | #define _RAISE 4 | ||
30 | #define _ADJUST 16 | ||
31 | |||
32 | enum custom_keycodes { | ||
33 | QWERTY = SAFE_RANGE, | ||
34 | COLEMAK, | ||
35 | DVORAK | ||
36 | }; | ||
37 | |||
38 | |||
39 | |||
40 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
41 | |||
42 | /* Qwerty | ||
43 | * ,-----------------------------------------------------------------------------------. | ||
44 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
45 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
46 | * | Esc | A | S | D | F | G | H | J | K | L | ; | " | | ||
47 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
48 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
49 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
50 | * | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right | | ||
51 | * `-----------------------------------------------------------------------------------' | ||
52 | */ | ||
53 | [_QWERTY] = LAYOUT_ortho_4x12_2x2u( | ||
54 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
55 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
56 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
57 | RESET, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
58 | ), | ||
59 | |||
60 | /* Colemak | ||
61 | * ,-----------------------------------------------------------------------------------. | ||
62 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | ||
63 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
64 | * | Esc | A | R | S | T | D | H | N | E | I | O | " | | ||
65 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
66 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | | ||
67 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
68 | * | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right | | ||
69 | * `-----------------------------------------------------------------------------------' | ||
70 | */ | ||
71 | [_COLEMAK] = LAYOUT_ortho_4x12_2x2u( | ||
72 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | ||
73 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | ||
74 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
75 | KC_NO, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
76 | ), | ||
77 | |||
78 | /* Dvorak | ||
79 | * ,-----------------------------------------------------------------------------------. | ||
80 | * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | | ||
81 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
82 | * | Esc | A | O | E | U | I | D | H | T | N | S | / | | ||
83 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
84 | * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | | ||
85 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
86 | * | | Ctrl | Alt | GUI | Lower | Raise | Left | Down | Up |Right | | ||
87 | * `-----------------------------------------------------------------------------------' | ||
88 | */ | ||
89 | [_DVORAK] = LAYOUT_ortho_4x12_2x2u( | ||
90 | KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, | ||
91 | KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, | ||
92 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , | ||
93 | KC_NO, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
94 | ), | ||
95 | |||
96 | /* Lower | ||
97 | * ,-----------------------------------------------------------------------------------. | ||
98 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ||
99 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
100 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | | ||
101 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
102 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | | ||
103 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
104 | * | | | | | | | Next | Vol- | Vol+ | Play | | ||
105 | * `-----------------------------------------------------------------------------------' | ||
106 | */ | ||
107 | [_LOWER] = LAYOUT_ortho_4x12_2x2u( | ||
108 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, | ||
109 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
110 | BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, | ||
111 | _______, _______, _______, _______, _______, MO(_RAISE), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
112 | ), | ||
113 | |||
114 | /* Raise | ||
115 | * ,-----------------------------------------------------------------------------------. | ||
116 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
117 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
118 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
119 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
120 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | | ||
121 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
122 | * | | | | | | | Next | Vol- | Vol+ | Play | | ||
123 | * `-----------------------------------------------------------------------------------' | ||
124 | */ | ||
125 | [_RAISE] = LAYOUT_ortho_4x12_2x2u( | ||
126 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
127 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
128 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, | ||
129 | _______, _______, _______, _______, MO(_LOWER), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
130 | ), | ||
131 | |||
132 | /* Adjust (Lower + Raise) | ||
133 | * ,-----------------------------------------------------------------------------------. | ||
134 | * | | Reset| | | | | | | | | | Del | | ||
135 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
136 | * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | | ||
137 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
138 | * | | | | | | | | | | | | | | ||
139 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
140 | * | | | | | | | | | | | | ||
141 | * `-----------------------------------------------------------------------------------' | ||
142 | */ | ||
143 | [_ADJUST] = LAYOUT_ortho_4x12_2x2u( | ||
144 | _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, | ||
145 | _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, | ||
146 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
147 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
148 | ) | ||
149 | |||
150 | |||
151 | }; | ||
152 | |||
153 | #ifdef AUDIO_ENABLE | ||
154 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
155 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
156 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
157 | #endif | ||
158 | |||
159 | #define SPACE_WAIT 100 | ||
160 | uint16_t rl_start_time = 0; | ||
161 | |||
162 | |||
163 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
164 | if(rl_start_time && record->event.pressed) rl_start_time = 0; | ||
165 | switch (keycode) { | ||
166 | case QWERTY: | ||
167 | if (record->event.pressed) { | ||
168 | #ifdef AUDIO_ENABLE | ||
169 | PLAY_SONG(tone_qwerty); | ||
170 | #endif | ||
171 | set_single_persistent_default_layer(1UL<<_QWERTY); | ||
172 | } | ||
173 | return false; | ||
174 | break; | ||
175 | case COLEMAK: | ||
176 | if (record->event.pressed) { | ||
177 | #ifdef AUDIO_ENABLE | ||
178 | PLAY_SONG(tone_colemak); | ||
179 | #endif | ||
180 | set_single_persistent_default_layer(1UL<<_COLEMAK); | ||
181 | } | ||
182 | return false; | ||
183 | break; | ||
184 | case DVORAK: | ||
185 | if (record->event.pressed) { | ||
186 | #ifdef AUDIO_ENABLE | ||
187 | PLAY_SONG(tone_dvorak); | ||
188 | #endif | ||
189 | set_single_persistent_default_layer(1UL<<_DVORAK); | ||
190 | } | ||
191 | return false; | ||
192 | break; | ||
193 | } | ||
194 | return true; | ||
195 | } | ||
196 | |||
197 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
198 | return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | ||
199 | } | ||
diff --git a/keyboards/divergetm2/keymaps/default/readme.md b/keyboards/divergetm2/keymaps/default/readme.md new file mode 100644 index 000000000..dceb4f8a9 --- /dev/null +++ b/keyboards/divergetm2/keymaps/default/readme.md | |||
@@ -0,0 +1,5 @@ | |||
1 | # A default-ish keymap for diverge tm2 | ||
2 | |||
3 | Actually it's a Planck layout, but I needed something for the default. :-D | ||
4 | |||
5 | The 2u spacebars are space when tapped, raise/lower when held. | ||
diff --git a/keyboards/divergetm2/keymaps/xtonhasvim/config.h b/keyboards/divergetm2/keymaps/xtonhasvim/config.h new file mode 100644 index 000000000..4ba4a5716 --- /dev/null +++ b/keyboards/divergetm2/keymaps/xtonhasvim/config.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #pragma once | ||
2 | |||
3 | // help for fast typist+dual function keys? | ||
4 | #define PERMISSIVE_HOLD | ||
5 | // Let me type `ls -l` more quickly. | ||
6 | #define TAPPING_FORCE_HOLD | ||
7 | |||
8 | // where is the cord plugged in? | ||
9 | #define MASTER_RIGHT | ||
10 | |||
11 | /* speed up mousekeys a bit */ | ||
12 | #define MOUSEKEY_DELAY 50 | ||
13 | #define MOUSEKEY_INTERVAL 20 | ||
14 | #define MOUSEKEY_MAX_SPEED 8 | ||
15 | #define MOUSEKEY_TIME_TO_MAX 30 | ||
16 | #define MOUSEKEY_WHEEL_MAX_SPEED 8 | ||
17 | #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 | ||
18 | |||
19 | // because I'm lazy and didn't case out the rgb support | ||
20 | #define RGBLED_NUM 2 | ||
21 | |||
22 | #define BACKLIGHT_PIN B7 | ||
23 | #define BACKLIGHT_LEVELS 3 | ||
diff --git a/keyboards/divergetm2/keymaps/xtonhasvim/keymap.c b/keyboards/divergetm2/keymaps/xtonhasvim/keymap.c new file mode 100644 index 000000000..5f478c1df --- /dev/null +++ b/keyboards/divergetm2/keymaps/xtonhasvim/keymap.c | |||
@@ -0,0 +1,155 @@ | |||
1 | /* Copyright 2018 Christon DeWan | ||
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 | #include "xtonhasvim.h" | ||
19 | |||
20 | /************************************ | ||
21 | * states | ||
22 | ************************************/ | ||
23 | |||
24 | enum layers { | ||
25 | _QWERTY, | ||
26 | _LOWER, | ||
27 | _RAISE, | ||
28 | _ADJUST, | ||
29 | _MOVE, | ||
30 | _MOUSE, | ||
31 | _CMD | ||
32 | }; | ||
33 | |||
34 | extern uint8_t vim_cmd_layer(void) { return _CMD; } | ||
35 | |||
36 | enum keymap_keycodes { | ||
37 | RAISE = VIM_SAFE_RANGE, | ||
38 | LOWER | ||
39 | }; | ||
40 | |||
41 | /************************************ | ||
42 | * keymaps! | ||
43 | ************************************/ | ||
44 | |||
45 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
46 | |||
47 | /* Qwerty | ||
48 | * ,-----------------------------------------------------------------------------------. | ||
49 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
50 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
51 | * | Ctrl*| A | S | D | F | G | H | J | K | L | ;* | ' | | ||
52 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
53 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
54 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
55 | * | chkwm| | Alt | GUI | Lower* | Raise* | SPC | GUI | | Vim | | ||
56 | * `-----------------------------------------------------------------------------------' | ||
57 | * | ||
58 | * - Ctrl acts as Esc when tapped. | ||
59 | * - Holding ; switches to movement layer. | ||
60 | * - Tapping raise or lower produces space. | ||
61 | */ | ||
62 | [_QWERTY] = LAYOUT_ortho_4x12_2x2u( \ | ||
63 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ | ||
64 | LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT, \ | ||
65 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) , \ | ||
66 | LSFT(KC_LALT), MO(_MOVE), KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), LT(_RAISE, KC_SPC), KC_RGUI, KC_RALT, MO(_MOVE), VIM_START \ | ||
67 | ), | ||
68 | |||
69 | /* Lower | ||
70 | * ,-----------------------------------------------------------------------------------. | ||
71 | * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | Bksp | | ||
72 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
73 | * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | ||
74 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
75 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play | | ||
76 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
77 | * | | Bail | | | | Raise | | | Bail | | | ||
78 | * `-----------------------------------------------------------------------------------' | ||
79 | */ | ||
80 | [_LOWER] = LAYOUT_ortho_4x12_2x2u( \ | ||
81 | KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC, \ | ||
82 | KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ | ||
83 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \ | ||
84 | RESET, TO(_QWERTY), _______, _______, _______, MO(_RAISE), _______, _______, TO(_QWERTY), X_____X \ | ||
85 | ), | ||
86 | |||
87 | /* Raise | ||
88 | * ,-----------------------------------------------------------------------------------. | ||
89 | * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | Bksp | | ||
90 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
91 | * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | | ||
92 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
93 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play | | ||
94 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
95 | * | | Bail | | | Lower | | | | Bail | | | ||
96 | * `-----------------------------------------------------------------------------------' | ||
97 | */ | ||
98 | [_RAISE] = LAYOUT_ortho_4x12_2x2u( \ | ||
99 | KC_GRV, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC, \ | ||
100 | KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ | ||
101 | _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN, \ | ||
102 | X_____X, TO(_QWERTY), _______, _______, MO(_LOWER), _______, _______, _______, TO(_QWERTY), RESET \ | ||
103 | ), | ||
104 | |||
105 | |||
106 | /* Adjust (Lower + Raise) | ||
107 | * ,-------------------------------------------------------------------------------------. | ||
108 | * |BL Raise| | | | | | | | | | | | | ||
109 | * |--------+------+------+------+------+-------------+------+------+------+------+------| | ||
110 | * |BL Lower| | | | | | | | | | | | | ||
111 | * |--------+------+------+------+------+------|------+------+------+------+------+------| | ||
112 | * |BL STEP | | | | | | | Next | Vol- | Vol+ | Play | | | ||
113 | * |--------+------+------+------+------+------+------+------+------+------+------+------| | ||
114 | * |Backlite| Mouse| | | | | | | Bail | | | ||
115 | * `-------------------------------------------------------------------------------------' | ||
116 | */ | ||
117 | [_ADJUST] = LAYOUT_ortho_4x12_2x2u( \ | ||
118 | BL_INC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, \ | ||
119 | BL_DEC, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, \ | ||
120 | BL_STEP, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, X_____X, \ | ||
121 | BL_TOGG, TO(_MOUSE), _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X \ | ||
122 | ), | ||
123 | |||
124 | |||
125 | /* movement layer (hold semicolon) */ | ||
126 | [_MOVE] = LAYOUT_ortho_4x12_2x2u( \ | ||
127 | TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X, \ | ||
128 | _______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, X_____X, \ | ||
129 | _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \ | ||
130 | _______, _______, _______, _______, _______, _______, _______, _______, _______, X_____X \ | ||
131 | ), | ||
132 | |||
133 | /* mouse layer | ||
134 | */ | ||
135 | [_MOUSE] = LAYOUT_ortho_4x12_2x2u( \ | ||
136 | TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X , \ | ||
137 | _______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X, \ | ||
138 | _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, \ | ||
139 | _______, TO(_QWERTY), _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X \ | ||
140 | ), | ||
141 | |||
142 | /* vim command layer. | ||
143 | */ | ||
144 | [_CMD] = LAYOUT_ortho_4x12_2x2u( \ | ||
145 | X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X, \ | ||
146 | VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X, \ | ||
147 | VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT, \ | ||
148 | _______, TO(_QWERTY), _______, _______, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X \ | ||
149 | ) | ||
150 | |||
151 | }; | ||
152 | |||
153 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
154 | return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | ||
155 | } | ||
diff --git a/keyboards/divergetm2/keymaps/xtonhasvim/readme.md b/keyboards/divergetm2/keymaps/xtonhasvim/readme.md new file mode 100644 index 000000000..9ff4ce1f1 --- /dev/null +++ b/keyboards/divergetm2/keymaps/xtonhasvim/readme.md | |||
@@ -0,0 +1,9 @@ | |||
1 | # Xton has a tiny keyboard! With Vim! | ||
2 | |||
3 | Based on the standard Planck layout with a few changes: | ||
4 | |||
5 | * Escape moved to dual-function with control. | ||
6 | * Dedicated movement and mouse layers. | ||
7 | * Top and middle row swapped in `_RAISE` and `_LOWER` because I never use F-keys. | ||
8 | * Vim layers! See `users/xtonhasvim`. | ||
9 | |||
diff --git a/keyboards/divergetm2/keymaps/xtonhasvim/rules.mk b/keyboards/divergetm2/keymaps/xtonhasvim/rules.mk new file mode 100644 index 000000000..ede4e02b6 --- /dev/null +++ b/keyboards/divergetm2/keymaps/xtonhasvim/rules.mk | |||
@@ -0,0 +1,3 @@ | |||
1 | MOUSEKEY_ENABLE = yes | ||
2 | # BACKLIGHT_ENABLE = yes | ||
3 | AUDIO_ENABLE = no | ||