aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/clueboard/keymaps/colemak/keymap.c83
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.pngbin79488 -> 97053 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.pngbin62258 -> 65740 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.pngbin58886 -> 0 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.pngbin0 -> 73624 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.pngbin0 -> 66132 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/keymap.c84
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/readme.md9
-rw-r--r--keyboards/ergodox/keymaps/guni/keymap.c2
-rw-r--r--keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c408
-rw-r--r--keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md194
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c1
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h48
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/Makefile3
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/babblePaste.c459
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/babblePaste.h238
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/babblePaste.txt123
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/config.h100
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile21
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h8
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c64
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md1
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile21
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h32
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c272
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md1
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/readme.md58
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/rules.mk48
-rw-r--r--keyboards/handwired/numpad20/Makefile3
-rw-r--r--keyboards/handwired/numpad20/config.h162
-rw-r--r--keyboards/handwired/numpad20/keymaps/default/keymap.c16
-rw-r--r--keyboards/handwired/numpad20/numpad20.c8
-rw-r--r--keyboards/handwired/numpad20/numpad20.h20
-rw-r--r--keyboards/handwired/numpad20/rules.mk83
-rw-r--r--keyboards/handwired/ortho5x13/Makefile3
-rw-r--r--keyboards/handwired/ortho5x13/config.h162
-rw-r--r--keyboards/handwired/ortho5x13/keymaps/default/keymap.c289
-rw-r--r--keyboards/handwired/ortho5x13/ortho5x13.c8
-rw-r--r--keyboards/handwired/ortho5x13/ortho5x13.h36
-rw-r--r--keyboards/handwired/ortho5x13/rules.mk83
-rw-r--r--keyboards/lets_split/keymaps/hexwire/Makefile1
-rw-r--r--keyboards/lets_split/keymaps/hexwire/README.md108
-rw-r--r--keyboards/lets_split/keymaps/hexwire/compact_keymap.h23
-rw-r--r--keyboards/lets_split/keymaps/hexwire/config.h35
-rw-r--r--keyboards/lets_split/keymaps/hexwire/keymap.c205
-rw-r--r--keyboards/lets_split/keymaps/smt/config.h34
-rw-r--r--keyboards/lets_split/keymaps/smt/keymap.c219
-rw-r--r--keyboards/lets_split/keymaps/smt/readme.md88
-rw-r--r--keyboards/planck/keymaps/smt/keymap.c132
-rw-r--r--keyboards/planck/keymaps/smt/readme.md79
-rw-r--r--keyboards/planck/rules.mk4
-rw-r--r--keyboards/preonic/keymaps/smt/keymap.c145
-rw-r--r--keyboards/preonic/keymaps/smt/readme.md77
-rw-r--r--keyboards/preonic/rules.mk4
-rw-r--r--keyboards/tv44/keymaps/smt/keymap.c24
-rw-r--r--quantum/quantum.c59
-rw-r--r--quantum/quantum.h1
-rw-r--r--readme.md2
58 files changed, 4182 insertions, 209 deletions
diff --git a/keyboards/clueboard/keymaps/colemak/keymap.c b/keyboards/clueboard/keymaps/colemak/keymap.c
new file mode 100644
index 000000000..6b1fc7c9c
--- /dev/null
+++ b/keyboards/clueboard/keymaps/colemak/keymap.c
@@ -0,0 +1,83 @@
1#include "clueboard.h"
2
3// Helpful defines
4#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
5#define _______ KC_TRNS
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _BL 0
12#define _FL 1
13#define _CL 2
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16 /* Keymap _BL: Base Layer (Default Layer)
17 */
18[_BL] = KEYMAP(
19 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
20 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
21 KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, \
22 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
23 KC_LCTL, MO(_FL), KC_LGUI,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT),
24
25 /* Keymap _FL: Function Layer
26 */
27[_FL] = KEYMAP(
28 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_CAPS, BL_STEP, \
29 _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, _______, \
30 KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, \
31 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
32 _______, _______, _______,_______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END),
33
34 /* Keymap _CL: Control layer
35 */
36[_CL] = KEYMAP(
37 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
38 _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
39 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
40 MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
41 _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
42};
43
44/* This is a list of user defined functions. F(N) corresponds to item N
45 of this list.
46 */
47const uint16_t PROGMEM fn_actions[] = {
48 [0] = ACTION_FUNCTION(0), // Calls action_function()
49};
50
51void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
52 static uint8_t mods_pressed;
53
54 switch (id) {
55 case 0:
56 /* Handle the combined Grave/Esc key
57 */
58 mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
59
60 if (record->event.pressed) {
61 /* The key is being pressed.
62 */
63 if (mods_pressed) {
64 add_key(KC_GRV);
65 send_keyboard_report();
66 } else {
67 add_key(KC_ESC);
68 send_keyboard_report();
69 }
70 } else {
71 /* The key is being released.
72 */
73 if (mods_pressed) {
74 del_key(KC_GRV);
75 send_keyboard_report();
76 } else {
77 del_key(KC_ESC);
78 send_keyboard_report();
79 }
80 }
81 break;
82 }
83}
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png
index 2c03af581..273a49778 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png
index a267ff23d..5930e38ac 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png
deleted file mode 100644
index c8c90cf5c..000000000
--- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.png
new file mode 100644
index 000000000..0c6473abb
--- /dev/null
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-unicode.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.png
new file mode 100644
index 000000000..4488e1b37
--- /dev/null
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-4-unicode-2.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c
index 5774511cc..243ce94e9 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c
+++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c
@@ -5,8 +5,9 @@
5 5
6#define BASE 0 // default layer 6#define BASE 0 // default layer
7#define SYMB 1 // symbols 7#define SYMB 1 // symbols
8#define MDIA 2 // media keys 8#define MDIA 2 // media keys and navigation
9#define NAVG 3 // navigation 9#define UNI 3 // unicode 1
10#define UNI2 4 // unicode 2
10 11
11enum macros { 12enum macros {
12 RUN 13 RUN
@@ -94,11 +95,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
94 * ,--------------------------------------------------. ,--------------------------------------------------. 95 * ,--------------------------------------------------. ,--------------------------------------------------.
95 * | Esc/L3 | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | =/L3 | 96 * | Esc/L3 | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | =/L3 |
96 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 97 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
97 * | Tab/L1 | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \/L1 | 98 * | Tab/L1 | Q | W | E | R | T | L1 | | L2 | Y | U | I | O | P | \/L1 |
98 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 99 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
99 * | LCtrl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ctrl/'| 100 * | LCtrl | A | S | D | F | G |------| |------| H | J | K | L | ; | ctrl/'|
100 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| 101 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
101 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | 102 * | LShift |Z / L4|X / L2| C | V | B | | | | N | M | , |. / L2|/ / L4| RShift |
102 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 103 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
103 * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 | 104 * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 |
104 * `----------------------------------' `----------------------------------' 105 * `----------------------------------' `----------------------------------'
@@ -114,25 +115,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
114// Otherwise, it needs KC_* 115// Otherwise, it needs KC_*
115[BASE] = KEYMAP( // layer 0 : default 116[BASE] = KEYMAP( // layer 0 : default
116 // left hand 117 // left hand
117 LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, 118 LT(UNI,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
118 LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), 119 LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
119 KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, 120 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
120 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), 121 KC_LSFT, LT(4, KC_Z), LT(MDIA, KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO),
121 LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT, 122 LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT,
122 ALT_T(KC_APP), KC_HOME, 123 ALT_T(KC_APP), KC_HOME,
123 KC_END, 124 KC_END,
124 KC_SPC,KC_TAB,KC_LBRC, 125 KC_SPC,KC_TAB,KC_LBRC,
125 // right hand 126 // right hand
126 KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(NAVG,KC_EQL), 127 KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(UNI,KC_EQL),
127 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), 128 TG(MDIA), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS),
128 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), 129 KC_H, KC_J, KC_K, KC_L, KC_SCLN,CTL_T(KC_QUOT),
129 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, 130 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,LT(MDIA, KC_DOT), LT(UNI2, KC_SLSH), KC_RSFT,
130 KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), 131 KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD),
131 KC_PGUP, KC_INS, 132 KC_PGUP, KC_INS,
132 KC_PGDN, 133 KC_PGDN,
133 KC_RBRC,KC_BSPC, KC_ENT 134 KC_RBRC,KC_BSPC, KC_ENT
134 ), 135 ),
135/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U)) 136/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U))
136 * 137 *
137 * ,--------------------------------------------------. ,--------------------------------------------------. 138 * ,--------------------------------------------------. ,--------------------------------------------------.
138 * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | 139 * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
@@ -177,13 +178,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
177/* Keymap 2: Media, mouse and navigation 178/* Keymap 2: Media, mouse and navigation
178 * 179 *
179 * ,--------------------------------------------------. ,--------------------------------------------------. 180 * ,--------------------------------------------------. ,--------------------------------------------------.
180 * | | gg(1)| | | | | | | | | | | | | | 181 * | | gg(1)| gg(2)| gg(3)| gg(4)| gg(5)| gg(6)| | gg(6)| gg(7)| gg(8)| gg(9)| gg(0)| | |
181 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 182 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
182 * | | | | MsUp | RUN | | | | | | | Up | | | | 183 * | | | | MsUp | RUN | | | | | | | Up | | | |
183 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 184 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
184 * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | 185 * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play |
185 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 186 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
186 * | | | | | | | | | | | | Prev | Next | | | 187 * | | | | | | | | | | | Prev | Next | | | |
187 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 188 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
188 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | 189 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
189 * `----------------------------------' `----------------------------------' 190 * `----------------------------------' `----------------------------------'
@@ -209,7 +210,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
209 F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS, 210 F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS,
210 KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, 211 KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
211 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, 212 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY,
212 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, 213 KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS,
213 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, 214 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
214 KC_TRNS, KC_TRNS, 215 KC_TRNS, KC_TRNS,
215 KC_TRNS, 216 KC_TRNS,
@@ -238,7 +239,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
238 * `--------------------' `--------------------' 239 * `--------------------' `--------------------'
239 */ 240 */
240// Unicode 241// Unicode
241[NAVG] = KEYMAP( 242[UNI] = KEYMAP(
242 KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), 243 KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500),
243 KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS, 244 KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS,
244 KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU), 245 KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU),
@@ -257,6 +258,48 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
257 KC_TRNS, 258 KC_TRNS,
258 KC_TRNS, KC_TRNS, KC_TRNS 259 KC_TRNS, KC_TRNS, KC_TRNS
259), 260),
261
262/* Keymap 4: Unicode 2
263 *
264 * ,--------------------------------------------------. ,--------------------------------------------------.
265 * | | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ℃ | ™ |
266 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
267 * | | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | | ₆ | ₇ | ₈ | ₉ | ₀ | ⁄ | |
268 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
269 * | | ⅞ | ⅝ | ⅜ | ⅛ | ⅚ |------| |------| ⅓ | ⅒ | ⅑ | ⅐ | ¾ | |
270 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
271 * | | | | ⅗ | ⅖ | ⅕ | ⅔ | | ¼ | ⅙ | ⅘ | ½ | | | |
272 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
273 * | | | | | | | | | | | |
274 * `----------------------------------' `----------------------------------'
275 * ,-------------. ,-------------.
276 * | | | | | |
277 * ,------|------|------| |------+------+------.
278 * | | | | | | | |
279 * | | |------| |------| | |
280 * | | | | | | | |
281 * `--------------------' `--------------------'
282 */
283// Unicode 2
284[UNI2] = KEYMAP(
285 KC_TRNS, UC(0x00b9), UC(0x00b2), UC(0x00b3), UC(0x2074), UC(0x2075), UC(0x2076),
286 KC_TRNS, UC(0x2081), UC(0x2082), UC(0x2083), UC(0x2084), UC(0x2085), UC(0x2086),
287 KC_TRNS, UC(0x215e), UC(0x215d), UC(0x215c), UC(0x215b), UC(0x215a),
288 KC_TRNS, KC_TRNS, KC_TRNS, UC(0x2157), UC(0x2156), UC(0x2155), UC(0x2154),
289 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
290 KC_TRNS, KC_TRNS,
291 KC_TRNS,
292 KC_TRNS, KC_TRNS, KC_TRNS,
293 // right hand
294 UC(0x2076), UC(0x2077), UC(0x2078), UC(0x2079), UC(0x2070), UC(0x2103), UC(0x2122),
295 UC(0x2086), UC(0x2087), UC(0x2088), UC(0x2089), UC(0x2080), UC(0x2044), KC_TRNS,
296 UC(0x2153), UC(0x2152), UC(0x2151), UC(0x2150), UC(0x00be), KC_TRNS,
297 UC(0x00bc), UC(0x2159), UC(0x2158), UC(0x00bd), KC_TRNS, KC_TRNS, KC_TRNS,
298 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
299 KC_TRNS, KC_TRNS,
300 KC_TRNS,
301 KC_TRNS, KC_TRNS, KC_TRNS
302),
260}; 303};
261 304
262const uint16_t PROGMEM fn_actions[] = { 305const uint16_t PROGMEM fn_actions[] = {
@@ -506,8 +549,11 @@ void matrix_scan_user(void) {
506 #endif 549 #endif
507 break; 550 break;
508 case 4: 551 case 4:
509 ergodox_right_led_1_on(); // TODO: Make a fourth layer 552 ergodox_right_led_1_on();
510 ergodox_right_led_3_on(); 553 ergodox_right_led_3_on();
554 #ifdef RGBLIGHT_ENABLE
555 rgblight_setrgb(0xff,0x00,0xff);
556 #endif
511 break; 557 break;
512 default: 558 default:
513 // none 559 // none
diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md
index fa41f0ec1..c839f99c9 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/readme.md
+++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md
@@ -51,10 +51,16 @@ provides standard media control keys, and default arrow keys.
51 51
52## Layer 3 - Unicode 52## Layer 3 - Unicode
53 53
54[![Layer 3 - Unicode](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) 54[![Layer 3 - Unicode](images/deadcyclo-layer-3-unicode.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289)
55 55
56The unicode layer provides keys for directly typing unicode (utf-8) 56The unicode layer provides keys for directly typing unicode (utf-8)
57 57
58## Layer 4 - Unicode 2
59
60[![Layer 43 - Unicode](images/deadcyclo-layer-4-unicode-2.png)](http://www.keyboard-layout-editor.com/#/gists/7b2241110ab8311d9668a0798f3baf4a)
61
62The unicode 2 layer provides keys for directly typing unicode (utf-8)
63
58# Changelog 64# Changelog
59 65
60- 02.01.2017 Added delete key on second layer 66- 02.01.2017 Added delete key on second layer
@@ -63,6 +69,7 @@ The unicode layer provides keys for directly typing unicode (utf-8)
63- 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 69- 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2
64- 25.01.2017 Added lots of new emojis and some unicode keys 70- 25.01.2017 Added lots of new emojis and some unicode keys
65- 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U) 71- 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U)
72- 11.03.2017 Added additional unicode layer. Moved some layer switch keys to more sane locations
66 73
67# TODO 74# TODO
68 75
diff --git a/keyboards/ergodox/keymaps/guni/keymap.c b/keyboards/ergodox/keymaps/guni/keymap.c
index f33829b8a..9d9191f62 100644
--- a/keyboards/ergodox/keymaps/guni/keymap.c
+++ b/keyboards/ergodox/keymaps/guni/keymap.c
@@ -170,7 +170,7 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
170 if (id == TEENSY_KEY) { 170 if (id == TEENSY_KEY) {
171 clear_keyboard(); 171 clear_keyboard();
172 print("\n\nJump to bootloader... "); 172 print("\n\nJump to bootloader... ");
173 _delay_ms(250); 173 wait_ms(250);
174 bootloader_jump(); // should not return 174 bootloader_jump(); // should not return
175 print("not supported.\n"); 175 print("not supported.\n");
176 } 176 }
diff --git a/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c
new file mode 100644
index 000000000..ab2464c42
--- /dev/null
+++ b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c
@@ -0,0 +1,408 @@
1#include "ergodox.h"
2#include "action_layer.h"
3#include "keymap_extras/keymap_german.h"
4
5#define UM 0
6
7#define L0 0 // layer_0
8#define L1 1 // layer_1
9#define L2 2 // layer_2
10#define L3 3 // layer_3
11#define L4 4 // layer_4
12#define L5 5 // layer_5
13#define L6 6 // layer_6
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16/*
17 .------------------------------------.------------------------------------.
18 |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ |
19 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
20 |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß |
21 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
22 |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y |
23 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
24 |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT |
25 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
26 |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL|
27 '------------------------' '------------------------'
28 .-----------. .-----------.
29 |VOL- |VOL+ | !MUTE |PLAY |
30 .-----+-----+-----! !-----+-----+-----.
31 ! ! | | ! | ! !
32 ! ! |-----| !-----| ! !
33 ! CTL ! ! ALT ! ! CTL ! ! ALT !
34 |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE|
35 '-----------------' '-----------------'
36 */
37[L0] = KEYMAP(
38 KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT,
39 KC_TAB, DE_X, DE_V, DE_L, DE_C, DE_W, KC_PSCR,
40 MO(1), DE_U, DE_I, DE_A, DE_E, DE_O,
41 KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_SPACE,
42 KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2),
43 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_VOLU,
44 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
45 /*-*/ /*-*/ /*-*/ /*-*/ CTL_T(KC_ENTER), MO(1), ALT_T(KC_TAB),
46 DE_GRV, DE_6, DE_7, DE_8, DE_9, DE_0, DE_CIRC,
47 KC_TRNS, DE_K, DE_H, DE_G, DE_F, DE_Q, DE_SS,
48 /*-*/ DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y,
49 KC_TRNS, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_RSFT,
50 /*-*/ /*-*/ MO(2), MO(3), KC_APP, KC_RALT, KC_RCTL,
51 KC_MUTE, KC_MPLY,
52 KC_TRNS,
53 CTL_T(KC_ESC), MO(1), ALT_T(KC_SPACE)
54),
55/*
56 .------------------------------------.------------------------------------.
57 | | | | | | | | | | | | | | |
58 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
59 | | € | _ | [ | ] | | | | ! | < | > | = | & | |
60 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
61 | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ |
62 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
63 | | # | $ | | | ~ | | | | + | % | " | ' | ; | |
64 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
65 | | | | | | ! | | | | |
66 '------------------------' '------------------------'
67 .-----------. .-----------.
68 | | | ! | |
69 .-----+-----+-----! !-----+-----+-----.
70 ! ! | | ! | ! !
71 ! ! !-----! !-----! ! !
72 | | | | ! | | |
73 '-----------------' '-----------------'
74 */
75[L1] = KEYMAP(
76 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
77 KC_TRNS, DE_EURO, DE_UNDS, DE_LBRC, DE_RBRC, KC_TRNS, KC_TRNS,
78 KC_TRNS, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR,
79 KC_TRNS, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, KC_TRNS, KC_TRNS,
80 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
81 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
82 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
83 /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
84 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
85 KC_TRNS, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, KC_TRNS,
86 /*-*/ DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT,
87 KC_TRNS, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, KC_TRNS,
88 /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
89 KC_TRNS, KC_TRNS,
90 KC_TRNS,
91 KC_TRNS, KC_TRNS, KC_TRNS
92),
93/*
94 * .------------------------------------.------------------------------------.
95 * | | | | | | | | | | | | | | |
96 * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
97 * | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | |
98 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
99 * | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | |
100 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
101 * | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | |
102 * '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
103 * | | | | | | ! | | | | |
104 * '------------------------' '------------------------'
105 * .-----------. .-----------.
106 * | | | ! | |
107 * .-----+-----+-----! !-----+-----+-----.
108 * ! ! | | ! | ! !
109 * ! ! !-----! !-----! ! !
110 * | | | | ! | | 0 |
111 * '-----------------' '-----------------'
112 */
113[L2] = KEYMAP(
114 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
115 KC_TRNS, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_TRNS,
116 KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,
117 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
118 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
119 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
120 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
121 /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
122 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
123 KC_TRNS, KC_TRNS, DE_7, DE_8, DE_9, KC_TRNS, KC_TRNS,
124 /*-*/ KC_TRNS, DE_4, DE_5, DE_6, KC_TRNS, KC_TRNS,
125 KC_TRNS, KC_TRNS, DE_1, DE_2, DE_3, KC_TRNS, KC_TRNS,
126 /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
127 KC_TRNS, KC_TRNS,
128 KC_TRNS,
129 KC_TRNS, KC_TRNS, DE_0
130),
131/*
132 * .------------------------------------.------------------------------------.
133 * | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | |
134 * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
135 * | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | |
136 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
137 * |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | |
138 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
139 * | | |M_A2|M_A1|M_A0| | | | | | | | | |
140 * '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
141 * | | | | | | ! | | | | |
142 * '------------------------' '------------------------'
143 * .-----------. .-----------.
144 * | | | ! | |
145 * .-----+-----+-----! !-----+-----+-----.
146 * ! ! | | ! | ! !
147 * ! ! !-----! !-----! ! !
148 * | | | | ! | | |
149 * '-----------------' '-----------------'
150 */
151[L3] = KEYMAP(
152 KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
153 KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
154 KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_TRNS,
155 KC_TRNS, KC_TRNS, KC_ACL2, KC_ACL1, KC_ACL0, KC_TRNS, KC_TRNS,
156 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
157 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
158 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
159 /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
160 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
161 KC_TRNS, KC_TRNS, KC_WH_U, KC_MS_U, KC_WH_D, KC_TRNS, KC_TRNS,
162 /*-*/ KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
163 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
164 /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
165 KC_TRNS, KC_TRNS,
166 KC_TRNS,
167 KC_TRNS, KC_TRNS, KC_TRNS
168),
169/*
170 * .------------------------------------.------------------------------------.
171 * | | | | | | | | | | | | | | |
172 * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
173 * | | | | | | | | | | | | | | |
174 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
175 * | | | | | | |-----!-----! | | | | | |
176 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
177 * | | | | | | | | | | | | | | |
178 * '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
179 * | | | | | | ! | | | | |
180 * '------------------------' '------------------------'
181 * .-----------. .-----------.
182 * | | | ! | |
183 * .-----+-----+-----! !-----+-----+-----.
184 * ! ! | | ! | ! !
185 * ! ! !-----! !-----! ! !
186 * | | | | ! | | |
187 * '-----------------' '-----------------'
188 */
189[L4] = KEYMAP(
190 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
191 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
192 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
193 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
194 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
195 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
196 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
197 /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
198 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
199 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
200 /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
201 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
202 /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
203 KC_TRNS, KC_TRNS,
204 KC_TRNS,
205 KC_TRNS, KC_TRNS, KC_TRNS
206),
207/*
208 * .------------------------------------.------------------------------------.
209 * | | | | | | | | | | | | | | |
210 * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
211 * | | | | | | | | | | | | | | |
212 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
213 * | | | | | | |-----!-----! | | | | | |
214 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
215 * | | | | | | | | | | | | | | |
216 * '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
217 * | | | | | | ! | | | | |
218 * '------------------------' '------------------------'
219 * .-----------. .-----------.
220 * | | | ! | |
221 * .-----+-----+-----! !-----+-----+-----.
222 * ! ! | | ! | ! !
223 * ! ! !-----! !-----! ! !
224 * | | | | ! | | |
225 * '-----------------' '-----------------'
226 */
227[L5] = KEYMAP(
228 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
229 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
230 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
231 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
232 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
233 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
234 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
235 /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
236 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
237 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
238 /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
239 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
240 /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
241 KC_TRNS, KC_TRNS,
242 KC_TRNS,
243 KC_TRNS, KC_TRNS, KC_TRNS
244),
245/*
246 * .------------------------------------.------------------------------------.
247 * | | | | | | | | | | | | | | |
248 * !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
249 * | | | | | | | | | | | | | | |
250 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
251 * | | | | | | |-----!-----! | | | | | |
252 * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
253 * | | | | | | | | | | | | | | |
254 * '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
255 * | | | | | | ! | | | | |
256 * '------------------------' '------------------------'
257 * .-----------. .-----------.
258 * | | | ! | |
259 * .-----+-----+-----! !-----+-----+-----.
260 * ! ! | | ! | ! !
261 * ! ! !-----! !-----! ! !
262 * | | | | ! | | |
263 * '-----------------' '-----------------'
264 */
265[L6] = KEYMAP(
266 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
267 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
268 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
269 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
270 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
271 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
272 /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
273 /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
274 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
275 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
276 /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
277 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
278 /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
279 KC_TRNS, KC_TRNS,
280 KC_TRNS,
281 KC_TRNS, KC_TRNS, KC_TRNS
282),
283};
284
285const uint16_t PROGMEM fn_actions[] = {};
286
287#define UC_MODE_WIN 0
288#define UC_MODE_LINUX 1
289#define UC_MODE_OSX 2
290
291// TODO: allow default mode to be configured
292static uint16_t unicode_mode = UC_MODE_WIN;
293
294uint16_t hextokeycode(uint8_t hex) {
295 if (hex == 0x0) {
296 return KC_P0;
297 }
298 if (hex < 0xA) {
299 return KC_P1 + (hex - 0x1);
300 }
301 return KC_A + (hex - 0xA);
302}
303
304void unicode_action_function(uint16_t hi, uint16_t lo) {
305 switch (unicode_mode) {
306 case UC_MODE_WIN:
307 register_code(KC_LALT);
308
309 register_code(KC_PPLS);
310 unregister_code(KC_PPLS);
311
312 register_code(hextokeycode((hi & 0xF0) >> 4));
313 unregister_code(hextokeycode((hi & 0xF0) >> 4));
314 register_code(hextokeycode((hi & 0x0F)));
315 unregister_code(hextokeycode((hi & 0x0F)));
316 register_code(hextokeycode((lo & 0xF0) >> 4));
317 unregister_code(hextokeycode((lo & 0xF0) >> 4));
318 register_code(hextokeycode((lo & 0x0F)));
319 unregister_code(hextokeycode((lo & 0x0F)));
320
321 unregister_code(KC_LALT);
322 break;
323 case UC_MODE_LINUX:
324 register_code(KC_LCTL);
325 register_code(KC_LSFT);
326
327 register_code(KC_U);
328 unregister_code(KC_U);
329
330 register_code(hextokeycode((hi & 0xF0) >> 4));
331 unregister_code(hextokeycode((hi & 0xF0) >> 4));
332 register_code(hextokeycode((hi & 0x0F)));
333 unregister_code(hextokeycode((hi & 0x0F)));
334 register_code(hextokeycode((lo & 0xF0) >> 4));
335 unregister_code(hextokeycode((lo & 0xF0) >> 4));
336 register_code(hextokeycode((lo & 0x0F)));
337 unregister_code(hextokeycode((lo & 0x0F)));
338
339 unregister_code(KC_LCTL);
340 unregister_code(KC_LSFT);
341 break;
342 case UC_MODE_OSX:
343 break;
344 }
345}
346
347const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
348 if (!record->event.pressed) {
349 return MACRO_NONE;
350 }
351 // MACRODOWN only works in this function
352 switch(id) {
353 case UM:
354 unicode_mode = (unicode_mode + 1) % 2;
355 break;
356
357
358 default:
359 break;
360 }
361 return MACRO_NONE;
362};
363
364// Runs just one time when the keyboard initializes.
365void matrix_init_user(void) {
366
367};
368
369// Runs constantly in the background, in a loop.
370void matrix_scan_user(void) {
371 uint8_t layer = biton32(layer_state);
372
373 ergodox_board_led_off();
374 ergodox_right_led_1_off();
375 ergodox_right_led_2_off();
376 ergodox_right_led_3_off();
377 switch (layer) {
378 case L1:
379 ergodox_right_led_1_on();
380 break;
381 case L2:
382 ergodox_right_led_2_on();
383 break;
384 case L3:
385 ergodox_right_led_3_on();
386 break;
387 case L4:
388 ergodox_right_led_1_on();
389 ergodox_right_led_2_on();
390 break;
391 case L5:
392 ergodox_right_led_1_on();
393 ergodox_right_led_3_on();
394 break;
395 // case L6:
396 // ergodox_right_led_2_on();
397 // ergodox_right_led_3_on();
398 // break;
399 // case L7:
400 // ergodox_right_led_1_on();
401 // ergodox_right_led_2_on();
402 // ergodox_right_led_3_on();
403 // break;
404 default:
405 ergodox_board_led_off();
406 break;
407 }
408};
diff --git a/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md
new file mode 100644
index 000000000..d9fcda966
--- /dev/null
+++ b/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md
@@ -0,0 +1,194 @@
1# Neo2 for ErgoDox on QWERTZ
2#
3# Description
4This layout is ment to be used on PCs with DE-de with an additional guest keyboard. E.g. on your PC at work you can use your ergodox with neo but a second keybord is plugged in so your coworkers can enter a few signs if necessary. I live in Germany, so this is my usecase.
5# Layers
6[Layer0](#layer-0)
7Letters, modifiers and volume
8
9[Layer1](#layer-1)
10Symbols
11
12[Layer2](#layer-2)
13Motion, digits and next/prev Song
14
15[Layer3](#layer-3)
16F1 to F12 and mouse actions
17
18[Layer4](#layer-4)
19not used
20
21[Layer5](#layer-5)
22not used
23
24[Layer6](#layer-6)
25not used
26
27
28## Layer 0
29
30 .------------------------------------.------------------------------------.
31 |ESC | 1 | 2 | 3 | 4 | 5 | ´ | ` | 6 | 7 | 8 | 9 | 0 | ^ |
32 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
33 |TAB | X | V | L | C | W |Print| | K | H | G | F | Q | ß |
34 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
35 |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | Y |
36 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
37 |LSFT | ü | ö | ä | P | Z |SPACE| | B | M | , | . | J |RSFT |
38 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
39 |LCTL|LGUI|LALT|MO(3)|MO(2)| !MO(2)|MO(3)|APP |RALT|RCTL|
40 '------------------------' '------------------------'
41 .-----------. .-----------.
42 |VOL- |VOL+ | !MUTE |PLAY |
43 .-----+-----+-----! !-----+-----+-----.
44 ! ! | | ! | ! !
45 ! ! |-----| !-----| ! !
46 ! CTL ! ! ALT ! ! CTL ! ! ALT !
47 |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE|
48 '-----------------' '-----------------'
49
50* Left side ESC, TAB, [SymbolLayer], Shift, Ctr, Gui(Windows key), and Alt like normal QWERTZ with neo2.
51* Space on right side of left half for mous activity so you don't have to leave the mouse for Space.
52* Top row of thumb keys is hard to reach for me, so I put media control on there.
53* Thumb keys make use of modifier/tap. E.g. if you tap the Enter key it will be Enter. If you keep it pressed down it will be Ctr. The hold action is written on top of the tap action.
54* The small middle thumb keys are not used, es well as the 1.5 sized ones on the left side of the right half.
55
56
57## Layer 1
58
59 .------------------------------------.------------------------------------.
60 | | | | | | | | | | | | | | |
61 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
62 | | € | _ | [ | ] | | | | ! | < | > | = | & | |
63 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
64 | | \ | / | { | } | * |-----!-----! ? | ( | ) | - | : | @ |
65 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
66 | | # | $ | | | ~ | | | | + | % | " | ' | ; | |
67 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
68 | | | | | | ! | | | | |
69 '------------------------' '------------------------'
70 .-----------. .-----------.
71 | | | ! | |
72 .-----+-----+-----! !-----+-----+-----.
73 ! ! | | ! | ! !
74 ! ! !-----! !-----! ! !
75 | | | | ! | | |
76 '-----------------' '-----------------'
77
78
79## Layer 2
80
81 .------------------------------------.------------------------------------.
82 | | | | | | | | | | | | | | |
83 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
84 | |PGUP|BSPC| UP |DEL |PGDN| | | | 7 | 8 | 9 | | |
85 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
86 | |HOME|LEFT|DOWN|RGHT|END |-----!-----! | 4 | 5 | 6 | | |
87 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
88 | | | |PREV|NEXT| | | | | 1 | 2 | 3 | | |
89 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
90 | | | | | | ! | | | | |
91 '------------------------' '------------------------'
92 .-----------. .-----------.
93 | | | ! | |
94 .-----+-----+-----! !-----+-----+-----.
95 ! ! | | ! | ! !
96 ! ! !-----! !-----! ! !
97 | | | | ! | | 0 |
98 '-----------------' '-----------------'
99
100
101
102## Layer 3
103
104 .------------------------------------.------------------------------------.
105 | | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | |
106 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
107 | | F7 | F8 | F9 | F10| F11| F12 | | |M_WU|M_CU|M_WD| | |
108 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
109 |M_B5 |M_B4|M_B3|M_B2|M_B1| |-----!-----! |M_CL|M_CD|M_CR| | |
110 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
111 | | |M_A2|M_A1|M_A0| | | | | | | | | |
112 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
113 | | | | | | ! | | | | |
114 '------------------------' '------------------------'
115 .-----------. .-----------.
116 | | | ! | |
117 .-----+-----+-----! !-----+-----+-----.
118 ! ! | | ! | ! !
119 ! ! !-----! !-----! ! !
120 | | | | ! | | |
121 '-----------------' '-----------------'
122* M_A Mouse acceleration
123* M_B Mouse button
124* M_C Mouse cursor
125* M_W Mouse wheel
126
127## Layer 4
128
129
130
131 .------------------------------------.------------------------------------.
132 | | | | | | | | | | | | | | |
133 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
134 | | | | | | | | | | | | | | |
135 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
136 | | | | | | |-----!-----! | | | | | |
137 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
138 | | | | | | | | | | | | | | |
139 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
140 | | | | | | ! | | | | |
141 '------------------------' '------------------------'
142 .-----------. .-----------.
143 | | | ! | |
144 .-----+-----+-----! !-----+-----+-----.
145 ! ! | | ! | ! !
146 ! ! !-----! !-----! ! !
147 | | | | ! | | |
148 '-----------------' '-----------------'
149
150
151## Layer 5
152
153
154 .------------------------------------.------------------------------------.
155 | | | | | | | | | | | | | | |
156 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
157 | | | | | | | | | | | | | | |
158 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
159 | | | | | | |-----!-----! | | | | | |
160 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
161 | | | | | | | | | | | | | | |
162 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
163 | | | | | | ! | | | | |
164 '------------------------' '------------------------'
165 .-----------. .-----------.
166 | | | ! | |
167 .-----+-----+-----! !-----+-----+-----.
168 ! ! | | ! | ! !
169 ! ! !-----! !-----! ! !
170 | | | | ! | | |
171 '-----------------' '-----------------'
172
173
174## Layer 6
175
176 .------------------------------------.------------------------------------.
177 | | | | | | | | | | | | | | |
178 !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
179 | | | | | | | | | | | | | | |
180 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
181 | | | | | | |-----!-----! | | | | | |
182 !-----+----+----+----x----x----! ! !----x----x----+----+----+-----!
183 | | | | | | | | | | | | | | |
184 '-----+----+----+----+----+----------'----------+----+----+----+----+-----'
185 | | | | | | ! | | | | |
186 '------------------------' '------------------------'
187 .-----------. .-----------.
188 | | | ! | |
189 .-----+-----+-----! !-----+-----+-----.
190 ! ! | | ! | ! !
191 ! ! !-----! !-----! ! !
192 | | | | ! | | |
193 '-----------------' '-----------------'
194
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c
new file mode 100644
index 000000000..4c735a6c2
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c
@@ -0,0 +1 @@
#include "MS-sculpt-mobile.h"
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h
new file mode 100644
index 000000000..1583dea6e
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h
@@ -0,0 +1,48 @@
1#ifndef MICROSOFT_SCULPT_MOBILE_H
2#define MICROSOFT_SCULPT_MOBILE_H
3
4#include "quantum.h"
5
6
7#define KEYMAP( \
8 k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \
9 k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \
10 k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \
11 k0J, k6A, k6B, k6C, k7H, k1A, k1B, k5D, k5E, k5F, k5G, k1C, k7P, k2G, \
12 k2P, k7K, k7L, k7M, k7O, k0A, k0B, k0C, k0D, k0E, k0F, k2L, k6G, k1P,\
13 k1Q, k4N, k3O,k6N, k3K, k0R, k1M, k6H, k6I, k6J \
14) \
15{ \
16 {k0A, k0B, k0C, k0D, k0E, k0F, KC_NO, KC_NO, KC_NO, k0J, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, k0R},\
17 {k1A, k1B, k1C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k1K, k1L, k1M, KC_NO, k1O, k1P, k1Q, KC_NO},\
18 {k2A, k2B, k2C, k2D, k2E, KC_NO, k2G, KC_NO, KC_NO, KC_NO, KC_NO, k2L, KC_NO, KC_NO, KC_NO, k2P, KC_NO, KC_NO},\
19 {k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k3K, KC_NO, KC_NO, KC_NO, k3O, KC_NO, KC_NO, KC_NO},\
20 {k4A, k4B, k4C, k4D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k4N, KC_NO,KC_NO, KC_NO, KC_NO},\
21 {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q, KC_NO },\
22 {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6J, KC_NO, KC_NO, KC_NO, k6N, k6O, k6P, k6Q, k6R},\
23 {k7A, k7B, k7C, k7D, k7E, k7F, KC_NO, k7H, k7I, k7J, k7K, k7L, k7M, KC_NO, k7O, k7P, k7Q, KC_NO},\
24}
25
26
27#define MATRIX_TESTING_KEYMAP( \
28 k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\
29 k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\
30 k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\
31 k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q,\
32 k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q,\
33 k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q,\
34 k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q,\
35 k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q\
36) \
37{ \
38 {k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q},\
39 {k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q},\
40 {k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q},\
41 {k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q},\
42 {k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q},\
43 {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q},\
44 {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q},\
45 {k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q},\
46}
47
48#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/Makefile b/keyboards/handwired/MS-sculpt-mobile/Makefile
new file mode 100644
index 000000000..bd09e5885
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c
new file mode 100644
index 000000000..3a9b86997
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c
@@ -0,0 +1,459 @@
1/* A library to output the right key shortcut in any common app.
2Given a global variable babble_mode to show the environment and a
3key that calls the paste macro, do the right type of paste.
4Setting the context is done by another macro, or TBD interaction with the host.
5
6Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
7and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
8*/
9
10#include "babblePaste.h"
11#include "action_macro.h"
12
13#ifdef USE_BABLPASTE
14
15// GLOBAL variable to determine mode. Sets startup default if no eeppom
16uint8_t babble_mode =0 ;
17
18// small function that we might also want to call from a keymap.
19
20macro_t* switch_babble_mode( uint8_t id) {
21 babble_mode= id;
22 return MACRO_NONE; //less typing where called
23}
24
25
26// Today I learned that the preprocessor can not create a switch statement label from an argument
27// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
28#define BABLM(ent, macro...) \
29 if ( ent == shortcut ) \
30 { action_macro_play( MACRO(macro)); return MACRO_NONE; }
31
32
33/* this function runs the appropriate babblepaste macro, given
34the global babble_mode, and a shortcut from the ENUM in babblePaste.h
35TODO, the pointers in this function should be stored in a PROGMEM array, not ram.
36But that requires even more clever preprocessor foo.
37*/
38const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
39/*
40 if ( shortcut < BABL_START_NUM || \
41 shortcut >= (BABL_START_NUM + BABL_NUM_MACROS ) ) {
42 return MACRO_NONE;
43 }
44*/
45
46
47#ifdef MS_MODE
48 if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
49#endif
50#ifdef MAC_MODE
51 if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
52#endif
53#ifdef LINUX_MODE
54 if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
55#endif
56 #ifdef READMUX_MODE
57 if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
58#endif
59#ifdef VI_MODE
60 if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
61#endif
62#ifdef EMACS_MODE
63 if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); }
64#endif
65
66
67
68 switch(babble_mode) {
69
70#ifdef MS_MODE
71
72 case MS_MODE:
73 BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
74 BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
75 BABLM( BABL_GO_LEFT_WORD, D(LCTL), T(LEFT), U(LCTL), END );
76 BABLM( BABL_GO_RIGHT_WORD, D(LCTL), T(RIGHT), U(LCTL), END );
77 BABLM( BABL_GO_START_LINE, T(HOME), END );
78 BABLM( BABL_GO_END_LINE, T(END), END );
79 BABLM( BABL_GO_START_DOC, D(LCTL),T(HOME), U(LCTL),END );
80 BABLM( BABL_GO_END_DOC, D(LCTL),T(END), U(LCTL),END );
81 BABLM( BABL_GO_NEXT_LINE, T(DOWN), END );
82 BABLM( BABL_GO_PREV_LINE, T(UP), END );
83 BABLM( BABL_PGDN, T(PGDN), END );
84 BABLM( BABL_PGUP, T(PGUP), END );
85 BABLM( BABL_DEL_RIGHT_1C, T(DEL), END );
86 BABLM( BABL_DEL_LEFT_WORD, D(LCTL), T(BSPACE), U(LCTL), END );
87 BABLM( BABL_DEL_RIGHT_WORD, D(LCTL), T(DEL), U(LCTL), END );
88 BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
89 BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END );
90#ifndef BABL_MOVEMENTONLY
91 BABLM( BABL_UNDO, D(LCTL), T(Z), U(LCTL), END );
92 BABLM( BABL_REDO, D(LCTL), T(Y), U(LCTL), END );
93 BABLM( BABL_CUT, D(LCTL), T(X), U(LCTL), END );
94 BABLM( BABL_COPY, D(LCTL), T(C), U(LCTL), END );
95 BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END );
96 BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
97 BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
98 BABLM( BABL_FIND_NEXT, T(F3),END );
99 BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END );
100 BABLM( BABL_RUNAPP, D(LGUI),T(R), U(LGUI),END );
101 BABLM( BABL_SWITCH_APP_NEXT, D(LALT),T(TAB), U(LALT),END );
102 BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END );
103 BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
104 BABLM( BABL_HELP, T(F1),END );
105#ifndef BABL_NOBROWSER
106 BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
107 BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END );
108 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END );
109 BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END );
110 BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END );
111 BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END );
112 BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END );
113 BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
114 BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
115 BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
116 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE
117 BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
118 // Chrome
119 BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
120 BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F
121 BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), D(RSFT), T(EQL), U(RSFT), U(LCTL),END ); // ctr+ +
122 BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END );
123#endif
124#endif
125
126 // Todo, ring bell, flash light, show user this isn't supported
127 return MACRO_NONE;
128
129
130#endif /* MS_MODE*/
131
132
133#ifdef LINUX_MODE
134
135 case LINUX_MODE:
136 BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
137 BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
138 BABLM( BABL_GO_LEFT_WORD , D(LCTL), T(LEFT), U(LCTL), END );
139 BABLM( BABL_GO_RIGHT_WORD , D(LCTL), T(RIGHT), U(LCTL), END );
140 BABLM( BABL_GO_START_LINE , T(HOME), END );
141 BABLM( BABL_GO_END_LINE , T(END), END );
142 BABLM( BABL_GO_START_DOC , D(LCTL),T(HOME), U(LCTL),END );
143 BABLM( BABL_GO_END_DOC , D(LCTL),T(END), U(LCTL),END );
144 BABLM( BABL_GO_NEXT_LINE , T(DOWN), END );
145 BABLM( BABL_GO_PREV_LINE , T(UP), END );
146 BABLM( BABL_PGDN , T(PGDN), END );
147 BABLM( BABL_PGUP , T(PGUP), END );
148 BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
149 BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
150 BABLM( BABL_DEL_RIGHT_WORD , D(LCTL), T(DEL), U(LCTL), END );
151 BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
152 BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END );
153#ifndef BABL_MOVEMENTONLY
154 BABLM( BABL_UNDO , D(LCTL), T(Z), U(LCTL), END );
155 BABLM( BABL_REDO , D(LCTL), T(Y), U(LCTL), END );
156 BABLM( BABL_CUT , D(LCTL), T(X), U(LCTL), END );
157 BABLM( BABL_COPY , D(LCTL), T(C), U(LCTL), END );
158 BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END );
159 BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
160 BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
161 /* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */
162 BABLM( BABL_FIND_NEXT, D(LCTL),T(G), U(LCTL),END ); // Gnome*/
163 /* BABLM( , D(LCTL),T(R), U(LCTL),END ); KDE */
164 BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END ); // Gnome*/
165 BABLM( BABL_RUNAPP, D(LALT),T(F2), U(LALT),END );
166 BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END );
167 BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END );
168 BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
169 //BABLM( BABL_HELP, END );
170
171#ifndef BABL_NOBROWSER
172 BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
173 BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END );
174 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END );
175 BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END );
176 BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END );
177 BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END );
178 BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END );
179 BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
180 BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
181 BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
182 BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
183 BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
184 BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F
185 BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), T(PLUS), U(LCTL),END );
186 BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END );
187#endif
188#endif
189 return MACRO_NONE;
190
191#endif
192
193#ifdef MAC_MODE
194
195 case MAC_MODE:
196 BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
197 BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END );
198 BABLM( BABL_GO_LEFT_WORD , D(LALT), T(LEFT), U(LALT), END );
199 BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(RIGHT), U(LALT), END );
200 BABLM( BABL_GO_START_LINE , D(LGUI), T(LEFT), U(LGUI), END );
201 BABLM( BABL_GO_END_LINE , D(LGUI), T(RIGHT), U(LGUI), END );
202 BABLM( BABL_GO_START_DOC , D(LGUI),T(UP), U(LGUI),END );
203 BABLM( BABL_GO_END_DOC , D(LGUI),T(DOWN), U(LGUI),END );
204 BABLM( BABL_GO_NEXT_LINE , T(DOWN), END );
205 BABLM( BABL_GO_PREV_LINE , T(UP), END );
206 BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END );
207 BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END );
208 BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
209 BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END );
210 BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END );
211 BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );// there must be another way
212 BABLM( BABL_DEL_TO_LINE_START, D(LGUI), T(BSPACE), U(LGUI), END );
213#ifndef BABL_MOVEMENTONLY
214 BABLM( BABL_UNDO , D(1), D(LGUI), T(Z), U(LGUI), END );
215 BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END );
216 BABLM( BABL_CUT , D(LGUI), T(X), U(LGUI), END );
217 BABLM( BABL_COPY , D(LGUI), T(C), U(LGUI), END );
218 BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END );
219 BABLM( BABL_SELECT_ALL , D(LGUI), T(A), U(LGUI), END );
220 BABLM( BABL_FIND , D(LGUI),T(F), U(LGUI),END );
221 BABLM( BABL_FIND_NEXT, D(LGUI),T(G), U(LGUI),END );
222 BABLM( BABL_FIND_REPLACE, D(LGUI),T(F), U(LGUI),END );
223 BABLM( BABL_RUNAPP , D(LGUI),T(R), U(LGUI),END );
224 BABLM( BABL_SWITCH_APP_NEXT , D(LGUI),T(TAB), U(LGUI),END );
225 BABLM( BABL_SWITCH_APP_LAST , D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END );
226 BABLM( BABL_CLOSE_APP , D(LGUI),T(Q), U(LGUI),END );
227 BABLM( BABL_HELP , D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END );
228
229#ifndef BABL_NOBROWSER
230 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
231 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
232 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
233 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
234 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
235 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
236 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
237 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
238 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
239 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
240 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
241 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
242 // Chrome
243 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
244 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
245 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ +
246 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
247#endif
248#endif
249
250 return MACRO_NONE;
251#endif
252
253#ifdef EMACS_MODE
254
255 case EMACS_MODE:
256 switch(shortcut) {
257//probably should allow meta to not be ALT
258
259 BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
260 BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END );
261 BABLM( BABL_GO_LEFT_WORD, D(LALT), T(B), U(LALT), END );
262 BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END );
263 BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END );
264 BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END );
265 BABLM( BABL_GO_START_DOC , D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END );
266 BABLM( BABL_GO_END_DOC , D(LALT), D(LSFT), T(DOT), U(LSFT), U(LALT) ,END );
267 BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END );
268 BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
269 BABLM( BABL_PGDN , D(LCTL), T(V), U(LCTL), END );
270 BABLM( BABL_PGUP , D(LALT), T(V), U(LALT), END );
271 BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END );
272 BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
273 BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
274 BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
275 BABLM( BABL_DEL_TO_LINE_START, T(ESC), T(0), D(LCTL), T(K), U(LCTL), END );
276#ifndef BABL_MOVEMENTONLY
277 BABLM( BABL_UNDO , D(LCTL), T(X), U(LCTL),T(C), END );
278 BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
279 BABLM( BABL_CUT , D(LCTL), T(W), U(LCTL), END );
280 BABLM( BABL_COPY , D(LALT), T(W), U(LALT), END ); //really?
281 BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
282 BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END );
283 BABLM( BABL_FIND , D(LCTL), T(S), U(LCTL),END );
284 BABLM( BABL_FIND_NEXT , D(LCTL), T(S), U(LCTL),END );
285 BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
286 BABLM( BABL_RUNAPP , D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably
287 BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably
288 BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably
289 BABLM( BABL_CLOSE_APP , D(LCTL), T(X), U(LCTL),T(C),END );
290 BABLM( BABL_HELP , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help
291#ifndef BABL_NOBROWSER
292/* you get to figure w3 out
293 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
294 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
295 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
296 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
297 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
298 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
299 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
300 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
301 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
302 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
303 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
304 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
305 // Chrome
306 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
307 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
308 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ +
309 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
310*/
311#endif
312#endif
313 break;
314
315 return MACRO_NONE;
316 }
317
318#endif
319
320
321#ifdef VI_MODE
322 case VI_MODE:
323// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell)
324
325
326 BABLM( BABL_GO_LEFT_1C , T(H), END );
327 BABLM( BABL_GO_RIGHT_1C , T(L), END );
328 BABLM( BABL_GO_LEFT_WORD , T(B),END );
329 BABLM( BABL_GO_RIGHT_WORD , T(W), END );
330 BABLM( BABL_GO_START_LINE , D(LSFT), T(6),U(LSFT), END ); //^
331 BABLM( BABL_GO_END_LINE , D(LSFT), T(4),U(LSFT) , END ); //$
332 BABLM( BABL_GO_START_DOC , T(G),T(G) ,END );
333 BABLM( BABL_GO_END_DOC , D(LSFT), T(G),U(LSFT),END );
334 BABLM( BABL_GO_NEXT_LINE , T(J), END );
335 BABLM( BABL_GO_PREV_LINE, T(K), END );
336 BABLM( BABL_PGDN ,D(LCTL), T(F), U(LCTL), END );
337 BABLM( BABL_PGUP , D(LCTL), T(B), U(LCTL), END );
338 BABLM( BABL_DEL_RIGHT_1C , T(X),END );
339 BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END );
340 BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END );
341 BABLM( BABL_DEL_TO_LINE_END, T(D),D(LSFT), T(4),U(LSFT) ,END ); // d$
342 BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END );
343#ifndef BABL_MOVEMENTONLY
344 BABLM( BABL_UNDO , T(U), END );
345 BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END );
346 BABLM( BABL_CUT , T(X), END );
347 BABLM( BABL_COPY , T(Y),END );
348 BABLM( BABL_PASTE , T(P), END );
349 BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful?
350 BABLM( BABL_FIND , T(SLASH),END );
351 BABLM( BABL_FIND_NEXT , T(N),END );
352 BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
353 BABLM( BABL_RUNAPP,END );
354 BABLM( BABL_SWITCH_APP_NEXT ,END );
355 BABLM( BABL_SWITCH_APP_LAST ,END );
356 BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END );
357 BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help
358#ifndef BABL_NOBROWSER
359/* you get to figure this out
360 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
361 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
362 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
363 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
364 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
365 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
366 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
367 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
368 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
369 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
370 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
371 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
372 // Chrome
373 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
374 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
375 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END );
376 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
377*/
378#endif
379#endif
380 return MACRO_NONE;
381#endif
382
383
384
385
386#ifdef READMUX_MODE
387// Readline command line editing + tmux windowing
388// I havent decided how much to do readline and how much tmux
389
390
391 case READMUX_MODE:
392
393 BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
394 BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
395 BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END );
396 BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END );
397 BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END );
398 BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END );
399 //BABLM( BABL_GO_START_DOC ,END );// tmux?
400 //BABLM( BABL_GO_END_DOC ,END ); // tmux?
401 BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END );
402 BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
403 BABLM( BABL_PGDN , T(PGDN), END );
404 BABLM( BABL_PGUP , T(PGUP), END );
405 BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END );
406 BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END );
407 BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
408 BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
409 BABLM( BABL_DEL_TO_LINE_START, D(LCTL), T(U), U(LCTL), END );
410#ifndef BABL_MOVEMENTONLY
411 BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END );
412 BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
413 BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time
414 //BABLM( BABL_COPY ,END );
415 BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
416 BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END );
417 BABLM( BABL_FIND , D(LCTL), T(R), U(LCTL), END ); // search history
418 BABLM(BABL_FIND_NEXT, D(LCTL), T(S), U(LCTL), END );
419 //BABLM( BABL_FIND_REPLACE ,END );
420 BABLM( BABL_RUNAPP , D(LCTL), T(B), U(LCTL), T(C),END ); //tmux
421 BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(B), U(LCTL), T(N),END ); //tmux
422 BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(B), U(LCTL), T(P),END ); //tmux
423 BABLM( BABL_CLOSE_APP , D(LCTL), T(B), U(LCTL), T(D),END); // usually what I want
424 // BABLM( BABL_HELP ,END );
425#ifndef BABL_NOBROWSER
426/* Add lynx shortcuts?
427 BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
428 BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
429 BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
430 BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
431 BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
432 BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
433 BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
434 BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
435 BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
436 BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
437 //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
438 BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
439 // Chrome
440 BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
441 BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
442 BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END );
443 BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
444*/
445#endif
446#endif
447
448 return MACRO_NONE;
449
450#endif
451
452 default:
453 return MACRO_NONE;
454 }
455
456}
457
458
459#endif \ No newline at end of file
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
new file mode 100644
index 000000000..3067c854d
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
@@ -0,0 +1,238 @@
1/* A library to output the right key shortcut in any common app.
2Given a global variable babble_mode to show the environment and a
3key that calls the paste macro, do the right type of paste.
4
5Setting the bable_mode is done by another macro, or TBD interaction with the host.
6
7Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
8and jeebak & algernon's keymap
9*/
10#ifndef _babblePaste_h_included__
11#define _babblePaste_h_included__
12#include "action_layer.h"
13#include "quantum_keycodes.h"
14#include "config.h"
15
16#ifdef USE_BABLPASTE
17
18/* ***************************
19
20// Uncomment any modes you want. Whatever mode = 0 will be the default on boot
21// Expect to get errors if you comment a feature out and leave it in your keymap.
22
23#define USE_BABLPASTE
24
25//#define MS_MODE 0 // Windows.
26//#define MAC_MODE 1
27//#define LINUX_MODE 2 //aka gnome+KDE
28//#define EMACS_MODE 3
29//#define VI_MODE 4
30//#define WORDSTAR_MODE 5
31//#define READMUX 6 // Readline and tmux
32
33// This removes everything but cursor movement
34//#define BABL_MOVEMENTONLY
35// and this just removes browser shortcuts
36//#define BABL_NOBROWSER
37****************************/
38
39
40// Uncomment if you need more free flash space
41// It removes everything but cursor movement
42//#define BABL_MOVEMENTONLY
43
44
45// Define starting number for BABL macros in the macro range.
46// Probably can start the default even lower
47#define BABL_START_NUM 50
48
49/* Macros handled by babblepaste. Most should be available for all platforms.
50Whatever isn't defined will NOP */
51enum {
52// Movement macros
53 // left & right
54 BABL_GO_LEFT_1C= BABL_START_NUM,
55 BABL_GO_RIGHT_1C,
56 BABL_GO_LEFT_WORD,
57 BABL_GO_RIGHT_WORD,
58 BABL_GO_START_LINE,
59 BABL_GO_END_LINE,
60 // now up & down
61 BABL_GO_START_DOC,
62 BABL_GO_END_DOC,
63 BABL_GO_NEXT_LINE,
64 BABL_GO_PREV_LINE,
65 BABL_PGDN,
66 BABL_PGUP,
67 // And the delete options
68 //BABL_DEL_LEFT_1C == backspace, so why bother.
69 BABL_DEL_RIGHT_1C, // usually = Del
70 BABL_DEL_LEFT_WORD,
71 BABL_DEL_RIGHT_WORD,
72 BABL_DEL_TO_LINE_END, // delete from cursor to end of line
73 BABL_DEL_TO_LINE_START, // delete from cursor to begining line
74#ifndef BABL_MOVEMENTONLY
75 // Cut & Paste
76 BABL_UNDO,
77 BABL_REDO,
78 BABL_CUT,
79 BABL_COPY,
80 BABL_PASTE,
81 BABL_SELECT_ALL,
82 /* not yet implemented
83 BABL_SWAP_LAST2C // swap last characters before the cursor
84 BABL_SWAP_LAST2W // Swap the last two words before the cursor
85 */
86 // find & replace
87 BABL_FIND,
88 BABL_FIND_NEXT,
89 BABL_FIND_REPLACE,
90 // GUI or app
91 BABL_RUNAPP,
92 BABL_SWITCH_APP_NEXT,
93 BABL_SWITCH_APP_LAST, // previous
94 BABL_CLOSE_APP,
95 BABL_HELP,
96
97#ifndef BABL_NOBROWSER
98 BABL_BROWSER_NEW_TAB,
99 BABL_BROWSER_CLOSE_TAB,
100 BABL_BROWSER_REOPEN_LAST_TAB,
101 BABL_BROWSER_NEXT_TAB,
102 BABL_BROWSER_PREV_TAB,
103 BABL_BROWSER_URL_BAR,
104 BABL_BROWSER_FORWARD,
105 BABL_BROWSER_BACK,
106 BABL_BROWSER_FIND,
107 BABL_BROWSER_BOOKMARK,
108 BABL_BROWSER_DEV_TOOLS, // hard one to remember
109 BABL_BROWSER_RELOAD,
110 BABL_BROWSER_FULLSCREEN,
111 BABL_BROWSER_ZOOM_IN,
112 BABL_BROWSER_ZOOM_OUT,
113
114#endif
115
116#endif
117// Macros for mode switching
118#ifdef MS_MODE
119 BABL_WINDOWS,
120#endif
121#ifdef MAC_MODE
122 BABL_MAC,
123#endif
124#ifdef LINUX_MODE
125 BABL_LINUX,
126#endif
127#ifdef EMACS_MODE
128 BABL_EMACS,
129#endif
130#ifdef VI_MODE
131 BABL_VI,
132#endif
133#ifdef READMUX_MODE
134 BABL_READLINE,
135#endif
136
137
138};
139
140// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
141#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
142
143/* And all the shorthand keymap ready versions */
144// First the mode switching macros
145#ifdef MS_MODE
146#define B_WIN M(BABL_WINDOWS)
147#endif
148#ifdef MAC_MODE
149#define B_MAC M(BABL_MAC)
150#endif
151#ifdef LINUX_MODE
152#define B_LNX M(BABL_LINUX)
153#endif
154#ifdef EMACS_MODE
155#define B_EMAX M(BABL_EMACS)
156#endif
157#ifdef VI_MODE
158#define B_VI M(BABL_VI)
159#endif
160#ifdef READMUX_MODE
161#define B_READ M(BABL_READLINE)
162#endif
163
164// and all the movement & action.
165
166#define B_L1C M(BABL_GO_LEFT_1C)
167#define B_R1C M(BABL_GO_RIGHT_1C)
168#define B_L1W M(BABL_GO_LEFT_WORD)
169#define B_R1W M(BABL_GO_RIGHT_WORD)
170#define B_GSOL M(BABL_GO_START_LINE)
171#define B_GEOL M(BABL_GO_END_LINE)
172#define B_GTOP M(BABL_GO_START_DOC)
173#define B_GEND M(BABL_GO_END_DOC)
174#define B_DOWN M(BABL_GO_NEXT_LINE)
175#define B_UP M(BABL_GO_PREV_LINE)
176#define B_PGDN M(BABL_PGDN)
177#define B_PGUP M(BABL_PGUP)
178//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
179#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del
180#define B_DLW M(BABL_DEL_LEFT_WORD)
181#define B_DRW M(BABL_DEL_RIGHT_WORD)
182#define B_DEOL M(BABL_DEL_TO_LINE_END) // delete from cursor to end of line
183#define B_DSOL M(BABL_DEL_TO_LINE_START) // delete from cursor to begining line
184#define B_UNDO M(BABL_UNDO)
185#define B_REDO M(BABL_REDO)
186#define B_CUT M(BABL_CUT)
187#define B_COPY M(BABL_COPY)
188#define B_PAST M(BABL_PASTE)
189#define B_SELA M(BABL_SELECT_ALL)
190#define B_FIND M(BABL_FIND)
191#define B_FINDN M(BABL_FIND_NEXT)
192#define B_FINDR M(BABL_FIND_REPLACE)
193#define B_RAPP M(BABL_RUNAPP)
194#define B_NAPP M(BABL_SWITCH_APP_NEXT)
195#define B_PAPP M(BABL_SWITCH_APP_LAST) // previous
196#define B_CAPP M(BABL_CLOSE_APP)
197#define B_HELP M(BABL_HELP)
198#define B_NTAB M(BABL_BROWSER_NEW_TAB)
199#define B_CTAB M(BABL_BROWSER_CLOSE_TAB)
200#define B_ROTB M(BABL_BROWSER_REOPEN_LAST_TAB)
201#define B_NXTB M(BABL_BROWSER_NEXT_TAB)
202#define B_PTAB M(BABL_BROWSER_PREV_TAB)
203#define B_NURL M(BABL_BROWSER_URL_BAR)
204#define B_BFWD M(BABL_BROWSER_FORWARD)
205#define B_BBAK M(BABL_BROWSER_BACK)
206#define B_BFND M(BABL_BROWSER_FIND)
207#define B_BOOK M(BABL_BROWSER_BOOKMARK)
208#define B_BDEV M(BABL_BROWSER_DEV_TOOLS) // hard one to remember
209#define B_BRLD M(BABL_BROWSER_RELOAD)
210#define B_BFUlL M(BABL_BROWSER_FULLSCREEN)
211#define B_ZMIN M(BABL_BROWSER_ZOOM_IN)
212#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT)
213
214
215
216
217
218
219
220/* from action_macro.h
221typedef uint8_t macro_t;
222
223#define MACRO_NONE (macro_t*)0
224#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; })
225#define MACRO_GET(p) pgm_read_byte(p)
226
227#define BABL_MSTART (entry, os, macro...) ( const macro_t bablDict[entry][os] PROGMEM = { macro... }; )
228
229*/
230
231const macro_t *babblePaste(keyrecord_t *record, uint8_t shortcut);
232
233macro_t* switch_babble_mode( uint8_t id);
234
235
236#endif
237#endif
238
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt
new file mode 100644
index 000000000..cf75e153e
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt
@@ -0,0 +1,123 @@
1 BabblePaste is a library of common macros used to make sure that
2you can have one "paste" button on one layer, and it will do the
3right thing on any OS or app. Windows=Ctrl-V. Mac = Command-V and so on.
4
5The babblepaste library looks for the current status in a babble_mode global variable.
6To switch modes, run the switch_babble_mode() function, or a pre defined macro.
7Currently supported are Windows, OS X, Gnome/kde, Emacs, VI and readline,
8across 42+ common macro actions.
9
10
11###To use the library
121) Paste the following into your config.h.
13
14//////Begin//////
15#define USE_BABLPASTE 1
16
17#ifdef USE_BABLPASTE
18/* define BabblePaste maps. Whatever = 0 will be the default. */
19// MAC_MODE 0
20// MS_MODE 1
21// LINUX_MODE 2
22// EMACS_MODE 3
23// VI_MODE 3
24// Readline and tmux
25// READMUX_MODE 2
26// WORDSTAR_MODE 5
27#endif
28
29// Uncomment these to remove options an free up flash space
30
31// This removes everything but cursor movement
32// BABL_MOVEMENTONLY
33// and this just removes browser shortcuts
34// BABL_NOBROWSER
35///////End///////
36
372) Add the following to your keymap in the action_get_macro
38
39//////Begin//////
40#ifdef USE_BABLPASTE
41
42 if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) {
43 if (record->event.pressed) { // is there a case where this isn't desired?
44
45 babblePaste ( record, id );
46 return MACRO_NONE;
47 }
48 }
49#endif
50///////End///////
51
523) add Babbelpaste actions to your keymap. See the full list in babblePaste.h, or the
53list below
54B_L1C // go left 1 char
55B_R1C // go Right 1 char
56 B_L1W //GO_LEFT_1 WORD
57 B_R1W //BABL_GO_RIGHT_1 WORD
58 B_GSOL // BABL_GOTO_START of _LINE
59 B_GEOL // BABL_GOTO_END_LINE
60 B_GTOP //BABL_GOTO_START_DOC
61 B_GEND //BABL_GO_END_DOC
62 B_DOWN //BABL_GO_NEXT_LINE
63 B_UP // BABL_GO_PREV_LINE
64 B_PGDN //PGDN
65 B_PGUP //PGUP
66// B_BKSP //backspace so why bother.
67 B_DEL // DEL_RIGHT_1 Char // usually = Del
68 B_DLW // DEL_LEFT_ 1 WORD)
69 B_DRW //DEL_RIGHT_1 WORD
70 B_DEOL // delete from cursor to end of line
71 B_DSOL // delete from cursor to begining line
72 B_UNDO //UNDO
73 B_REDO // REDO
74 B_CUT // CUT)
75 B_COPY // COPY)
76 B_PAST // PASTE)
77 B_SELA // SELECT_ALL
78 B_FIND // FIND)
79 B_FINDN //FIND_NEXT)
80 B_FINDR // FIND_REPLACE)
81 B_RAPP // open application launcher
82 B_NAPP // switch to next app
83 B_PAPP // switch to previous app
84 B_CAPP // CLOSE_APP)
85 B_HELP // HELP)
86 B_NTAB // BROWSER_NEW_TAB)
87 B_CTAB //BROWSER_CLOSE_TAB)
88 B_ROTB //BROWSER_REOPEN_LAST_TAB)
89 B_NXTB //BROWSER_NEXT_TAB)
90 B_PTAB //BROWSER_PREV_TAB)
91 B_NURL //BROWSER_jump to URL_BAR)
92 B_BFWD // BROWSER_FORWARD (in history)
93 B_BBAK //BROWSER_BACK (in history)
94 B_BFND // BROWSER_FIND)
95 B_BOOK //BROWSER_New BOOKMARK)
96 B_BDEV //BROWSER_ Open DEV_TOOLS) // hard one to remember
97 B_BRLD // BROWSER_RELOAD Page
98 B_BFUlL // BROWSER_FULLSCREEN)
99 B_ZMIN // BROWSER_ZOOM_IN)
100 B_ZMOT //BROWSER_ZOOM_OUT)
101
102
103#### Development notes
104-Why a new function? Because it would make the keymap too ugly to put it there.
105-Why not return the macro to action_get_macro? Because I kept running into scope problems
106and pointers to the wrong type.
107-Why not an array of arrays as a lookup instead of a function? That would allow you
108to store the lookup table in PROGMEM. True, but that takes more pre-processor skill
109than I had.
110
111-Have you tested this on every platform? No. Submit a patch.
112
113
114### Next steps for someone.
115Make it easier to pair macros with modifiers. So key foo will jump to start of line, and
116Shift(foo) will jump to the first tab in a browser.
117
118## Thanks
119
120Thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
121and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
122And of course QMK...
123
diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS-sculpt-mobile/config.h
new file mode 100644
index 000000000..f89514278
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/config.h
@@ -0,0 +1,100 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Microsoftplus
28#define DESCRIPTION 6000
29
30/* key matrix size */
31#define MATRIX_ROWS 8
32#define MATRIX_COLS 18
33
34#ifdef ASTAR
35#define PRODUCT sculpt mobile astar
36 /*0 1 2 3 4 5 6 7 8 */
37#define MATRIX_ROW_PINS {D7, C6, D4, D0, D1, D3, D2, E2}
38/* A B C D E F G H I J K L M N O P Q R */
39#define MATRIX_COL_PINS {B4, B5, E6, B7, B6, D6, C7, F7, F6, F4,F5, F1,F0, D5, B0, B1, B2, B3}
40
41#else
42#define PRODUCT sculpt mobile teensypp
43/* 0 1 2 3 4 5 6 7 */
44#define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0}
45/* A B C D E F G H I J K L M N O P Q R */
46#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C7}
47#define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 }
48
49
50#endif
51
52/* COL2ROW or ROW2COL */
53#define DIODE_DIRECTION ROW2COL
54
55/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
56#define DEBOUNCING_DELAY 5
57
58/* define if matrix has ghost (lacks anti-ghosting diodes) */
59//#define MATRIX_HAS_GHOST
60
61
62/*
63 * Magic Key Options
64 *
65 * Magic keys are hotkey commands that allow control over firmware functions of
66 * the keyboard. They are best used in combination with the HID Listen program,
67 * found here: https://www.pjrc.com/teensy/hid_listen.html
68 *
69 * The options below allow the magic key functionality to be changed. This is
70 * useful if your keyboard/keypad is missing keys and you want magic key support.
71 *
72 */
73
74/* key combination for magic key command */
75#define IS_COMMAND() ( \
76 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
77)
78
79
80/*
81 * Feature disable options
82 * These options are also useful to firmware size reduction.
83 */
84
85/* disable debug print */
86//#define NO_DEBUG
87
88/* disable print */
89//#define NO_PRINT
90
91/* disable action features */
92//#define NO_ACTION_LAYER
93//#define NO_ACTION_TAPPING
94//#define NO_ACTION_ONESHOT
95//#define NO_ACTION_MACRO
96//#define NO_ACTION_FUNCTION
97
98#define PREVENT_STUCK_MODIFIERS
99
100#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile
new file mode 100644
index 000000000..8b829218b
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../../Makefile
21endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h
new file mode 100644
index 000000000..8893d122e
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c
new file mode 100644
index 000000000..ab09dcdd1
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c
@@ -0,0 +1,64 @@
1#include "MS-sculpt-mobile.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4/*
5*
6* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute|
7* -------------------------------------------------------------------------------'
8* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del |
9* --------------------------------------------------------------------------
10* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
11* -------------------------------------------------------------------------------'
12* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
13* --------------------------------------------------------------------------------
14* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
15* ---------------------------------------------------------------------------------
16* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght|
17* ---------------------------------------------------------------------------------
18*/
19
20[0] = KEYMAP( \
21 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, KC_MUTE,\
22 KC_GRAVE, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
23 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\
24 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
25 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,\
26 KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
27)
28
29};
30const uint16_t PROGMEM fn_actions[] = {
31
32};
33
34const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
35{
36 // MACRODOWN only works in this function
37 switch(id) {
38 case 0:
39 if (record->event.pressed) {
40 register_code(KC_RSFT);
41 } else {
42 unregister_code(KC_RSFT);
43 }
44 break;
45 }
46 return MACRO_NONE;
47};
48
49
50void matrix_init_user(void) {
51
52}
53
54void matrix_scan_user(void) {
55
56}
57
58bool process_record_user(uint16_t keycode, keyrecord_t *record) {
59 return true;
60}
61
62void led_set_user(uint8_t usb_led) {
63
64}
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md
new file mode 100644
index 000000000..e67ddc6fe
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for microsoft-sculpt-mobile
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile
new file mode 100644
index 000000000..1209ad781
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../../Makefile
21endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h
new file mode 100644
index 000000000..8cf4202cd
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h
@@ -0,0 +1,32 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6#define USE_BABLPASTE
7
8// Expect to get errors if you comment a feature out and leave it in your keymap.
9
10#ifdef USE_BABLPASTE
11//define BabblePaste maps
12// Windows.
13#define MAC_MODE 0
14#define MS_MODE 1
15//aka gnome+KDE
16//#define LINUX_MODE 2
17//#define EMACS_MODE 3
18#define VI_MODE 3
19// Readline and tmux
20#define READMUX_MODE 2
21//#define WORDSTAR_MODE 5
22#endif
23
24// Uncomment if you need more free flash space
25
26// This removes everything but cursor movement
27//#define BABL_MOVEMENTONLY
28// and this just removes browser shortcuts
29//#define BABL_NOBROWSER
30
31// place overrides here
32#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c
new file mode 100644
index 000000000..395a9fb47
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c
@@ -0,0 +1,272 @@
1#include "MS-sculpt-mobile.h"
2#include "action_layer.h"
3#include "action_util.h"
4#include "babblePaste.h"
5
6#ifdef AUDIO_ENABLE
7 #include "audio.h"
8#endif
9
10#define _QWR 0
11#define _CDH 2
12#define _SYM 3
13#define _MOV 4
14#define _TRAN 5
15
16
17enum layer_keycodes {
18QWR,
19CDH,
20SYM,
21MOV,
22NUM,
23TRAN
24};
25
26
27// Shorter spacing
28#define XXXX KC_NO
29#define ____ KC_TRNS
30
31// Custom macros
32
33/* Fn Keys */
34#define TT_SYM MO(_SYM)
35#define TT_MOV KC_FN2
36#define TT_NUM MO(_NUM)
37#define SSFT ACTION_MODS_ONESHOT(MOD_LSFT)
38
39enum macro_keycodes {
40DHPASTE=1,
41VIBRK,
42};
43
44
45const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
46/* QWERTY
47*
48* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH|
49* -------------------------------------------------------------------------------'
50* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del|
51* ---------------------------------------------------------------------------
52* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
53* -------------------------------------------------------------------------------'
54* |Bak/Mov| a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
55* --------------------------------------------------------------------------------
56* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
57* ---------------------------------------------------------------------------------
58* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
59* ---------------------------------------------------------------------------------
60*/
61
62[_QWR] = KEYMAP( \
63 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, CDH,\
64 KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
65 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\
66 TT_MOV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
67 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\
68 KC_LCTL, KC_LGUI, KC_LALT, KC_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
69),
70
71[_CDH] = KEYMAP (\
72 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \
73 KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
74 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\
75 TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_2,\
76 KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, KC_1,\
77 ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____
78
79),
80
81
82/* SYM
83*
84* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH|
85* -------------------------------------------------------------------------------'
86* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace|Del |
87* --------------------------------------------------------------------------
88* | ESC: | ^ | { | } | @ | % | | [ | ( | ) | _ | [ | ] | \ | |
89* -------------------------------------------------------------------------------'
90* |Bak/Mov| ! | # | 0 | = | { | } | - | 1 | + | ] | ` | enter |PgUp|
91* --------------------------------------------------------------------------------
92* |Lsft | ; | ~ | : | ~ | "|"| $ | * | | . | / | Rsft| Up| PgDn|
93* ---------------------------------------------------------------------------------
94* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
95* ---------------------------------------------------------------------------------
96*/
97
98[_SYM] = KEYMAP (\
99 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
100 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
101 M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\
102 ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_LCBR, KC_RCBR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\
103 ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\
104 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
105),
106/*
107* |ESC | MAC| Win|RdLn| VI | | | | | | | | | | | |
108* -------------------------------------------------------------------------------'
109* | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del|
110* ---------------------------------------------------------------------------
111* | tab | | |Find| |pTab |DSOL|DelW| Up |DelW|DEOL| [ | ] | \ | |
112* -------------------------------------------------------------------------------'
113* |Bak/Mov| | | | |nTab |GSOL| <- | Dwn | -> | EOL | ' | enter |PgUp|
114* --------------------------------------------------------------------------------
115* |Lsft |Undo| Cut|Copy|Pste| | | | | | / | Rsft| Up| PgDn|
116* ---------------------------------------------------------------------------------
117* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
118* ---------------------------------------------------------------------------------
119*/
120
121[_MOV] = KEYMAP (\
122 ____, B_MAC,B_WIN,B_READ, B_VI, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
123 ____, ____, B_PAPP, B_NAPP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
124 ____, B_UNDO, ____, B_BFND, ____, B_PTAB, B_DSOL, B_DLW, B_UP, B_DRW, B_DEOL, ____, ____, ____, \
125 ____, B_SELA, B_BRLD, ____, ____, B_NXTB, B_GSOL, B_L1C, B_DOWN, B_R1C,B_GEOL, ____, ____, ____,\
126 ____, B_UNDO,B_CUT, B_COPY, B_PAST, B_PAST, ____, ____, ____, ____, ____, ____, ____, ____, \
127 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
128),
129
130[_TRAN] = KEYMAP (\
131 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
132 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
133 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
134 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
135 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
136 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
137)
138};
139
140const uint16_t PROGMEM fn_actions[] = {
141[1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE),
142[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC)
143};
144
145#ifdef AUDIO_ENABLE
146
147float tone_startup[][2] = SONG(STARTUP_SOUND);
148float tone_qwerty[][2] = SONG(QWERTY_SOUND);
149float tone_colemak[][2] = SONG(COLEMAK_SOUND);
150#endif
151
152
153bool process_record_user(uint16_t keycode, keyrecord_t *record) {
154 switch (keycode) {
155 case QWR:
156 if (record->event.pressed) {
157 #ifdef AUDIO_ENABLE
158 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
159 #endif
160 layer_off(_CDH);
161 }
162 return false;
163 break;
164
165 case CDH:
166 if (record->event.pressed) {
167 #ifdef AUDIO_ENABLE
168 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
169 #endif
170 layer_on(_CDH);
171 }
172 return false;
173 break;
174
175 case SYM:
176 if (record->event.pressed) {
177 layer_on(_SYM);
178 } else {
179 layer_off(_SYM);
180 }
181 return false;
182 break;
183
184 }
185 return true;
186
187}
188
189const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
190{
191
192/* If id is in the range of BABL macros, call the babl function */
193/* Any clever remapping with modifiers should happen here e.g. shift bablkey does opposite*/
194#ifdef USE_BABLPASTE
195
196 if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) {
197 if (record->event.pressed) { // is there a case where this isn't desired?
198
199 babblePaste ( record, id );
200 return MACRO_NONE;
201 }
202 }
203#endif
204
205
206 // MACRODOWN only works in this function
207 switch(id) {
208 case 0:
209 if (record->event.pressed) {
210 register_code(KC_RSFT);
211 } else {
212 unregister_code(KC_RSFT);
213 }
214 break;
215
216 /* Colemak mod-dh moves the D key to the qwerty V position
217 This hack makes apple-V_position do what I mean */
218 case DHPASTE:
219 if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) {
220 if (record->event.pressed) {
221 clear_keyboard_but_mods();
222 register_code(KC_V);
223 } else {
224 unregister_code(KC_V);
225 }
226 } else {
227 if (record->event.pressed) {
228 register_code(KC_D);
229 } else {
230 unregister_code(KC_D);
231 }
232 }
233 break;
234
235 case VIBRK: // vi esc:
236 if (record->event.pressed) {
237 return MACRO( T(ESC),D(LSFT),T(SCLN),U(LSFT), END );
238 }
239 break;
240
241
242
243
244 default:
245 return MACRO_NONE;
246 }
247
248
249return MACRO_NONE;
250};
251
252
253
254
255
256void matrix_init_user(void) {
257}
258
259void matrix_scan_user(void) {
260
261}
262
263
264void led_set_user(uint8_t usb_led) {
265
266}
267
268
269
270
271
272
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md
new file mode 100644
index 000000000..96ee0e77a
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md
@@ -0,0 +1 @@
# A more programmer oriented keymap for microsoft-sculpt-mobile
diff --git a/keyboards/handwired/MS-sculpt-mobile/readme.md b/keyboards/handwired/MS-sculpt-mobile/readme.md
new file mode 100644
index 000000000..d435b449f
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/readme.md
@@ -0,0 +1,58 @@
1
2This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it
3into a hard-wired keyboard running QMK.
4
5The keyboard is known under several different names:
6Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded
7
8I had a stack of them,since they're cheap on ebay, travel well, and are just ergo enough.
9
10The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of
11"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118
12
13Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder.
14They're also allow the cable to be inserted on top or bottom.
15
16If I was going to do it again, I'd make the MCU connection come out the top of the keyboard
17and avoid the wires dangling out the bottom.
18
19As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU,
20but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a
21half millimeter off the end of the ribbon cable & the errors go away.
22
23My method for discovering the matrix was to set up a KEYMAP macro that included all pins.
24See MATRIX_TESTING_KEYMAP if you need it. Then set up a keymap that has all printable symbols
25in the first 4 rows. test each key & record output. Then switch the printable symbols to the
26bottom 4 rows & repeat. This was enough to show the matrix.
27
28
29The full original keymap for the sculpt is
30 A B C D E F G H --->
310 b n m , . /
321 g h "
332 7 8 9 0 Del PgUp
343 p [ ] \
354 y u i o
365 ~ - += j k l ; 5
376 a s d q w e, Up left
387 F7 F8 F9 F10 F11 F12 f
39
40-----> I J K L M N O P Q R
410 Caps FN
421 Vol+ mute Rctl vol- pgdn LCTL
432 Rshift LShift
443 Ralt LAlt
454 LGUI
465 6 bakspc 1 2 3 4 F4 F5 F6
476 Down right spc F1 F2 F3 tab
487 r t z x c v enter Esc
49
50This works with 18 cols + 8 rows on a Teensy++, or Arm based Teensy.
51
52The Astar mini has all pins exposed , so you can do 18x8
53If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns
54R and L to the same pin.
55
56Building - add ASTAR=1 to the compile line or leave out for teensy2++
57
58
diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS-sculpt-mobile/rules.mk
new file mode 100644
index 000000000..680389c84
--- /dev/null
+++ b/keyboards/handwired/MS-sculpt-mobile/rules.mk
@@ -0,0 +1,48 @@
1
2## Project specific files
3SRC= babblePaste.c
4
5
6ifdef ASTAR
7 CFLAGS=-D ASTAR
8 OPT_DEFS += -DBOOTLOADER_SIZE=4096
9 MCU = atmega32u4
10 OPT_DEFS += -DCATERINA_BOOTLOADER
11 SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \
12 avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
13
14else
15 MCU = at90usb1286
16 OPT_DEFS += -DBOOTLOADER_SIZE=2048
17 SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
18endif
19
20F_CPU = 16000000
21ARCH = AVR8
22F_USB = $(F_CPU)
23# Interrupt driven control endpoint task(+60)
24OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
25
26#
27BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
28MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
29EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
30CONSOLE_ENABLE ?= yes # Console for debug(+400)
31COMMAND_ENABLE ?= yes # Commands for debug and configuration
32# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
33SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
34# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
35NKRO_ENABLE ?= no # USB Nkey Rollover
36BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
37MIDI_ENABLE ?= no # MIDI controls
38UNICODE_ENABLE ?= no # Unicode
39BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
40AUDIO_ENABLE ?= no # Audio output on port C6
41
42
43USB ?= /dev/cu.usbmodem14141
44
45
46
47upload: build
48 $(SCULPT_UPLOAD_COMMAND)
diff --git a/keyboards/handwired/numpad20/Makefile b/keyboards/handwired/numpad20/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/numpad20/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h
new file mode 100644
index 000000000..847f2111f
--- /dev/null
+++ b/keyboards/handwired/numpad20/config.h
@@ -0,0 +1,162 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xBB80
25#define PRODUCT_ID 0x0504
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Hexwire
28#define PRODUCT Numpad 20
29#define DESCRIPTION Handwired 4x5 numpad
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 4
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { F6, B1, B3, B6, B5 }
46#define MATRIX_COL_PINS { D1, D0, F5, F4 }
47#define UNUSED_PINS
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#endif
diff --git a/keyboards/handwired/numpad20/keymaps/default/keymap.c b/keyboards/handwired/numpad20/keymaps/default/keymap.c
new file mode 100644
index 000000000..37031206a
--- /dev/null
+++ b/keyboards/handwired/numpad20/keymaps/default/keymap.c
@@ -0,0 +1,16 @@
1#include "numpad20.h"
2
3#define KC_ KC_TRNS
4
5const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6 [0] = COMPACT_KEYMAP(
7 LEFT,RGHT, UP ,DOWN, \
8 P7 , P8 , P9 ,PLUS, \
9 P4 , P5 , P6 ,MINS, \
10 P1 , P2 , P3 , ENT, \
11 P0 ,DOT ,RGHT, TAB \
12 )
13};
14
15const uint16_t PROGMEM fn_actions[] = {
16};
diff --git a/keyboards/handwired/numpad20/numpad20.c b/keyboards/handwired/numpad20/numpad20.c
new file mode 100644
index 000000000..101cf2cb4
--- /dev/null
+++ b/keyboards/handwired/numpad20/numpad20.c
@@ -0,0 +1,8 @@
1#include "numpad20.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
diff --git a/keyboards/handwired/numpad20/numpad20.h b/keyboards/handwired/numpad20/numpad20.h
new file mode 100644
index 000000000..191979be0
--- /dev/null
+++ b/keyboards/handwired/numpad20/numpad20.h
@@ -0,0 +1,20 @@
1#ifndef NUMPAD20_H
2#define NUMPAD20_H
3
4#include "quantum.h"
5
6#define COMPACT_KEYMAP( \
7 K00, K01, K02, K03, \
8 K10, K11, K12, K13, \
9 K20, K21, K22, K23, \
10 K30, K31, K32, K33, \
11 K40, K41, K42, K43 \
12 ) { \
13 { KC_##K00, KC_##K01, KC_##K02, KC_##K03 }, \
14 { KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \
15 { KC_##K20, KC_##K21, KC_##K22, KC_##K23 }, \
16 { KC_##K30, KC_##K31, KC_##K32, KC_##K33 }, \
17 { KC_##K40, KC_##K41, KC_##K42, KC_##K43 } \
18}
19
20#endif \ No newline at end of file
diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk
new file mode 100644
index 000000000..e897ef252
--- /dev/null
+++ b/keyboards/handwired/numpad20/rules.mk
@@ -0,0 +1,83 @@
1
2# MCU name
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=512
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68
69ifndef QUANTUM_DIR
70 include ../../../Makefile
71endif
72
73avrdude: build
74 ls /dev/tty* > /tmp/1; \
75 echo "Reset your Pro Micro now"; \
76 while [[ -z $$USB ]]; do \
77 sleep 1; \
78 ls /dev/tty* > /tmp/2; \
79 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
80 done; \
81 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
82
83.PHONY: avrdude
diff --git a/keyboards/handwired/ortho5x13/Makefile b/keyboards/handwired/ortho5x13/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h
new file mode 100644
index 000000000..f85159596
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/config.h
@@ -0,0 +1,162 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xBB80
25#define PRODUCT_ID 0x050D
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Hexwire
28#define PRODUCT Ortho 5x13
29#define DESCRIPTION Handwired 5x13 ortholinear keyboard
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 13
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 }
46#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
47#define UNUSED_PINS
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#endif
diff --git a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
new file mode 100644
index 000000000..c1262a83d
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
@@ -0,0 +1,289 @@
1#include "ortho5x13.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef AUDIO_ENABLE
5 #include "audio.h"
6#endif
7
8// Each layer gets a name for readability, which is then used in the keymap matrix below.
9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers.
12#define _QWERTY 0
13#define _COLEMAK 1
14#define _DVORAK 2
15#define _LOWER 3
16#define _RAISE 4
17#define _ADJUST 16
18
19enum custom_keycodes {
20 QWERTY = SAFE_RANGE,
21 COLEMAK,
22 DVORAK,
23 LOWER,
24 RAISE,
25 BACKLIT
26};
27
28// Fillers to make layering more clear
29#define _______ KC_TRNS
30#define XXXXXXX KC_NO
31
32#define KC_L1 LOWER
33#define KC_L2 RAISE
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37/* Qwerty
38 * ,------------------------------------------------------------------------------------------.
39 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
40 * |------+------+------+------+------+------+------+------+------+------+------+------+------|
41 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |
42 * |------+------+------+------+------+-------------+------+------+------+------+------+------|
43 * | ` | A | S | D | F | G | H | J | K | L | ; | ' | \ |
44 * |------+------+------+------+------+------|------+------+------+------+------+------+------|
45 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | Up |
46 * |------+------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Bksp |Shift | Left | Down |Right |
48 * `------------------------------------------------------------------------------------------'
49 */
50[_QWERTY] = COMPACT_KEYMAP(
51 //,----+----+----+----+----+----+----+----+----+----+----+----+----.
52 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,
53 //|----+----+----+----+----+----+----+----+----+----+----+----+----|
54 TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC,
55 //|----+----+----+----+----+----+----+----+----+----+----+----+----|
56 GRV , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,BSLS,
57 //|----+----+----+----+----+----+----+----+----+----+----+----+----|
58 LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENT , UP ,
59 //|----+----+----+----+----+---------+----+----+----+----+----+----|
60 HYPR,LCTL,LALT,LGUI, L1 , SPACE , L2 ,BSPC,RSFT,LEFT,RGHT,DOWN
61 //`----+----+----+----+----+---------+----+----+----+----+----+----'
62 ),
63
64/* Colemak
65 * ,-----------------------------------------------------------------------------------.
66 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
69 * |------+------+------+------+------+-------------+------+------+------+------+------|
70 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
71 * |------+------+------+------+------+------|------+------+------+------+------+------|
72 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
73 * |------+------+------+------+------+------+------+------+------+------+------+------|
74 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
75 * `-----------------------------------------------------------------------------------'
76 */
77[_COLEMAK] = {
78 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
79 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL},
80 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
81 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
82 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
83},
84
85/* Dvorak
86 * ,-----------------------------------------------------------------------------------.
87 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
88 * |------+------+------+------+------+------+------+------+------+------+------+------|
89 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_DVORAK] = {
99 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
100 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL},
101 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
102 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
103 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
104},
105
106/* Lower
107 * ,-----------------------------------------------------------------------------------.
108 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
109 * |------+------+------+------+------+-------------+------+------+------+------+------|
110 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
111 * |------+------+------+------+------+-------------+------+------+------+------+------|
112 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
113 * |------+------+------+------+------+------|------+------+------+------+------+------|
114 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
115 * |------+------+------+------+------+------+------+------+------+------+------+------|
116 * | | | | | | | | Next | Vol- | Vol+ | Play |
117 * `-----------------------------------------------------------------------------------'
118 */
119[_LOWER] = {
120 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
121 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
122 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
123 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
124 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
125},
126
127/* Raise
128 * ,-----------------------------------------------------------------------------------.
129 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
132 * |------+------+------+------+------+-------------+------+------+------+------+------|
133 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
134 * |------+------+------+------+------+------|------+------+------+------+------+------|
135 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
136 * |------+------+------+------+------+------+------+------+------+------+------+------|
137 * | | | | | | | | Next | Vol- | Vol+ | Play |
138 * `-----------------------------------------------------------------------------------'
139 */
140[_RAISE] = {
141 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
142 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
143 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
144 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
145 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
146},
147
148/* Adjust (Lower + Raise)
149 * ,-----------------------------------------------------------------------------------.
150 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
151 * |------+------+------+------+------+------+------+------+------+------+------+------|
152 * | | Reset| | | | | | | | | | Del |
153 * |------+------+------+------+------+-------------+------+------+------+------+------|
154 * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
155 * |------+------+------+------+------+------|------+------+------+------+------+------|
156 * | |Voice-|Voice+|Musoff|Mus on| | | | | | | |
157 * |------+------+------+------+------+------+------+------+------+------+------+------|
158 * | | | | | | | | | | | |
159 * `-----------------------------------------------------------------------------------'
160 */
161[_ADJUST] = {
162 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
163 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
164 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
165 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
166 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
167}
168
169
170};
171
172#ifdef AUDIO_ENABLE
173float tone_startup[][2] = {
174 {NOTE_B5, 20},
175 {NOTE_B6, 8},
176 {NOTE_DS6, 20},
177 {NOTE_B6, 8}
178};
179
180float tone_qwerty[][2] = SONG(QWERTY_SOUND);
181float tone_dvorak[][2] = SONG(DVORAK_SOUND);
182float tone_colemak[][2] = SONG(COLEMAK_SOUND);
183
184float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
185
186float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
187#endif
188
189void persistant_default_layer_set(uint16_t default_layer) {
190 eeconfig_update_default_layer(default_layer);
191 default_layer_set(default_layer);
192}
193
194bool process_record_user(uint16_t keycode, keyrecord_t *record) {
195 switch (keycode) {
196 case QWERTY:
197 if (record->event.pressed) {
198 #ifdef AUDIO_ENABLE
199 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
200 #endif
201 persistant_default_layer_set(1UL<<_QWERTY);
202 }
203 return false;
204 break;
205 case COLEMAK:
206 if (record->event.pressed) {
207 #ifdef AUDIO_ENABLE
208 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
209 #endif
210 persistant_default_layer_set(1UL<<_COLEMAK);
211 }
212 return false;
213 break;
214 case DVORAK:
215 if (record->event.pressed) {
216 #ifdef AUDIO_ENABLE
217 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
218 #endif
219 persistant_default_layer_set(1UL<<_DVORAK);
220 }
221 return false;
222 break;
223 case LOWER:
224 if (record->event.pressed) {
225 layer_on(_LOWER);
226 update_tri_layer(_LOWER, _RAISE, _ADJUST);
227 } else {
228 layer_off(_LOWER);
229 update_tri_layer(_LOWER, _RAISE, _ADJUST);
230 }
231 return false;
232 break;
233 case RAISE:
234 if (record->event.pressed) {
235 layer_on(_RAISE);
236 update_tri_layer(_LOWER, _RAISE, _ADJUST);
237 } else {
238 layer_off(_RAISE);
239 update_tri_layer(_LOWER, _RAISE, _ADJUST);
240 }
241 return false;
242 break;
243 case BACKLIT:
244 if (record->event.pressed) {
245 register_code(KC_RSFT);
246 #ifdef BACKLIGHT_ENABLE
247 backlight_step();
248 #endif
249 } else {
250 unregister_code(KC_RSFT);
251 }
252 return false;
253 break;
254 }
255 return true;
256};
257
258void matrix_init_user(void) {
259 #ifdef AUDIO_ENABLE
260 startup_user();
261 #endif
262}
263
264#ifdef AUDIO_ENABLE
265
266void startup_user()
267{
268 _delay_ms(20); // gets rid of tick
269 PLAY_NOTE_ARRAY(tone_startup, false, 0);
270}
271
272void shutdown_user()
273{
274 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
275 _delay_ms(150);
276 stop_all_notes();
277}
278
279void music_on_user(void)
280{
281 music_scale_user();
282}
283
284void music_scale_user(void)
285{
286 PLAY_NOTE_ARRAY(music_scale, false, 0);
287}
288
289#endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/ortho5x13.c b/keyboards/handwired/ortho5x13/ortho5x13.c
new file mode 100644
index 000000000..cf8352cc4
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/ortho5x13.c
@@ -0,0 +1,8 @@
1#include "ortho5x13.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
diff --git a/keyboards/handwired/ortho5x13/ortho5x13.h b/keyboards/handwired/ortho5x13/ortho5x13.h
new file mode 100644
index 000000000..d442212fe
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/ortho5x13.h
@@ -0,0 +1,36 @@
1#ifndef ORTHO5X13_H
2#define ORTHO5X13_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
8 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
9 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
10 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
11 k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \
12) \
13{ \
14 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \
15 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \
16 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \
17 { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b, k3c }, \
18 { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b, k4c } \
19}
20
21#define COMPACT_KEYMAP( \
22 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
23 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
24 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
25 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
26 k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \
27) \
28{ \
29 { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, KC_##k0c }, \
30 { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, KC_##k1c }, \
31 { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, KC_##k2c }, \
32 { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k35, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_##k3c }, \
33 { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_NO, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c } \
34}
35
36#endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk
new file mode 100644
index 000000000..e897ef252
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/rules.mk
@@ -0,0 +1,83 @@
1
2# MCU name
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=512
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68
69ifndef QUANTUM_DIR
70 include ../../../Makefile
71endif
72
73avrdude: build
74 ls /dev/tty* > /tmp/1; \
75 echo "Reset your Pro Micro now"; \
76 while [[ -z $$USB ]]; do \
77 sleep 1; \
78 ls /dev/tty* > /tmp/2; \
79 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
80 done; \
81 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
82
83.PHONY: avrdude
diff --git a/keyboards/lets_split/keymaps/hexwire/Makefile b/keyboards/lets_split/keymaps/hexwire/Makefile
new file mode 100644
index 000000000..1e3cebb14
--- /dev/null
+++ b/keyboards/lets_split/keymaps/hexwire/Makefile
@@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes
diff --git a/keyboards/lets_split/keymaps/hexwire/README.md b/keyboards/lets_split/keymaps/hexwire/README.md
new file mode 100644
index 000000000..edf2b6627
--- /dev/null
+++ b/keyboards/lets_split/keymaps/hexwire/README.md
@@ -0,0 +1,108 @@
1Hexwire's Let's Split Layout
2============================
3
4### Changes from default layout
5
6- Main layer
7 - The right space bar key has been changed to backspace, as I only hit space with my left thumb
8 - Backtick is at the lower right and also serves goes to the 3rd function layer when held
9 - Enter key acts as shift when held
10 - Escape key acts as control when held
11 - Minus key at upper right
12- Lower layer
13 - Numbers are on the lower layer, to make it easier to use a numpad on the right hand
14 - Arrow keys
15 - Straight and curly brackets in the middle two columns
16 - Screenshot keys for MacOS
17- Upper layer
18 - Symbols are on the upper layer
19 - Media keys
20 - Page Up/Down, Home/End
21- 3rd function layer
22 - Function keys
23
24## Layouts
25
26### Qwerty
27
28```
29,----+----+----+----+----+----. ,----+----+----+----+----+----.
30 TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
31|----+----+----+----+----+----| |----+----+----+----+----+----|
32 X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
33|----+----+----+----+----+----| |----+----+----+----+----+----|
34 LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
35|----+----+----+----+----+----| |----+----+----+----+----+----|
36 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
37`----+----+----+----+----+----' `----+----+----+----+----+----'
38```
39
40### Colemak
41
42```
43,----+----+----+----+----+----. ,----+----+----+----+----+----.
44 TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
45|----+----+----+----+----+----| |----+----+----+----+----+----|
46 X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
47|----+----+----+----+----+----| |----+----+----+----+----+----|
48 LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
49|----+----+----+----+----+----| |----+----+----+----+----+----|
50 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
51`----+----+----+----+----+----' `----+----+----+----+----+----'
52```
53
54### Dvorak
55
56```
57,----+----+----+----+----+----. ,----+----+----+----+----+----.
58 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
59|----+----+----+----+----+----| |----+----+----+----+----+----|
60 X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
61|----+----+----+----+----+----| |----+----+----+----+----+----|
62 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
63|----+----+----+----+----+----| |----+----+----+----+----+----|
64 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
65`----+----+----+----+----+----' `----+----+----+----+----+----'
66```
67
68### Lower
69
70```
71,----+----+----+----+----+----. ,----+----+----+----+----+----.
72 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
73|----+----+----+----+----+----| |----+----+----+----+----+----|
74 DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
75|----+----+----+----+----+----| |----+----+----+----+----+----|
76 ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, ,
77|----+----+----+----+----+----| |----+----+----+----+----+----|
78 , , , , , , DEL , , P0 ,PDOT, ,
79`----+----+----+----+----+----' `----+----+----+----+----+----'
80```
81
82### Raise
83
84```
85,----+----+----+----+----+----. ,----+----+----+----+----+----.
86 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
87|----+----+----+----+----+----| |----+----+----+----+----+----|
88 DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
89|----+----+----+----+----+----| |----+----+----+----+----+----|
90 MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , ,
91|----+----+----+----+----+----| |----+----+----+----+----+----|
92 , , , , , , , , , , ,
93`----+----+----+----+----+----' `----+----+----+----+----+----'
94```
95
96### 3rd function layer
97
98```
99,----+----+----+----+----+----. ,----+----+----+----+----+----.
100 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
101|----+----+----+----+----+----| |----+----+----+----+----+----|
102 , , , , , , , , , , , ,
103|----+----+----+----+----+----| |----+----+----+----+----+----|
104 , , , , , , , , , , , ,
105|----+----+----+----+----+----| |----+----+----+----+----+----|
106 , , , , , , , , , , ,
107`----+----+----+----+----+----' `----+----+----+----+----+----'
108```
diff --git a/keyboards/lets_split/keymaps/hexwire/compact_keymap.h b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h
new file mode 100644
index 000000000..d9d063fbf
--- /dev/null
+++ b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h
@@ -0,0 +1,23 @@
1#ifndef COMPACT_KEYMAP_H
2#define COMPACT_KEYMAP_H
3
4#define COMPACT_KEYMAP( \
5 k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
6 k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
7 k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
8 k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
9 ) \
10 { \
11 { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \
12 { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \
13 { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \
14 { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \
15 { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \
16 { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \
17 { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \
18 { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \
19 }
20
21#define KC_ KC_TRNS
22
23#endif \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h
new file mode 100644
index 000000000..b45214fe0
--- /dev/null
+++ b/keyboards/lets_split/keymaps/hexwire/config.h
@@ -0,0 +1,35 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18
19#define USE_SERIAL
20
21#define EE_HANDS
22
23#undef RGBLED_NUM
24#define RGBLIGHT_ANIMATIONS
25#define RGBLED_NUM 8
26#define RGBLIGHT_HUE_STEP 8
27#define RGBLIGHT_SAT_STEP 8
28#define RGBLIGHT_VAL_STEP 8
29
30#ifdef SUBPROJECT_rev1
31 #include "../../rev1/config.h"
32#endif
33#ifdef SUBPROJECT_rev2
34 #include "../../rev2/config.h"
35#endif \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c
new file mode 100644
index 000000000..796a1fcab
--- /dev/null
+++ b/keyboards/lets_split/keymaps/hexwire/keymap.c
@@ -0,0 +1,205 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#include "compact_keymap.h"
5
6extern keymap_config_t keymap_config;
7
8#define _QWERTY 0
9#define _COLEMAK 1
10#define _DVORAK 2
11#define _LOWER 3
12#define _RAISE 4
13#define _FN3 5
14#define _FN4 6
15#define _ADJUST 16
16
17enum custom_keycodes {
18 QWERTY = SAFE_RANGE,
19 COLEMAK,
20 DVORAK,
21 LOWER,
22 RAISE,
23 FN3,
24 FN4,
25 ADJUST,
26};
27
28#define _______ KC_TRNS
29
30#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
31#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
32#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
33#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
34#define KC_X0 MT(MOD_LCTL, KC_ESC)
35#define KC_X1 LOWER
36#define KC_X2 RAISE
37#define KC_X3 LT(_FN3, KC_GRV)
38#define KC_X4 MT(MOD_LSFT, KC_ENT)
39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41
42 [_QWERTY] = COMPACT_KEYMAP(
43 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
44 TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
45 //|----+----+----+----+----+----| |----+----+----+----+----+----|
46 X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
47 //|----+----+----+----+----+----| |----+----+----+----+----+----|
48 LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
49 //|----+----+----+----+----+----| |----+----+----+----+----+----|
50 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
51 //`----+----+----+----+----+----' `----+----+----+----+----+----'
52 ),
53
54 [_COLEMAK] = COMPACT_KEYMAP(
55 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
56 TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
57 //|----+----+----+----+----+----| |----+----+----+----+----+----|
58 X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
59 //|----+----+----+----+----+----| |----+----+----+----+----+----|
60 LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
61 //|----+----+----+----+----+----| |----+----+----+----+----+----|
62 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
63 //`----+----+----+----+----+----' `----+----+----+----+----+----'
64 ),
65
66 [_DVORAK] = COMPACT_KEYMAP(
67 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
68 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
69 //|----+----+----+----+----+----| |----+----+----+----+----+----|
70 X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
71 //|----+----+----+----+----+----| |----+----+----+----+----+----|
72 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
73 //|----+----+----+----+----+----| |----+----+----+----+----+----|
74 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
75 //`----+----+----+----+----+----' `----+----+----+----+----+----'
76 ),
77
78 [_LOWER] = COMPACT_KEYMAP(
79 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
80 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
81 //|----+----+----+----+----+----| |----+----+----+----+----+----|
82 DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
83 //|----+----+----+----+----+----| |----+----+----+----+----+----|
84 ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, ,
85 //|----+----+----+----+----+----| |----+----+----+----+----+----|
86 , , , , , , DEL , , P0 ,PDOT, ,
87 //`----+----+----+----+----+----' `----+----+----+----+----+----'
88 ),
89
90 [_RAISE] = COMPACT_KEYMAP(
91 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
92 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
93 //|----+----+----+----+----+----| |----+----+----+----+----+----|
94 DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
95 //|----+----+----+----+----+----| |----+----+----+----+----+----|
96 MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , ,
97 //|----+----+----+----+----+----| |----+----+----+----+----+----|
98 , , , , , , , , , , ,
99 //`----+----+----+----+----+----' `----+----+----+----+----+----'
100 ),
101
102 [_FN3] = COMPACT_KEYMAP(
103 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
104 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
105 //|----+----+----+----+----+----| |----+----+----+----+----+----|
106 , , , , , , , , , , , ,
107 //|----+----+----+----+----+----| |----+----+----+----+----+----|
108 , , , , , , , , , , , ,
109 //|----+----+----+----+----+----| |----+----+----+----+----+----|
110 , , , , , , , , , , ,
111 //`----+----+----+----+----+----' `----+----+----+----+----+----'
112 ),
113
114/* Adjust (Lower + Raise)
115 * ,-----------------------------------------------------------------------------------.
116 * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | |
117 * |------+------+------+------+------+-------------+------+------+------+------+------|
118 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
119 * |------+------+------+------+------+------|------+------+------+------+------+------|
120 * | | | | | | | | | | | | |
121 * |------+------+------+------+------+------+------+------+------+------+------+------|
122 * | | | | | | | | | | | |
123 * `-----------------------------------------------------------------------------------'
124 */
125 [_ADJUST] = KEYMAP( \
126 _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
127 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
128 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
129 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
130 )
131
132
133};
134
135#ifdef AUDIO_ENABLE
136float tone_qwerty[][2] = SONG(QWERTY_SOUND);
137float tone_dvorak[][2] = SONG(DVORAK_SOUND);
138float tone_colemak[][2] = SONG(COLEMAK_SOUND);
139#endif
140
141void persistant_default_layer_set(uint16_t default_layer) {
142 eeconfig_update_default_layer(default_layer);
143 default_layer_set(default_layer);
144}
145
146bool process_record_user(uint16_t keycode, keyrecord_t *record) {
147 switch (keycode) {
148 case QWERTY:
149 if (record->event.pressed) {
150 #ifdef AUDIO_ENABLE
151 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
152 #endif
153 persistant_default_layer_set(1UL<<_QWERTY);
154 }
155 return false;
156 break;
157 case COLEMAK:
158 if (record->event.pressed) {
159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
161 #endif
162 persistant_default_layer_set(1UL<<_COLEMAK);
163 }
164 return false;
165 break;
166 case DVORAK:
167 if (record->event.pressed) {
168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
170 #endif
171 persistant_default_layer_set(1UL<<_DVORAK);
172 }
173 return false;
174 break;
175 case LOWER:
176 if (record->event.pressed) {
177 layer_on(_LOWER);
178 update_tri_layer(_LOWER, _RAISE, _ADJUST);
179 } else {
180 layer_off(_LOWER);
181 update_tri_layer(_LOWER, _RAISE, _ADJUST);
182 }
183 return false;
184 break;
185 case RAISE:
186 if (record->event.pressed) {
187 layer_on(_RAISE);
188 update_tri_layer(_LOWER, _RAISE, _ADJUST);
189 } else {
190 layer_off(_RAISE);
191 update_tri_layer(_LOWER, _RAISE, _ADJUST);
192 }
193 return false;
194 break;
195 case ADJUST:
196 if (record->event.pressed) {
197 layer_on(_ADJUST);
198 } else {
199 layer_off(_ADJUST);
200 }
201 return false;
202 break;
203 }
204 return true;
205}
diff --git a/keyboards/lets_split/keymaps/smt/config.h b/keyboards/lets_split/keymaps/smt/config.h
new file mode 100644
index 000000000..ba271d1ac
--- /dev/null
+++ b/keyboards/lets_split/keymaps/smt/config.h
@@ -0,0 +1,34 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18
19#define USE_SERIAL
20
21#define MASTER_LEFT
22// #define _MASTER_RIGHT
23// #define EE_HANDS
24
25
26#ifdef SUBPROJECT_rev1
27 #include "../../rev1/config.h"
28#endif
29#ifdef SUBPROJECT_rev2
30 #include "../../rev2/config.h"
31#endif
32#ifdef SUBPROJECT_rev2fliphalf
33 #include "../../rev2fliphalf/config.h"
34#endif
diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c
new file mode 100644
index 000000000..c4bdb7ebc
--- /dev/null
+++ b/keyboards/lets_split/keymaps/smt/keymap.c
@@ -0,0 +1,219 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31// Custom macros
32#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
33#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
34#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
35#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift)
36
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 | Bksp |
42 * |------+------+------+------+------+------| |------+------+------+------+------+------|
43 * | Esc | A | S | D | F | G | | H | J | K | L | ; | " |
44 * |------+------+------+------+------+------| |------+------+------+------+------+------|
45 * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
46 * |------+------+------+------+------+------| |------+------+------+------+------+------|
47 * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
48 * `-----------------------------------------' `-----------------------------------------'
49 */
50[_QWERTY] = KEYMAP( \
51 HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
52 CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
53 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
54 MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
55),
56
57/* Colemak
58 * ,-----------------------------------------. ,-----------------------------------------.
59 * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
60 * |------+------+------+------+------+------| |------+------+------+------+------+------|
61 * | Esc | A | R | S | T | D | | H | N | E | I | O | " |
62 * |------+------+------+------+------+------| |------+------+------+------+------+------|
63 * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter |
64 * |------+------+------+------+------+------| |------+------+------+------+------+------|
65 * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
66 * `-----------------------------------------' `-----------------------------------------'
67 */
68[_COLEMAK] = KEYMAP( \
69 HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
70 CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
71 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
72 MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
73),
74
75/* Dvorak
76 * ,-----------------------------------------. ,-----------------------------------------.
77 * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp |
78 * |------+------+------+------+------+------| |------+------+------+------+------+------|
79 * | Esc | A | O | E | U | I | | D | H | T | N | S | - |
80 * |------+------+------+------+------+------| |------+------+------+------+------+------|
81 * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter |
82 * |------+------+------+------+------+------| |------+------+------+------+------+------|
83 * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
84 * `-----------------------------------------' `-----------------------------------------'
85 */
86[_DVORAK] = KEYMAP( \
87 HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
88 CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
89 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \
90 MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
91),
92
93/* Lower
94 * ,-----------------------------------------. ,-----------------------------------------.
95 * | 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
96 * |------+------+------+------+------+------| |------+------+------+------+------+------|
97 * | $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | |
98 * |------+------+------+------+------+------| |------+------+------+------+------+------|
99 * | | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | |
100 * |------+------+------+------+------+------| |------+------+------+------+------+------|
101 * | | | | | | | | | | Next | Vol- | Vol+ | Play |
102 * `-----------------------------------------' `-----------------------------------------'
103 */
104[_LOWER] = KEYMAP( \
105 ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
106 CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, \
107 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \
108 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
109),
110
111/* Raise
112 * ,-----------------------------------------. ,-----------------------------------------.
113 * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
114 * |------+------+------+------+------+------| |------+------+------+------+------+------|
115 * | | | | | | | | _ | ? | + | { | } | | |
116 * |------+------+------+------+------+------| |------+------+------+------+------+------|
117 * | | | | | | | | - | / | = | [ | ] | \ |
118 * |------+------+------+------+------+------| |------+------+------+------+------+------|
119 * | | | | | | | | | | Home |PageDn|PageUp| End |
120 * `-----------------------------------------' `-----------------------------------------'
121 */
122[_RAISE] = KEYMAP( \
123 ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
124 _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
125 _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), \
126 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
127),
128
129/* Adjust (Lower + Raise)
130 * ,-----------------------------------------. ,-----------------------------------------.
131 * | | Reset| | | | | | | | | | | Reset|
132 * |------+------+------+------+------+------| |------+------+------+------+------+------|
133 * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
134 * |------+------+------+------+------+------| |------+------+------+------+------+------|
135 * | | | | | | | | | | | | | |
136 * |------+------+------+------+------+------| |------+------+------+------+------+------|
137 * | | | | | | | | | | | | | |
138 * `-----------------------------------------' `-----------------------------------------'
139 */
140[_ADJUST] = KEYMAP( \
141 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \
142 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
143 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
144 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
145)
146
147};
148
149#ifdef AUDIO_ENABLE
150float tone_qwerty[][2] = SONG(QWERTY_SOUND);
151float tone_dvorak[][2] = SONG(DVORAK_SOUND);
152float tone_colemak[][2] = SONG(COLEMAK_SOUND);
153#endif
154
155void persistant_default_layer_set(uint16_t default_layer) {
156 eeconfig_update_default_layer(default_layer);
157 default_layer_set(default_layer);
158}
159
160bool process_record_user(uint16_t keycode, keyrecord_t *record) {
161 switch (keycode) {
162 case QWERTY:
163 if (record->event.pressed) {
164 #ifdef AUDIO_ENABLE
165 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
166 #endif
167 persistant_default_layer_set(1UL<<_QWERTY);
168 }
169 return false;
170 break;
171 case COLEMAK:
172 if (record->event.pressed) {
173 #ifdef AUDIO_ENABLE
174 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
175 #endif
176 persistant_default_layer_set(1UL<<_COLEMAK);
177 }
178 return false;
179 break;
180 case DVORAK:
181 if (record->event.pressed) {
182 #ifdef AUDIO_ENABLE
183 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
184 #endif
185 persistant_default_layer_set(1UL<<_DVORAK);
186 }
187 return false;
188 break;
189 case LOWER:
190 if (record->event.pressed) {
191 layer_on(_LOWER);
192 update_tri_layer(_LOWER, _RAISE, _ADJUST);
193 } else {
194 layer_off(_LOWER);
195 update_tri_layer(_LOWER, _RAISE, _ADJUST);
196 }
197 return false;
198 break;
199 case RAISE:
200 if (record->event.pressed) {
201 layer_on(_RAISE);
202 update_tri_layer(_LOWER, _RAISE, _ADJUST);
203 } else {
204 layer_off(_RAISE);
205 update_tri_layer(_LOWER, _RAISE, _ADJUST);
206 }
207 return false;
208 break;
209 case ADJUST:
210 if (record->event.pressed) {
211 layer_on(_ADJUST);
212 } else {
213 layer_off(_ADJUST);
214 }
215 return false;
216 break;
217 }
218 return true;
219}
diff --git a/keyboards/lets_split/keymaps/smt/readme.md b/keyboards/lets_split/keymaps/smt/readme.md
new file mode 100644
index 000000000..20bc662f0
--- /dev/null
+++ b/keyboards/lets_split/keymaps/smt/readme.md
@@ -0,0 +1,88 @@
1# smt's Let's Split keymap
2
3This keymap is ported from my Planck keymap.
4
5
6## Qwerty
7
8```
9,-----------------------------------------. ,-----------------------------------------.
10| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
11|------+------+------+------+------+------| |------+------+------+------+------+------|
12| Esc | A | S | D | F | G | | H | J | K | L | ; | " |
13|------+------+------+------+------+------| |------+------+------+------+------+------|
14| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
15|------+------+------+------+------+------| |------+------+------+------+------+------|
16| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
17`-----------------------------------------' `-----------------------------------------'
18```
19
20## Colemak
21
22```
23,-----------------------------------------. ,-----------------------------------------.
24| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
25|------+------+------+------+------+------| |------+------+------+------+------+------|
26| Esc | A | R | S | T | D | | H | N | E | I | O | " |
27|------+------+------+------+------+------| |------+------+------+------+------+------|
28| Shift| Z | X | C | V | B | | K | M | , | . | / |Enter |
29|------+------+------+------+------+------| |------+------+------+------+------+------|
30| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
31`-----------------------------------------' `-----------------------------------------'
32```
33
34## Dvorak
35
36```
37,-----------------------------------------. ,-----------------------------------------.
38| Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp |
39|------+------+------+------+------+------| |------+------+------+------+------+------|
40| Esc | A | O | E | U | I | | D | H | T | N | S | - |
41|------+------+------+------+------+------| |------+------+------+------+------+------|
42| Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter |
43|------+------+------+------+------+------| |------+------+------+------+------+------|
44| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
45`-----------------------------------------' `-----------------------------------------'
46```
47
48## Lower
49
50```
51,-----------------------------------------. ,-----------------------------------------.
52| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
53|------+------+------+------+------+------| |------+------+------+------+------+------|
54| $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | |
55|------+------+------+------+------+------| |------+------+------+------+------+------|
56| | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | |
57|------+------+------+------+------+------| |------+------+------+------+------+------|
58| | | | | | | | | | Next | Vol- | Vol+ | Play |
59`-----------------------------------------' `-----------------------------------------'
60```
61
62## Raise
63
64```
65,-----------------------------------------. ,-----------------------------------------.
66| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
67|------+------+------+------+------+------| |------+------+------+------+------+------|
68| | | | | | | | _ | ? | + | { | } | | |
69|------+------+------+------+------+------| |------+------+------+------+------+------|
70| | | | | | | | - | / | = | [ | ] | \ |
71|------+------+------+------+------+------| |------+------+------+------+------+------|
72| | | | | | | | | | Home |PageDn|PageUp| End |
73`-----------------------------------------' `-----------------------------------------'
74```
75
76## Adjust (Lower + Raise)
77
78```
79,-----------------------------------------. ,-----------------------------------------.
80| | Reset| | | | | | | | | | | Reset|
81|------+------+------+------+------+------| |------+------+------+------+------+------|
82| | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
83|------+------+------+------+------+------| |------+------+------+------+------+------|
84| | | | | | | | | | | | | |
85|------+------+------+------+------+------| |------+------+------+------+------+------|
86| | | | | | | | | | | | | |
87`-----------------------------------------' `-----------------------------------------'
88```
diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c
index 51e5a40bf..708f699da 100644
--- a/keyboards/planck/keymaps/smt/keymap.c
+++ b/keyboards/planck/keymaps/smt/keymap.c
@@ -11,15 +11,17 @@ extern keymap_config_t keymap_config;
11// The underscores don't mean anything - you can have a layer called STUFF or any other name. 11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them 12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers. 13// entirely and just use numbers.
14#define _DVORAK 0 14#define _QWERTY 0
15#define _QWERTY 1 15#define _COLEMAK 1
16#define _LOWER 2 16#define _DVORAK 2
17#define _RAISE 3 17#define _LOWER 3
18#define _RAISE 4
18#define _ADJUST 16 19#define _ADJUST 16
19 20
20enum planck_keycodes { 21enum planck_keycodes {
21 DVORAK = SAFE_RANGE, 22 QWERTY = SAFE_RANGE,
22 QWERTY, 23 COLEMAK,
24 DVORAK,
23 LOWER, 25 LOWER,
24 RAISE, 26 RAISE,
25 BACKLIT 27 BACKLIT
@@ -29,60 +31,84 @@ enum planck_keycodes {
29#define _______ KC_TRNS 31#define _______ KC_TRNS
30#define XXXXXXX KC_NO 32#define XXXXXXX KC_NO
31 33
34// Custom macros
35#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
36#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
37#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
38#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift)
39
32const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33 41
34/* Dvorak 42/* Qwerty
35 * ,-----------------------------------------------------------------------------------. 43 * ,-----------------------------------------------------------------------------------.
36 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | 44 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
37 * |------+------+------+------+------+-------------+------+------+------+------+------| 45 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Esc | A | O | E | U | I | D | H | T | N | S | - | 46 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
39 * |------+------+------+------+------+------|------+------+------+------+------+------| 47 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | 48 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------| 49 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 50 * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
43 * `-----------------------------------------------------------------------------------' 51 * `-----------------------------------------------------------------------------------'
44 */ 52 */
45[_DVORAK] = { 53[_QWERTY] = {
46 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, 54 {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
47 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, 55 {CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
48 {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, 56 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
49 {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 57 {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
50}, 58},
51 59
52/* Qwerty 60/* Colemak
53 * ,-----------------------------------------------------------------------------------. 61 * ,-----------------------------------------------------------------------------------.
54 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | 62 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
55 * |------+------+------+------+------+-------------+------+------+------+------+------| 63 * |------+------+------+------+------+-------------+------+------+------+------+------|
56 * | Esc | A | S | D | F | G | H | J | K | L | ; | " | 64 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
57 * |------+------+------+------+------+------|------+------+------+------+------+------| 65 * |------+------+------+------+------+------|------+------+------+------+------+------|
58 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | 66 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
59 * |------+------+------+------+------+------+------+------+------+------+------+------| 67 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 68 * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
61 * `-----------------------------------------------------------------------------------' 69 * `-----------------------------------------------------------------------------------'
62 */ 70 */
63[_QWERTY] = { 71[_COLEMAK] = {
64 {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, 72 {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
65 {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, 73 {CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
66 {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, 74 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
67 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 75 {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, 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 |Space |Space |Raise | Left | Down | Up |Right |
87 * `-----------------------------------------------------------------------------------'
88 */
89[_DVORAK] = {
90 {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
91 {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
92 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT},
93 {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
68}, 94},
69 95
70/* Lower 96/* Lower
71 * ,-----------------------------------------------------------------------------------. 97 * ,-----------------------------------------------------------------------------------.
72 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | 98 * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
73 * |------+------+------+------+------+-------------+------+------+------+------+------| 99 * |------+------+------+------+------+-------------+------+------+------+------+------|
74 * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| 100 * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | |
75 * |------+------+------+------+------+------|------+------+------+------+------+------| 101 * |------+------+------+------+------+------|------+------+------+------+------+------|
76 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| 102 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | |
77 * |------+------+------+------+------+------+------+------+------+------+------+------| 103 * |------+------+------+------+------+------+------+------+------+------+------+------|
78 * | | | | | | | | Next | Vol- | Vol+ | Play | 104 * | | | | | | | | Next | Vol- | Vol+ | Play |
79 * `-----------------------------------------------------------------------------------' 105 * `-----------------------------------------------------------------------------------'
80 */ 106 */
81[_LOWER] = { 107[_LOWER] = {
82 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, 108 {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
83 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, 109 {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______},
84 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, 110 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______},
85 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} 111 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
86}, 112},
87 113
88/* Raise 114/* Raise
@@ -93,21 +119,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
93 * |------+------+------+------+------+------|------+------+------+------+------+------| 119 * |------+------+------+------+------+------|------+------+------+------+------+------|
94 * | | | | | | | - | / | = | [ | ] | \ | 120 * | | | | | | | - | / | = | [ | ] | \ |
95 * |------+------+------+------+------+------+------+------+------+------+------+------| 121 * |------+------+------+------+------+------+------+------+------+------+------+------|
96 * | | | | | | | | Next | Vol- | Vol+ | Play | 122 * | | | | | | | | | Home |PageDn|PageUp| End |
97 * `-----------------------------------------------------------------------------------' 123 * `-----------------------------------------------------------------------------------'
98 */ 124 */
99[_RAISE] = { 125[_RAISE] = {
100 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, 126 {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
101 {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, 127 {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
102 {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, 128 {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)},
103 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} 129 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
104}, 130},
105 131
106/* Adjust (Lower + Raise) 132/* Adjust (Lower + Raise)
107 * ,-----------------------------------------------------------------------------------. 133 * ,-----------------------------------------------------------------------------------.
108 * | | Reset| | | | | | | | | | Del | 134 * | | Reset| | | | | | | | | | Reset|
109 * |------+------+------+------+------+-------------+------+------+------+------+------| 135 * |------+------+------+------+------+-------------+------+------+------+------+------|
110 * | | | |Aud on|Audoff|AGnorm|AGswap|Dvorak|Qwerty| | | | 136 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
111 * |------+------+------+------+------+------|------+------+------+------+------+------| 137 * |------+------+------+------+------+------|------+------+------+------+------+------|
112 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | 138 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
113 * |------+------+------+------+------+------+------+------+------+------+------+------| 139 * |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -115,8 +141,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
115 * `-----------------------------------------------------------------------------------' 141 * `-----------------------------------------------------------------------------------'
116 */ 142 */
117[_ADJUST] = { 143[_ADJUST] = {
118 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, 144 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET},
119 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, 145 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
120 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, 146 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
121 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 147 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
122} 148}
@@ -128,6 +154,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
128 154
129float tone_startup[][2] = SONG(STARTUP_SOUND); 155float tone_startup[][2] = SONG(STARTUP_SOUND);
130float tone_qwerty[][2] = SONG(QWERTY_SOUND); 156float tone_qwerty[][2] = SONG(QWERTY_SOUND);
157float tone_colemak[][2] = SONG(COLEMAK_SOUND);
131float tone_dvorak[][2] = SONG(DVORAK_SOUND); 158float tone_dvorak[][2] = SONG(DVORAK_SOUND);
132float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 159float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
133 160
@@ -142,21 +169,30 @@ void persistant_default_layer_set(uint16_t default_layer) {
142 169
143bool process_record_user(uint16_t keycode, keyrecord_t *record) { 170bool process_record_user(uint16_t keycode, keyrecord_t *record) {
144 switch (keycode) { 171 switch (keycode) {
145 case DVORAK: 172 case QWERTY:
146 if (record->event.pressed) { 173 if (record->event.pressed) {
147 #ifdef AUDIO_ENABLE 174 #ifdef AUDIO_ENABLE
148 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 175 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
149 #endif 176 #endif
150 persistant_default_layer_set(1UL<<_DVORAK); 177 persistant_default_layer_set(1UL<<_QWERTY);
151 } 178 }
152 return false; 179 return false;
153 break; 180 break;
154 case QWERTY: 181 case COLEMAK:
155 if (record->event.pressed) { 182 if (record->event.pressed) {
156 #ifdef AUDIO_ENABLE 183 #ifdef AUDIO_ENABLE
157 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 184 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
158 #endif 185 #endif
159 persistant_default_layer_set(1UL<<_QWERTY); 186 persistant_default_layer_set(1UL<<_COLEMAK);
187 }
188 return false;
189 break;
190 case DVORAK:
191 if (record->event.pressed) {
192 #ifdef AUDIO_ENABLE
193 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
194 #endif
195 persistant_default_layer_set(1UL<<_DVORAK);
160 } 196 }
161 return false; 197 return false;
162 break; 198 break;
diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md
index 0e955a574..dc7c9cf9f 100644
--- a/keyboards/planck/keymaps/smt/readme.md
+++ b/keyboards/planck/keymaps/smt/readme.md
@@ -4,49 +4,70 @@ This keymap is primarily based on the default Planck keymap.
4 4
5Notable differences from the default are: 5Notable differences from the default are:
6 6
71. **Dvorak by default** 7- **[Mod-Tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys**
8 8
9 I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. 9 - `Esc/Ctrl`
10 10
112. **Right Shift** 11 I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency...
12 12
13 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. 13 - `Enter/Shift`
14 14
15 Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! 15 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory.
16 16
173. Escape 17 - `Tab/Hyper` (Super+Ctrl+Shift+Alt)
18 18
19 I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... 19 It's great to be able to use Tab as a custom modifier key. I tend to use [Hyper](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) commands for various OS-specific operations depending on what machine I'm working on.
20 20
214. Backtick 21 - `Backtick/Meh` (Ctrl+Shift+Alt)
22 22
23 I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. 23 Why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. The "Meh" mapping is just a less-cool "Hyper"; the same, just without Super.
24 24
25 So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. 25- **Swapped responsibilities of "lower" and "raise" layers**
26 26
27## Dvorak (default) 27 I prefer to use symbols via the "raise" layer, and numbers via the "lower" layer.
28
29- **Removed Plover layer**
30
31 I don't intend to use stenography anytime soon, so Plover just didn't have a place in my keymap.
32
33
34## Qwerty
28 35
29``` 36```
30,-----------------------------------------------------------------------------------. 37,-----------------------------------------------------------------------------------.
31| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | 38| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
32|------+------+------+------+------+-------------+------+------+------+------+------| 39|------+------+------+------+------+-------------+------+------+------+------+------|
33| Esc | A | O | E | U | I | D | H | T | N | S | - | 40| Esc | A | S | D | F | G | H | J | K | L | ; | " |
34|------+------+------+------+------+------|------+------+------+------+------+------| 41|------+------+------+------+------+------|------+------+------+------+------+------|
35| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | 42| Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
36|------+------+------+------+------+------+------+------+------+------+------+------| 43|------+------+------+------+------+------+------+------+------+------+------+------|
37| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 44| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
38`-----------------------------------------------------------------------------------' 45`-----------------------------------------------------------------------------------'
39``` 46```
40 47
41## Qwerty (same as default) 48## Colemak
42 49
43``` 50```
44,-----------------------------------------------------------------------------------. 51,-----------------------------------------------------------------------------------.
45| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | 52| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
46|------+------+------+------+------+-------------+------+------+------+------+------| 53|------+------+------+------+------+-------------+------+------+------+------+------|
47| Esc | A | S | D | F | G | H | J | K | L | ; | " | 54| Esc | A | R | S | T | D | H | N | E | I | O | " |
48|------+------+------+------+------+------|------+------+------+------+------+------| 55|------+------+------+------+------+------|------+------+------+------+------+------|
49| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | 56| Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
57|------+------+------+------+------+------+------+------+------+------+------+------|
58| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
59`-----------------------------------------------------------------------------------'
60```
61
62## Dvorak
63
64```
65,-----------------------------------------------------------------------------------.
66| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
67|------+------+------+------+------+-------------+------+------+------+------+------|
68| Esc | A | O | E | U | I | D | H | T | N | S | - |
69|------+------+------+------+------+------|------+------+------+------+------+------|
70| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
50|------+------+------+------+------+------+------+------+------+------+------+------| 71|------+------+------+------+------+------+------+------+------+------+------+------|
51| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 72| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
52`-----------------------------------------------------------------------------------' 73`-----------------------------------------------------------------------------------'
@@ -54,15 +75,15 @@ Notable differences from the default are:
54 75
55## Lower 76## Lower
56 77
57This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. 78This is where I put the number row, a numpad cluster, function keys, and media controls.
58 79
59``` 80```
60,-----------------------------------------------------------------------------------. 81,-----------------------------------------------------------------------------------.
61| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | 82| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
62|------+------+------+------+------+-------------+------+------+------+------+------| 83|------+------+------+------+------+-------------+------+------+------+------+------|
63| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| 84| $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | |
64|------+------+------+------+------+------|------+------+------+------+------+------| 85|------+------+------+------+------+------|------+------+------+------+------+------|
65| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| 86| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | |
66|------+------+------+------+------+------+------+------+------+------+------+------| 87|------+------+------+------+------+------+------+------+------+------+------+------|
67| | | | | | | | Next | Vol- | Vol+ | Play | 88| | | | | | | | Next | Vol- | Vol+ | Play |
68`-----------------------------------------------------------------------------------' 89`-----------------------------------------------------------------------------------'
@@ -70,7 +91,7 @@ This is where I put the number row, a numpad cluster, function keys, and some li
70 91
71## Raise 92## Raise
72 93
73As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. 94As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. I've also added cursorkeys to correspond to the arrows.
74 95
75I haven't completely filled this layer, which leaves room for future mappings and macros. 96I haven't completely filled this layer, which leaves room for future mappings and macros.
76 97
@@ -82,21 +103,21 @@ I haven't completely filled this layer, which leaves room for future mappings an
82|------+------+------+------+------+------|------+------+------+------+------+------| 103|------+------+------+------+------+------|------+------+------+------+------+------|
83| | | | | | | - | / | = | [ | ] | \ | 104| | | | | | | - | / | = | [ | ] | \ |
84|------+------+------+------+------+------+------+------+------+------+------+------| 105|------+------+------+------+------+------+------+------+------+------+------+------|
85| | | | | | | | Next | Vol- | Vol+ | Play | 106| | | | | | | | | Home |PageDn|PageUp| End |
86`-----------------------------------------------------------------------------------' 107`-----------------------------------------------------------------------------------'
87``` 108```
88 109
89## Adjust (Lower + Raise) 110## Adjust (Lower + Raise)
90 111
91Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. 112Utility layer. This is where I'd switch between Qwerty and Dvorak, ~~fool around with~~ adjust the audio/music settings, or put the Planck into bootloader mode.
92 113
93``` 114```
94,-----------------------------------------------------------------------------------. 115,-----------------------------------------------------------------------------------.
95| | Reset| | | | | | | | | | Del | 116| | Reset| | | | | | | | | | Reset|
96|------+------+------+------+------+-------------+------+------+------+------+------| 117|------+------+------+------+------+-------------+------+------+------+------+------|
97| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | 118| | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
98|------+------+------+------+------+------|------+------+------+------+------+------| 119|------+------+------+------+------+------|------+------+------+------+------+------|
99| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | 120| |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
100|------+------+------+------+------+------+------+------+------+------+------+------| 121|------+------+------+------+------+------+------+------+------+------+------+------|
101| | | | | | | | | | | | 122| | | | | | | | | | | |
102`-----------------------------------------------------------------------------------' 123`-----------------------------------------------------------------------------------'
diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk
index 4423d422f..6776062f6 100644
--- a/keyboards/planck/rules.mk
+++ b/keyboards/planck/rules.mk
@@ -56,13 +56,13 @@ EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
56CONSOLE_ENABLE ?= no # Console for debug(+400) 56CONSOLE_ENABLE ?= no # Console for debug(+400)
57COMMAND_ENABLE ?= no # Commands for debug and configuration 57COMMAND_ENABLE ?= no # Commands for debug and configuration
58NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 58NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
59BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality 59BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
60MIDI_ENABLE ?= yes # MIDI controls 60MIDI_ENABLE ?= yes # MIDI controls
61AUDIO_ENABLE ?= yes # Audio output on port C6 61AUDIO_ENABLE ?= yes # Audio output on port C6
62UNICODE_ENABLE ?= no # Unicode 62UNICODE_ENABLE ?= no # Unicode
63BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID 63BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
64RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. 64RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight.
65API_SYSEX_ENABLE = yes 65API_SYSEX_ENABLE = no
66 66
67# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 67# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
68SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 68SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c
index ba05d9ad5..a10deb750 100644
--- a/keyboards/preonic/keymaps/smt/keymap.c
+++ b/keyboards/preonic/keymaps/smt/keymap.c
@@ -9,15 +9,17 @@
9// The underscores don't mean anything - you can have a layer called STUFF or any other name. 9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them 10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers. 11// entirely and just use numbers.
12#define _DVORAK 0 12#define _QWERTY 0
13#define _QWERTY 1 13#define _COLEMAK 1
14#define _LOWER 2 14#define _DVORAK 2
15#define _RAISE 3 15#define _LOWER 3
16#define _RAISE 4
16#define _ADJUST 16 17#define _ADJUST 16
17 18
18enum preonic_keycodes { 19enum preonic_keycodes {
19 DVORAK = SAFE_RANGE, 20 QWERTY = SAFE_RANGE,
20 QWERTY, 21 COLEMAK,
22 DVORAK,
21 LOWER, 23 LOWER,
22 RAISE, 24 RAISE,
23 BACKLIT 25 BACKLIT
@@ -27,69 +29,96 @@ enum preonic_keycodes {
27#define _______ KC_TRNS 29#define _______ KC_TRNS
28#define XXXXXXX KC_NO 30#define XXXXXXX KC_NO
29 31
32// Custom macros
33#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
34#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
35#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
36#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift)
37
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 39
32/* Dvorak 40/* Qwerty
33 * ,-----------------------------------------------------------------------------------. 41 * ,-----------------------------------------------------------------------------------.
34 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 42 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
35 * |------+------+------+------+------+------+------+------+------+------+------+------| 43 * |------+------+------+------+------+------+------+------+------+------+------+------|
36 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | 44 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
37 * |------+------+------+------+------+-------------+------+------+------+------+------| 45 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Esc | A | O | E | U | I | D | H | T | N | S | - | 46 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
39 * |------+------+------+------+------+------|------+------+------+------+------+------| 47 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | 48 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------| 49 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 50 * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
43 * `-----------------------------------------------------------------------------------' 51 * `-----------------------------------------------------------------------------------'
44 */ 52 */
45[_DVORAK] = { 53[_QWERTY] = {
46 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 54 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
47 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, 55 {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
48 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, 56 {CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
49 {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, 57 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
50 {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 58 {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
51}, 59},
52 60
53/* Qwerty 61/* Colemak
54 * ,-----------------------------------------------------------------------------------. 62 * ,-----------------------------------------------------------------------------------.
55 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 63 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
56 * |------+------+------+------+------+------+------+------+------+------+------+------| 64 * |------+------+------+------+------+------+------+------+------+------+------+------|
57 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | 65 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
58 * |------+------+------+------+------+-------------+------+------+------+------+------| 66 * |------+------+------+------+------+-------------+------+------+------+------+------|
59 * | Esc | A | S | D | F | G | H | J | K | L | ; | " | 67 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
60 * |------+------+------+------+------+------|------+------+------+------+------+------| 68 * |------+------+------+------+------+------|------+------+------+------+------+------|
61 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | 69 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
62 * |------+------+------+------+------+------+------+------+------+------+------+------| 70 * |------+------+------+------+------+------+------+------+------+------+------+------|
63 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 71 * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
64 * `-----------------------------------------------------------------------------------' 72 * `-----------------------------------------------------------------------------------'
65 */ 73 */
66[_QWERTY] = { 74[_COLEMAK] = {
67 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, 75 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
68 {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______}, 76 {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
69 {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, 77 {CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
70 {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, 78 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
71 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 79 {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
80},
81
82/* Dvorak
83 * ,-----------------------------------------------------------------------------------.
84 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
85 * |------+------+------+------+------+------+------+------+------+------+------+------|
86 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
87 * |------+------+------+------+------+-------------+------+------+------+------+------|
88 * | Esc | A | O | E | U | I | D | H | T | N | S | - |
89 * |------+------+------+------+------+------|------+------+------+------+------+------|
90 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
91 * |------+------+------+------+------+------+------+------+------+------+------+------|
92 * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
93 * `-----------------------------------------------------------------------------------'
94 */
95[_DVORAK] = {
96 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
97 {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
98 {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
99 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT},
100 {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
72}, 101},
73 102
74/* Lower 103/* Lower
75 * ,-----------------------------------------------------------------------------------. 104 * ,-----------------------------------------------------------------------------------.
76 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | 105 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
77 * |------+------+------+------+------+------+------+------+------+------+------+------| 106 * |------+------+------+------+------+------+------+------+------+------+------+------|
78 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | 107 * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
79 * |------+------+------+------+------+-------------+------+------+------+------+------| 108 * |------+------+------+------+------+-------------+------+------+------+------+------|
80 * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| 109 * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | |
81 * |------+------+------+------+------+------|------+------+------+------+------+------| 110 * |------+------+------+------+------+------|------+------+------+------+------+------|
82 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| 111 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | |
83 * |------+------+------+------+------+------+------+------+------+------+------+------| 112 * |------+------+------+------+------+------+------+------+------+------+------+------|
84 * | | | | | | | | Next | Vol- | Vol+ | Play | 113 * | | | | | | | | Next | Vol- | Vol+ | Play |
85 * `-----------------------------------------------------------------------------------' 114 * `-----------------------------------------------------------------------------------'
86 */ 115 */
87[_LOWER] = { 116[_LOWER] = {
88 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, 117 {ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
89 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, 118 {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
90 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, 119 {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______},
91 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, 120 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______},
92 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} 121 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
93}, 122},
94 123
95/* Raise 124/* Raise
@@ -102,24 +131,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
102 * |------+------+------+------+------+------|------+------+------+------+------+------| 131 * |------+------+------+------+------+------|------+------+------+------+------+------|
103 * | | | | | | | - | / | = | [ | ] | \ | 132 * | | | | | | | - | / | = | [ | ] | \ |
104 * |------+------+------+------+------+------+------+------+------+------+------+------| 133 * |------+------+------+------+------+------+------+------+------+------+------+------|
105 * | | | | | | | | Next | Vol- | Vol+ | Play | 134 * | | | | | | | | | Home |PageDn|PageUp| End |
106 * `-----------------------------------------------------------------------------------' 135 * `-----------------------------------------------------------------------------------'
107 */ 136 */
108[_RAISE] = { 137[_RAISE] = {
109 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, 138 {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
110 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, 139 {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
111 {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, 140 {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
112 {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, 141 {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)},
113 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} 142 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
114}, 143},
115 144
116/* Adjust (Lower + Raise) 145/* Adjust (Lower + Raise)
117 * ,-----------------------------------------------------------------------------------. 146 * ,-----------------------------------------------------------------------------------.
118 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | 147 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
119 * |------+------+------+------+------+------+------+------+------+------+------+------| 148 * |------+------+------+------+------+------+------+------+------+------+------+------|
120 * | | Reset| | | | | | | | | | Del | 149 * | | Reset| | | | | | | | | | Reset|
121 * |------+------+------+------+------+-------------+------+------+------+------+------| 150 * |------+------+------+------+------+-------------+------+------+------+------+------|
122 * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | 151 * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
123 * |------+------+------+------+------+------|------+------+------+------+------+------| 152 * |------+------+------+------+------+------|------+------+------+------+------+------|
124 * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | 153 * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
125 * |------+------+------+------+------+------+------+------+------+------+------+------| 154 * |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -128,8 +157,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
128 */ 157 */
129[_ADJUST] = { 158[_ADJUST] = {
130 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, 159 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
131 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, 160 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET},
132 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, 161 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
133 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, 162 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
134 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 163 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
135} 164}
@@ -145,8 +174,9 @@ float tone_startup[][2] = {
145 {NOTE_B6, 8} 174 {NOTE_B6, 8}
146}; 175};
147 176
148float tone_dvorak[][2] = SONG(DVORAK_SOUND);
149float tone_qwerty[][2] = SONG(QWERTY_SOUND); 177float tone_qwerty[][2] = SONG(QWERTY_SOUND);
178float tone_colemak[][2] = SONG(COLEMAK_SOUND);
179float tone_dvorak[][2] = SONG(DVORAK_SOUND);
150 180
151float tone_goodbye[][2] = SONG(GOODBYE_SOUND); 181float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
152 182
@@ -160,21 +190,30 @@ void persistant_default_layer_set(uint16_t default_layer) {
160 190
161bool process_record_user(uint16_t keycode, keyrecord_t *record) { 191bool process_record_user(uint16_t keycode, keyrecord_t *record) {
162 switch (keycode) { 192 switch (keycode) {
163 case DVORAK: 193 case QWERTY:
164 if (record->event.pressed) { 194 if (record->event.pressed) {
165 #ifdef AUDIO_ENABLE 195 #ifdef AUDIO_ENABLE
166 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 196 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
167 #endif 197 #endif
168 persistant_default_layer_set(1UL<<_DVORAK); 198 persistant_default_layer_set(1UL<<_QWERTY);
169 } 199 }
170 return false; 200 return false;
171 break; 201 break;
172 case QWERTY: 202 case COLEMAK:
173 if (record->event.pressed) { 203 if (record->event.pressed) {
174 #ifdef AUDIO_ENABLE 204 #ifdef AUDIO_ENABLE
175 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 205 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
176 #endif 206 #endif
177 persistant_default_layer_set(1UL<<_QWERTY); 207 persistant_default_layer_set(1UL<<_COLEMAK);
208 }
209 return false;
210 break;
211 case DVORAK:
212 if (record->event.pressed) {
213 #ifdef AUDIO_ENABLE
214 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
215 #endif
216 persistant_default_layer_set(1UL<<_DVORAK);
178 } 217 }
179 return false; 218 return false;
180 break; 219 break;
diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md
index 016da7b01..2ec2603f3 100644
--- a/keyboards/preonic/keymaps/smt/readme.md
+++ b/keyboards/preonic/keymaps/smt/readme.md
@@ -4,53 +4,76 @@ This keymap is primarily based on the default Preonic keymap, which in turn is d
4 4
5Notable differences from the default are: 5Notable differences from the default are:
6 6
71. **Dvorak by default** 7- **[Mod-Tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys**
8 8
9 I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. 9 - `Esc/Ctrl`
10 10
112. **Right Shift** 11 I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency...
12 12
13 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. 13 - `Enter/Shift`
14 14
15 Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! 15 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory.
16 16
173. Escape 17 - `Tab/Hyper` (Super+Ctrl+Shift+Alt)
18 18
19 I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... 19 It's great to be able to use Tab as a custom modifier key. I tend to use [Hyper](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) commands for various OS-specific operations depending on what machine I'm working on.
20 20
214. Backtick 21 - `Backtick/Meh` (Ctrl+Shift+Alt)
22 22
23 I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. 23 Why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. The "Meh" mapping is just a less-cool "Hyper"; the same, just without Super.
24 24
25 So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. 25- **Swapped responsibilities of "lower" and "raise" layers**
26 26
27## Dvorak (default) 27 I prefer to use symbols via the "raise" layer, and numbers via the "lower" layer.
28
29- **Removed Plover layer**
30
31 I don't intend to use stenography anytime soon, so Plover just didn't have a place in my keymap.
32
33
34## Qwerty
28 35
29``` 36```
30,-----------------------------------------------------------------------------------. 37,-----------------------------------------------------------------------------------.
31| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 38| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
32|------+------+------+------+------+------+------+------+------+------+------+------| 39|------+------+------+------+------+------+------+------+------+------+------+------|
33| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | 40| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
34|------+------+------+------+------+-------------+------+------+------+------+------| 41|------+------+------+------+------+-------------+------+------+------+------+------|
35| Esc | A | O | E | U | I | D | H | T | N | S | - | 42| Esc | A | S | D | F | G | H | J | K | L | ; | " |
36|------+------+------+------+------+------|------+------+------+------+------+------| 43|------+------+------+------+------+------|------+------+------+------+------+------|
37| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | 44| Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
38|------+------+------+------+------+------+------+------+------+------+------+------| 45|------+------+------+------+------+------+------+------+------+------+------+------|
39| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 46| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
40`-----------------------------------------------------------------------------------' 47`-----------------------------------------------------------------------------------'
41``` 48```
42 49
43## Qwerty (same as default) 50## Colemak
44 51
45``` 52```
46,-----------------------------------------------------------------------------------. 53,-----------------------------------------------------------------------------------.
47| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 54| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
48|------+------+------+------+------+------+------+------+------+------+------+------| 55|------+------+------+------+------+------+------+------+------+------+------+------|
49| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | 56| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
50|------+------+------+------+------+-------------+------+------+------+------+------| 57|------+------+------+------+------+-------------+------+------+------+------+------|
51| Esc | A | S | D | F | G | H | J | K | L | ; | " | 58| Esc | A | R | S | T | D | H | N | E | I | O | " |
52|------+------+------+------+------+------|------+------+------+------+------+------| 59|------+------+------+------+------+------|------+------+------+------+------+------|
53| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | 60| Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
61|------+------+------+------+------+------+------+------+------+------+------+------|
62| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
63`-----------------------------------------------------------------------------------'
64```
65
66## Dvorak
67
68```
69,-----------------------------------------------------------------------------------.
70| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
71|------+------+------+------+------+------+------+------+------+------+------+------|
72| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
73|------+------+------+------+------+-------------+------+------+------+------+------|
74| Esc | A | O | E | U | I | D | H | T | N | S | - |
75|------+------+------+------+------+------|------+------+------+------+------+------|
76| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
54|------+------+------+------+------+------+------+------+------+------+------+------| 77|------+------+------+------+------+------+------+------+------+------+------+------|
55| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 78| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
56`-----------------------------------------------------------------------------------' 79`-----------------------------------------------------------------------------------'
@@ -58,17 +81,17 @@ Notable differences from the default are:
58 81
59## Lower 82## Lower
60 83
61This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. 84This is where I put the number row, a numpad cluster, function keys, and media controls. Like the "Raise" layer, the top row is redundant to help with Planck compatibility.
62 85
63``` 86```
64,-----------------------------------------------------------------------------------. 87,-----------------------------------------------------------------------------------.
65| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | 88| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
66|------+------+------+------+------+------+------+------+------+------+------+------| 89|------+------+------+------+------+------+------+------+------+------+------+------|
67| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | 90| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
68|------+------+------+------+------+-------------+------+------+------+------+------| 91|------+------+------+------+------+-------------+------+------+------+------+------|
69| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| 92| $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | |
70|------+------+------+------+------+------|------+------+------+------+------+------| 93|------+------+------+------+------+------|------+------+------+------+------+------|
71| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| 94| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | |
72|------+------+------+------+------+------+------+------+------+------+------+------| 95|------+------+------+------+------+------+------+------+------+------+------+------|
73| | | | | | | | Next | Vol- | Vol+ | Play | 96| | | | | | | | Next | Vol- | Vol+ | Play |
74`-----------------------------------------------------------------------------------' 97`-----------------------------------------------------------------------------------'
@@ -76,7 +99,7 @@ This is where I put the number row, a numpad cluster, function keys, and some li
76 99
77## Raise 100## Raise
78 101
79As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. 102As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. I've also added cursorkeys to correspond to the arrows.
80 103
81I haven't completely filled this layer, which leaves room for future mappings and macros. 104I haven't completely filled this layer, which leaves room for future mappings and macros.
82 105
@@ -90,21 +113,21 @@ I haven't completely filled this layer, which leaves room for future mappings an
90|------+------+------+------+------+------|------+------+------+------+------+------| 113|------+------+------+------+------+------|------+------+------+------+------+------|
91| | | | | | | - | / | = | [ | ] | \ | 114| | | | | | | - | / | = | [ | ] | \ |
92|------+------+------+------+------+------+------+------+------+------+------+------| 115|------+------+------+------+------+------+------+------+------+------+------+------|
93| | | | | | | | Next | Vol- | Vol+ | Play | 116| | | | | | | | | Home |PageDn|PageUp| End |
94`-----------------------------------------------------------------------------------' 117`-----------------------------------------------------------------------------------'
95``` 118```
96 119
97## Adjust (Lower + Raise) 120## Adjust (Lower + Raise)
98 121
99Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. 122Utility layer. This is where I'd switch between Qwerty and Dvorak, ~~fool around with~~ adjust the audio/music settings, or put the Preonic into bootloader mode.
100 123
101``` 124```
102,-----------------------------------------------------------------------------------. 125,-----------------------------------------------------------------------------------.
103| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | 126| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
104|------+------+------+------+------+------+------+------+------+------+------+------| 127|------+------+------+------+------+------+------+------+------+------+------+------|
105| | Reset| | | | | | | | | | Del | 128| | Reset| | | | | | | | | | Reset|
106|------+------+------+------+------+-------------+------+------+------+------+------| 129|------+------+------+------+------+-------------+------+------+------+------+------|
107| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | 130| | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
108|------+------+------+------+------+------|------+------+------+------+------+------| 131|------+------+------+------+------+------|------+------+------+------+------+------|
109| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | 132| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
110|------+------+------+------+------+------+------+------+------+------+------+------| 133|------+------+------+------+------+------+------+------+------+------+------+------|
diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk
index 62473e356..6be5b55bc 100644
--- a/keyboards/preonic/rules.mk
+++ b/keyboards/preonic/rules.mk
@@ -58,13 +58,13 @@ EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
58CONSOLE_ENABLE ?= no # Console for debug(+400) 58CONSOLE_ENABLE ?= no # Console for debug(+400)
59COMMAND_ENABLE ?= no # Commands for debug and configuration 59COMMAND_ENABLE ?= no # Commands for debug and configuration
60NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 60NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
61BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality 61BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
62MIDI_ENABLE ?= yes # MIDI controls 62MIDI_ENABLE ?= yes # MIDI controls
63AUDIO_ENABLE ?= yes # Audio output on port C6 63AUDIO_ENABLE ?= yes # Audio output on port C6
64UNICODE_ENABLE ?= no # Unicode 64UNICODE_ENABLE ?= no # Unicode
65BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID 65BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
66RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. 66RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight.
67API_SYSEX_ENABLE ?= yes 67API_SYSEX_ENABLE ?= no
68 68
69# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 69# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
70SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file 70SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/tv44/keymaps/smt/keymap.c b/keyboards/tv44/keymaps/smt/keymap.c
index de5ce03e2..532e74de0 100644
--- a/keyboards/tv44/keymaps/smt/keymap.c
+++ b/keyboards/tv44/keymaps/smt/keymap.c
@@ -32,8 +32,8 @@ enum planck_keycodes {
32// Custom macros 32// Custom macros
33#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl 33#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
34#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift 34#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
35#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper 35#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
36#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt 36#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt (Ctrl+Alt+Shift)
37 37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 39
@@ -117,13 +117,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
117 */ 117 */
118[_LOWER] = KEYMAP_TV45( 118[_LOWER] = KEYMAP_TV45(
119/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ 119/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
120 KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL , 120ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL ,
121/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ 121/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
122 KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP , 122CTL_T(KC_DLR), KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP ,
123/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ 123/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
124 KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, KC_PGDN , 124SFT_T(KC_EQL), KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, SFT_T(KC_PGDN),
125/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ 125/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
126 BACKLIT , _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ), 126ALT_T(BACKLIT), _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ),
127/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ 127/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
128 128
129/* Raise 129/* Raise
@@ -139,18 +139,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
139 */ 139 */
140[_RAISE] = KEYMAP_TV45( 140[_RAISE] = KEYMAP_TV45(
141/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ 141/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
142 KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , 142ALL_T(KC_TILD),KC_EXLM,KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
143/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ 143/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
144 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , 144CTL_T(KC_F1), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE ,
145/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ 145/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
146 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS , 146 SFT_T(KC_F7), KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS),
147/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ 147/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
148 BACKLIT , _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ), 148ALT_T(BACKLIT), _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ),
149/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ 149/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
150 150
151/* Adjust (Lower + Raise) 151/* Adjust (Lower + Raise)
152 * ,---------+------+------+------+------+------+------+------+------+------+------+---------. 152 * ,---------+------+------+------+------+------+------+------+------+------+------+---------.
153 * | | Reset| | | | | | | | | | Del | 153 * | | Reset| | | | | | | | | | Reset |
154 * |---------`------`------`------`------`------`------`------`------`------`------`---------| 154 * |---------`------`------`------`------`------`------`------`------`------`------`---------|
155 * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | 155 * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
156 * |----------`------`------`------`------`------`------`------`------`------`------`--------| 156 * |----------`------`------`------`------`------`------`------`------`------`------`--------|
@@ -161,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
161 */ 161 */
162[_ADJUST] = KEYMAP_TV45( 162[_ADJUST] = KEYMAP_TV45(
163/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ 163/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
164 _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , 164 _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET ,
165/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ 165/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
166 _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______ , 166 _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______ ,
167/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ 167/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 4a6d0355f..582f8920b 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -7,6 +7,9 @@
7#define TAPPING_TERM 200 7#define TAPPING_TERM 200
8#endif 8#endif
9 9
10#include "backlight.h"
11extern backlight_config_t backlight_config;
12
10#ifdef FAUXCLICKY_ENABLE 13#ifdef FAUXCLICKY_ENABLE
11#include "fauxclicky.h" 14#include "fauxclicky.h"
12#endif 15#endif
@@ -601,6 +604,10 @@ void matrix_scan_quantum() {
601 matrix_scan_combo(); 604 matrix_scan_combo();
602 #endif 605 #endif
603 606
607 #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN)
608 backlight_task();
609 #endif
610
604 matrix_scan_kb(); 611 matrix_scan_kb();
605} 612}
606 613
@@ -668,13 +675,13 @@ __attribute__ ((weak))
668void backlight_set(uint8_t level) 675void backlight_set(uint8_t level)
669{ 676{
670 // Prevent backlight blink on lowest level 677 // Prevent backlight blink on lowest level
671 #if BACKLIGHT_ON_STATE == 0 678 // #if BACKLIGHT_ON_STATE == 0
672 // PORTx &= ~n 679 // // PORTx &= ~n
673 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); 680 // _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
674 #else 681 // #else
675 // PORTx |= n 682 // // PORTx |= n
676 _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); 683 // _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
677 #endif 684 // #endif
678 685
679 if ( level == 0 ) { 686 if ( level == 0 ) {
680 #ifndef NO_BACKLIGHT_CLOCK 687 #ifndef NO_BACKLIGHT_CLOCK
@@ -682,13 +689,13 @@ void backlight_set(uint8_t level)
682 TCCR1A &= ~(_BV(COM1x1)); 689 TCCR1A &= ~(_BV(COM1x1));
683 OCR1x = 0x0; 690 OCR1x = 0x0;
684 #else 691 #else
685 #if BACKLIGHT_ON_STATE == 0 692 // #if BACKLIGHT_ON_STATE == 0
686 // PORTx |= n 693 // // PORTx |= n
687 _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); 694 // _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
688 #else 695 // #else
689 // PORTx &= ~n 696 // // PORTx &= ~n
690 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); 697 // _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
691 #endif 698 // #endif
692 #endif 699 #endif
693 } 700 }
694 #ifndef NO_BACKLIGHT_CLOCK 701 #ifndef NO_BACKLIGHT_CLOCK
@@ -711,6 +718,30 @@ void backlight_set(uint8_t level)
711 #endif 718 #endif
712} 719}
713 720
721uint8_t backlight_tick = 0;
722
723void backlight_task(void) {
724 #ifdef NO_BACKLIGHT_CLOCK
725 if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) {
726 #if BACKLIGHT_ON_STATE == 0
727 // PORTx &= ~n
728 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
729 #else
730 // PORTx |= n
731 _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
732 #endif
733 } else {
734 #if BACKLIGHT_ON_STATE == 0
735 // PORTx |= n
736 _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
737 #else
738 // PORTx &= ~n
739 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
740 #endif
741 }
742 backlight_tick = (backlight_tick + 1) % 16;
743 #endif
744}
714 745
715#ifdef BACKLIGHT_BREATHING 746#ifdef BACKLIGHT_BREATHING
716 747
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 580d51202..259bac369 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -103,6 +103,7 @@ void unregister_code16 (uint16_t code);
103 103
104#ifdef BACKLIGHT_ENABLE 104#ifdef BACKLIGHT_ENABLE
105void backlight_init_ports(void); 105void backlight_init_ports(void);
106void backlight_task(void);
106 107
107#ifdef BACKLIGHT_BREATHING 108#ifdef BACKLIGHT_BREATHING
108void breathing_enable(void); 109void breathing_enable(void);
diff --git a/readme.md b/readme.md
index 7ce3d0375..b2dfc5f75 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
1# Quantum Mechanical Keyboard Firmware 1# Quantum Mechanical Keyboard Firmware
2 2
3[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 3[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4 4
5This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). 5This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
6 6