diff options
author | Gun Pinyo <gunpinyo@gmail.com> | 2021-05-27 10:48:14 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 20:48:14 -0700 |
commit | 0399271a73c78ed8fc23376e142e3c87a0360da0 (patch) | |
tree | 5d7e004166215b46b65a064c5b6bee1faace2614 | |
parent | 8ba537fa23aa1520949981f1afe1a71338bf8a7a (diff) | |
download | qmk_firmware-0399271a73c78ed8fc23376e142e3c87a0360da0.tar.gz qmk_firmware-0399271a73c78ed8fc23376e142e3c87a0360da0.zip |
[Keymap] update gunp layout for Planck (#12926)
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/planck/keymaps/gunp/config.h | 56 | ||||
-rw-r--r-- | keyboards/planck/keymaps/gunp/keymap.c | 363 | ||||
-rw-r--r-- | keyboards/planck/keymaps/gunp/readme.md | 100 | ||||
-rw-r--r-- | keyboards/planck/keymaps/gunp/rules.mk | 32 | ||||
-rwxr-xr-x | keyboards/planck/keymaps/gunp/upload-and-make.sh | 16 |
5 files changed, 354 insertions, 213 deletions
diff --git a/keyboards/planck/keymaps/gunp/config.h b/keyboards/planck/keymaps/gunp/config.h index d3db1ffac..a48cd4534 100644 --- a/keyboards/planck/keymaps/gunp/config.h +++ b/keyboards/planck/keymaps/gunp/config.h | |||
@@ -1,39 +1,27 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | /* Copyright 2021 Gun Pinyo |
2 | #define CONFIG_USER_H | 2 | * |
3 | 3 | * This program is free software: you can redistribute it and/or modify | |
4 | #include "../../config.h" | 4 | * it under the terms of the GNU General Public License as published by |
5 | 5 | * the Free Software Foundation, either version 2 of the License, or | |
6 | #ifdef AUDIO_ENABLE | 6 | * (at your option) any later version. |
7 | #define STARTUP_SONG SONG(PLANCK_SOUND) | 7 | * |
8 | // #define STARTUP_SONG SONG(NO_SOUND) | 8 | * This program is distributed in the hope that it will be useful, |
9 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | SONG(COLEMAK_SOUND), \ | 11 | * GNU General Public License for more details. |
12 | SONG(DVORAK_SOUND) \ | 12 | * |
13 | } | 13 | * You should have received a copy of the GNU General Public License |
14 | #endif | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | |||
16 | #define MUSIC_MASK (keycode != KC_NO) | ||
17 | |||
18 | /* | ||
19 | * MIDI options | ||
20 | */ | 15 | */ |
21 | 16 | ||
22 | /* enable basic MIDI features: | 17 | #pragma once |
23 | - MIDI notes can be sent when in Music mode is on | ||
24 | */ | ||
25 | |||
26 | #define MIDI_BASIC | ||
27 | 18 | ||
28 | /* enable advanced MIDI features: | 19 | /* Tapping this number of times holds the key until tapped once again. */ |
29 | - MIDI notes can be added to the keymap | 20 | #define ONESHOT_TAP_TOGGLE 7 |
30 | - Octave shift and transpose | 21 | /* Time (in ms) before the one shot key is released */ |
31 | - Virtual sustain, portamento, and modulation wheel | 22 | #define ONESHOT_TIMEOUT 5000 |
32 | - etc. | ||
33 | */ | ||
34 | //#define MIDI_ADVANCED | ||
35 | |||
36 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
37 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 | ||
38 | 23 | ||
24 | /* Audio */ | ||
25 | #ifdef AUDIO_ENABLE | ||
26 | #define STARTUP_SONG SONG(PLANCK_SOUND) | ||
39 | #endif | 27 | #endif |
diff --git a/keyboards/planck/keymaps/gunp/keymap.c b/keyboards/planck/keymaps/gunp/keymap.c index a2a04a8e9..04af006a7 100644 --- a/keyboards/planck/keymaps/gunp/keymap.c +++ b/keyboards/planck/keymaps/gunp/keymap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* Copyright 2015-2017 Jack Humbert | 1 | /* Copyright 2021 Gun Pinyo |
2 | * | 2 | * |
3 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
@@ -14,8 +14,6 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* modified by Gun Pinyo */ | ||
18 | |||
19 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
20 | 18 | ||
21 | extern keymap_config_t keymap_config; | 19 | extern keymap_config_t keymap_config; |
@@ -25,141 +23,276 @@ enum planck_layers { | |||
25 | LY_0100, LY_0101, LY_0110, LY_0111, | 23 | LY_0100, LY_0101, LY_0110, LY_0111, |
26 | LY_1000, LY_1001, LY_1010, LY_1011, | 24 | LY_1000, LY_1001, LY_1010, LY_1011, |
27 | LY_1100, LY_1101, LY_1110, LY_1111, | 25 | LY_1100, LY_1101, LY_1110, LY_1111, |
26 | LY_THAI_A, LY_THAI_B, LY_THAI_C, | ||
27 | LY_SANDBOX, LY_STICK, | ||
28 | }; | 28 | }; |
29 | 29 | ||
30 | enum planck_keycodes { | 30 | enum planck_keycodes { |
31 | FN_A = SAFE_RANGE, | 31 | MIN_KC = SAFE_RANGE, |
32 | FN_B, | 32 | FUNC_A, FUNC_B, FUNC_C, FUNC_D, |
33 | FN_C, | 33 | SANDBOX, STICK, |
34 | FN_D, | 34 | LTHAI_A, LTHAI_B, LTHAI_C, |
35 | LSW0110, LSW1111, LSW0100, | ||
36 | USER_NAME, USER_EMAIL, | ||
37 | MAX_KC, | ||
35 | DYNAMIC_MACRO_RANGE, | 38 | DYNAMIC_MACRO_RANGE, |
36 | }; | 39 | }; |
37 | 40 | ||
38 | #include "dynamic_macro.h" | 41 | #define KC_L2_0 KC_LSFT |
39 | 42 | #define KC_L3_0 KC_LCTL | |
40 | #define MFN_R1 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | 43 | #define KC_L3_1 KC_LALT |
41 | #define MFN_R2 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | 44 | #define KC_L3_2 KC_LGUI |
42 | #define MFN_R3 XXXXXXX, FN_A, FN_B, FN_C, XXXXXXX, XXXXXXX | 45 | |
43 | #define MFN_R4 XXXXXXX, KC_LCTL, KC_LSFT, KC_LALT, FN_D, XXXXXXX | 46 | #define KC_R2_1 FUNC_A |
44 | #define UNUSED_LAYER {\ | 47 | #define KC_R2_2 FUNC_B |
45 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R1},\ | 48 | #define KC_R2_3 FUNC_C |
46 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R2},\ | 49 | #define KC_R2_4 FUNC_D |
47 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R3},\ | 50 | |
48 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R4}}, | 51 | #define KC_R2_5 KC_RSFT |
49 | #define MC(kc) LCTL(kc) | 52 | #define KC_R3_0 KC_R2_4 |
50 | #define MA(kc) LALT(kc) | 53 | #define KC_R3_1 KC_SPC |
51 | #define MG(kc) LGUI(kc) // ModGui, for i3 shortcuts | 54 | |
55 | #define LAYOUT_gunp( k00, k01, k02, k03, k04, k05, \ | ||
56 | k10, k11, k12, k13, k14, k15, \ | ||
57 | k20, k21, k22, k23, k24, k25, \ | ||
58 | k30, k31, k32, k33, k34, k35) \ | ||
59 | LAYOUT_ortho_4x12( \ | ||
60 | k00,k01,k02,k03,k04,k05, LSW0110, KC_LEFT, KC_BSPC, KC_RIGHT,XXXXXXX, XXXXXXX,\ | ||
61 | k10,k11,k12,k13,k14,k15, LSW1111, LTHAI_A, LTHAI_B, LTHAI_C, XXXXXXX, XXXXXXX,\ | ||
62 | k20,k21,k22,k23,k24,k25, LSW0100, KC_R2_1, KC_R2_2, KC_R2_3, KC_R2_4, KC_R2_5,\ | ||
63 | k30,k31,k32,k33,k34,k35, KC_R3_0, KC_R3_1, KC_ENT, KC_RGUI, KC_RALT, KC_RCTL) | ||
64 | |||
65 | #define UNUSED_LAYER LAYOUT_gunp(\ | ||
66 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ | ||
67 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ | ||
68 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ | ||
69 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), | ||
70 | |||
71 | #define F1_F12_LAYER(M) LAYOUT_gunp(\ | ||
72 | S(M(KC_F7 )), S(M(KC_F8 )), M(KC_F7 ), M(KC_F8 ), M(KC_F9 ), S(M(KC_F9 )),\ | ||
73 | S(M(KC_F4 )), S(M(KC_F5 )), M(KC_F4 ), M(KC_F5 ), M(KC_F6 ), S(M(KC_F6 )),\ | ||
74 | S(M(KC_F1 )), S(M(KC_F2 )), M(KC_F1 ), M(KC_F2 ), M(KC_F3 ), S(M(KC_F3 )),\ | ||
75 | S(M(KC_F10)), S(M(KC_F11)), M(KC_F10), M(KC_F11), M(KC_F12), S(M(KC_F12))), | ||
76 | |||
77 | #define MC(kc) LCTL(kc) | ||
78 | #define MA(kc) LALT(kc) | ||
79 | #define MG(kc) LGUI(kc) | ||
52 | #define MSC(kc) LSFT(LCTL(kc)) | 80 | #define MSC(kc) LSFT(LCTL(kc)) |
53 | #define MSA(kc) LSFT(LALT(kc)) | ||
54 | #define MCA(kc) LCTL(LALT(kc)) | ||
55 | #define XX XXXXXXX | ||
56 | 81 | ||
57 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 82 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
58 | [LY_0000] = LAYOUT_planck_grid( | 83 | [LY_0000] = LAYOUT_ortho_4x12( |
59 | KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB, | 84 | KC_PGUP, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB, |
60 | KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, | 85 | KC_PGDN, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, STICK, |
61 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M, FN_A, FN_B, FN_C, XX, KC_LSFT, | 86 | KC_L2_0, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M, |
62 | XX,KC_F21,KC_F22,KC_ESC,KC_SPC,KC_F23,KC_F24,KC_LCTL,KC_LSFT,KC_LALT,FN_D,XX | 87 | KC_R2_1, KC_R2_2, KC_R2_3, KC_UP, KC_R2_5, |
88 | KC_L3_0, KC_L3_1, KC_L3_2, KC_ESCAPE, KC_BSPACE, KC_ENTER, | ||
89 | KC_R3_0, KC_R3_1, KC_PSCREEN, KC_LEFT, KC_DOWN, KC_RIGHT | ||
63 | ), | 90 | ), |
64 | [LY_1000] = LAYOUT_planck_grid( | 91 | [LY_1000] = LAYOUT_gunp( |
65 | UC(L'∃'), KC_SLSH, KC_RCBR, KC_RPRN, KC_RBRC, KC_GT, MFN_R1, | 92 | XXXXXXX, KC_PERC, KC_QUES, KC_EXLM, KC_GRV, XXXXXXX, |
66 | UC(L'∀'), KC_BSLS, KC_LCBR, KC_LPRN, KC_LBRC, KC_LT, MFN_R2, | 93 | XXXXXXX, KC_AT, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, |
67 | KC_AMPR, KC_PIPE, KC_AT, KC_TILD, KC_DLR, KC_CIRC, MFN_R3, | 94 | KC_L2_0, KC_DLR, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, |
68 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MFN_R4, | 95 | KC_L3_0, KC_L3_1, KC_L3_2, XXXXXXX, XXXXXXX, XXXXXXX |
69 | ), | 96 | ), |
70 | [LY_0010] = LAYOUT_planck_grid( | 97 | [LY_0010] = LAYOUT_gunp( |
71 | UC(L'×'), KC_ASTR, KC_QUES, KC_EXLM, KC_GRV, KC_HASH, MFN_R1, | 98 | XXXXXXX, KC_AMPR, KC_PIPE, KC_TILD, KC_CIRC, XXXXXXX, |
72 | UC(L'→'), KC_MINS, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, MFN_R2, | 99 | XXXXXXX, KC_LCBR, KC_LBRC, KC_LPRN, KC_LT, KC_SLSH, |
73 | UC(L'∘'), KC_PLUS, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, MFN_R3, | 100 | KC_L2_0, KC_RCBR, KC_RBRC, KC_RPRN, KC_GT, KC_BSLS, |
74 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MFN_R4, | 101 | KC_L3_0, KC_L3_1, KC_L3_2, XXXXXXX, XXXXXXX, XXXXXXX |
75 | ), | 102 | ), |
76 | [LY_1010] = LAYOUT_planck_grid( | 103 | [LY_1010] = LAYOUT_gunp( |
77 | UC(L'⊗'), UC(L'⊕'), KC_7, KC_8, KC_9, UC(L'┻'), MFN_R1, | 104 | XXXXXXX, KC_HASH, KC_7, KC_8, KC_9, XXXXXXX, |
78 | UC(L'⊚'), KC_0, KC_1, KC_2, KC_3, UC(L'┃'), MFN_R2, | 105 | XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_PLUS, |
79 | UC(L'┏'), UC(L'┓'), KC_4, KC_5, KC_6, UC(L'┳'), MFN_R3, | 106 | KC_L2_0, KC_0, KC_1, KC_2, KC_3, KC_MINS, |
80 | UC(L'┗'), UC(L'┛'), UC(L'┫'), UC(L'━'), UC(L'┣'), UC(L'╋'), MFN_R4 | 107 | KC_L3_0, KC_L3_1, KC_L3_2, XXXXXXX, XXXXXXX, XXXXXXX |
81 | ), | 108 | ), |
82 | [LY_0100] = LAYOUT_planck_grid( | 109 | [LY_0100] = LAYOUT_gunp( |
83 | KC_F13, KC_WSCH, KC_HOME, KC_UP, KC_END, KC_PGUP, MFN_R1, | 110 | XXXXXXX, MC(KC_G), KC_HOME, KC_UP, KC_END, MC(KC_UP), |
84 | KC_F14, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, MFN_R2, | 111 | XXXXXXX, KC_PGUP, KC_LEFT, KC_DOWN, KC_RIGHT, MC(KC_DOWN), |
85 | KC_F15, KC_WBAK, KC_WFWD, MC(KC_A), MC(KC_Z), MSC(KC_Z), MFN_R3, | 112 | XXXXXXX, KC_PGDN, MC(KC_S), MC(KC_A), MC(KC_Z), MSC(KC_Z), |
86 | KC_F16, MA(KC_LEFT), MC(KC_LEFT), MC(KC_F), MC(KC_RGHT),MA(KC_RGHT), MFN_R4, | 113 | XXXXXXX, XXXXXXX, MC(KC_LEFT), MC(KC_F), MC(KC_RIGHT), XXXXXXX |
87 | ), | 114 | ), |
88 | [LY_1100] = LAYOUT_planck_grid( | 115 | [LY_1100] = LAYOUT_gunp( |
89 | KC_F17, MC(KC_WSCH), S(KC_HOME), S(KC_UP), S(KC_END), MC(KC_PGUP), MFN_R1, | 116 | XXXXXXX, MSC(KC_G), S(KC_HOME), S(KC_UP), S(KC_END), MSC(KC_UP), |
90 | KC_F18, XXXXXXX, S(KC_LEFT), S(KC_DOWN),S(KC_RGHT), MC(KC_PGDN), MFN_R2, | 117 | XXXXXXX, S(KC_PGUP), S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), MSC(KC_DOWN), |
91 | KC_F19, MC(KC_S), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), MFN_R3, | 118 | XXXXXXX, S(KC_PGDN), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), |
92 | KC_F20, MCA(KC_LEFT),MSC(KC_LEFT),MCA(KC_F),MSC(KC_RGHT),MCA(KC_RGHT),MFN_R4, | 119 | XXXXXXX, XXXXXXX, MSC(KC_LEFT), MC(KC_R), MSC(KC_RIGHT), XXXXXXX |
93 | ), | 120 | ), |
94 | [LY_0110] = LAYOUT_planck_grid( | 121 | [LY_0110] = F1_F12_LAYER() |
95 | MC(KC_F1) ,MC(KC_F2) ,MC(KC_F3) ,MC(KC_F4) ,MC(KC_F5) ,MC(KC_F6) , MFN_R1, | 122 | [LY_1110] = F1_F12_LAYER(MG) |
96 | MC(KC_F7) ,MC(KC_F8) ,MC(KC_F9) ,MC(KC_F10),MC(KC_F11),MC(KC_F12), MFN_R2, | 123 | |
97 | MC(KC_F13),MC(KC_F14),MC(KC_F15),MC(KC_F16),MC(KC_F17),MC(KC_F18), MFN_R3, | 124 | [LY_0001] = LAYOUT_gunp( |
98 | MC(KC_F19),MC(KC_F20),MC(KC_F21),MC(KC_F22),MC(KC_F23),MC(KC_F24), MFN_R4 | 125 | MC(KC_H), MC(KC_0), MSC(KC_PGUP), KC_BRIU, MSC(KC_PGDN), KC_VOLU, |
126 | MSC(KC_T), MC(KC_PLUS), MC(KC_PGUP), KC_BRID, MC(KC_PGDN), KC_VOLD, | ||
127 | OSM(MOD_LSFT), MC(KC_MINS), MA(KC_LEFT), MC(KC_T), MA(KC_RIGHT), KC_MUTE, | ||
128 | OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), MC(KC_W), KC_DELETE, KC_APP | ||
99 | ), | 129 | ), |
100 | [LY_1110] = LAYOUT_planck_grid( | 130 | [LY_1101] = LAYOUT_gunp( |
101 | MG(KC_F1) ,MG(KC_F2) ,MG(KC_F3) ,MG(KC_F4) ,MG(KC_F5) ,MG(KC_F6) , MFN_R1, | 131 | SANDBOX, XXXXXXX, AU_TOG, KC_LOCK, RGB_TOG, RESET, |
102 | MG(KC_F7) ,MG(KC_F8) ,MG(KC_F9) ,MG(KC_F10),MG(KC_F11),MG(KC_F12), MFN_R2, | 132 | KC_WAKE, KC_CLCK, USER_NAME, USER_EMAIL, RGB_MOD, DEBUG, |
103 | MG(KC_F13),MG(KC_F14),MG(KC_F15),MG(KC_F16),MG(KC_F17),MG(KC_F18), MFN_R3, | 133 | KC_SLEP, KC_NLCK, DM_REC1, DM_PLY1, XXXXXXX, EEP_RST, |
104 | MG(KC_F19),MG(KC_F20),MG(KC_F21),MG(KC_F22),MG(KC_F23),MG(KC_F24), MFN_R4 | 134 | KC_PWR, KC_SLCK, DM_REC2, DM_PLY2, DM_RSTP, KC_INSERT |
105 | ), | 135 | ), |
106 | [LY_1111] = LAYOUT_planck_grid( | 136 | [LY_1111] = LAYOUT_gunp( |
107 | KC_MPRV, DYN_REC_STOP, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, MFN_R1, | 137 | KC_ACL1, KC_ACL0, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, |
108 | KC_CAPS, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, MFN_R2, | 138 | KC_ACL2, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, |
109 | KC_MNXT, DYN_MACRO_PLAY2, DYN_MACRO_PLAY1, KC_MPLY, KC_MRWD, KC_MFFD, MFN_R3, | 139 | KC_MPRV, KC_BTN5, KC_MRWD, KC_MPLY, KC_MFFD, KC_BTN3, |
110 | KC_MSTP, DYN_REC_START2, DYN_REC_START1, KC_BTN2, KC_BTN1, KC_BTN3, MFN_R4, | 140 | KC_MNXT, KC_BTN4, KC_PAUSE, KC_MSTP, KC_BTN1, KC_BTN2 |
111 | ), | 141 | ), |
112 | [LY_1101] = LAYOUT_planck_grid( | 142 | [LY_0111] = UNUSED_LAYER |
113 | XXXXXXX, MU_ON, MU_OFF, PRINT_ON, PRINT_OFF, DEBUG, MFN_R1, | 143 | [LY_1011] = UNUSED_LAYER |
114 | XXXXXXX, KC_APP, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, MFN_R2, | 144 | |
115 | XXXXXXX, KC_MAIL, S(KC_VOLD), KC_INS, S(KC_VOLU), KC_PSCR, MFN_R3, | 145 | [LY_1001] = UNUSED_LAYER |
116 | XXXXXXX, MUV_DE, MUV_IN, AU_ON, AU_OFF, RESET, MFN_R4, | 146 | [LY_0101] = UNUSED_LAYER |
147 | [LY_0011] = UNUSED_LAYER | ||
148 | |||
149 | /* mapping from US QWERTY to TH Kedmanee */ | ||
150 | [LY_THAI_A] = LAYOUT_gunp( | ||
151 | S(KC_G), KC_PIPE, KC_8, KC_COMM, S(KC_A), KC_QUES, | ||
152 | S(KC_I), KC_SCLN, KC_QUOT, KC_O, KC_I, KC_RBRC, | ||
153 | S(KC_P), S(KC_T), KC_M, KC_P, KC_EQL, KC_COLN, | ||
154 | KC_LT, S(KC_S), S(KC_R), KC_GT, KC_R, KC_A | ||
117 | ), | 155 | ), |
118 | [LY_0011] = LAYOUT_planck_grid( | 156 | [LY_THAI_B] = LAYOUT_gunp( |
119 | UC(L'็'), UC(L'์'), UC(L'่'), UC(L'้'), UC(L'๊'), UC(L'๋'), MFN_R1, | 157 | S(KC_N), S(KC_H), KC_J, KC_H, S(KC_U), S(KC_J), |
120 | UC(L'โ'), UC(L'แ'), UC(L'เ'), UC(L'า'), UC(L'ั'), UC(L'ะ'), MFN_R2, | 158 | S(KC_F), KC_C, KC_G, KC_K, KC_Y, KC_T, |
121 | UC(L'ไ'), UC(L'ใ'), UC(L'ิ'), UC(L'ี'), UC(L'ึ'), UC(L'ื'), MFN_R3, | 159 | KC_DOT, KC_W, KC_B, KC_U, KC_7, KC_N, |
122 | UC(L'ๅ'), UC(L'ฺ'), UC(L'ํ'), UC(L'ุ'), UC(L'ู'), UC(L'ำ'), MFN_R4, | 160 | KC_1, S(KC_B), S(KC_Y), KC_E, KC_6, KC_CIRC |
123 | ), | 161 | ), |
124 | [LY_1011] = LAYOUT_planck_grid( | 162 | [LY_THAI_C] = LAYOUT_gunp( |
125 | UC(L'ฐ'), UC(L'ฎ'), UC(L'ฏ'), UC(L'ฮ'), UC(L'ข'), UC(L'ฃ'), MFN_R1, | 163 | KC_4, KC_BSLS, KC_MINS, S(KC_V), S(KC_E), S(KC_D), |
126 | UC(L'ถ'), UC(L'ด'), UC(L'ต'), UC(L'อ'), UC(L'ก'), UC(L'จ'), MFN_R2, | 164 | KC_5, KC_0, KC_D, KC_V, KC_F, KC_9, |
127 | UC(L'ภ'), UC(L'บ'), UC(L'ป'), UC(L'ส'), UC(L'ห'), UC(L'ฉ'), MFN_R3, | 165 | S(KC_L), S(KC_K), KC_L, KC_S, KC_LBRC, KC_X, |
128 | UC(L'ฯ'), UC(L'ผ'), UC(L'ฝ'), UC(L'ศ'), UC(L'ษ'), UC(L'ๆ'), MFN_R4, | 166 | S(KC_O), KC_Q, KC_LCBR, S(KC_C), KC_Z, KC_SLSH |
129 | ), | 167 | ), |
130 | [LY_0111] = LAYOUT_planck_grid( | 168 | [LY_SANDBOX] = LAYOUT_ortho_4x12( |
131 | UC(L'ฒ'), UC(L'ฤ'), UC(L'ฦ'), UC(L'ม'), UC(L'ค'), UC(L'ฅ'), MFN_R1, | 169 | KC_LCBR, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_RCBR, |
132 | UC(L'ณ'), UC(L'ร'), UC(L'ล'), UC(L'น'), UC(L'ว'), UC(L'ง'), MFN_R2, | 170 | KC_LBRC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_RBRC, |
133 | UC(L'ญ'), UC(L'ช'), UC(L'ซ'), UC(L'ย'), UC(L'ท'), UC(L'ฑ'), MFN_R3, | 171 | KC_LPRN,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_M,KC_COMM,KC_DOT,KC_SCLN,KC_COLN,KC_RPRN, |
134 | UC(L'ฌ'), UC(L'ฬ'), UC(L'ฟ'), UC(L'พ'), UC(L'ธ'), UC(L'ฆ'), MFN_R4, | 172 | KC_LT , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GT |
135 | ), | 173 | ), |
136 | [LY_0001] = UNUSED_LAYER | 174 | [LY_STICK] = UNUSED_LAYER // as a gateway to other persistant layers |
137 | [LY_0101] = UNUSED_LAYER | ||
138 | [LY_1001] = UNUSED_LAYER | ||
139 | }; | 175 | }; |
140 | 176 | ||
141 | #ifdef AUDIO_ENABLE | 177 | #define NUM_LANGS 2 |
142 | float plover_song[][2] = SONG(PLOVER_SOUND); | 178 | #define LANG_ENG 0 |
143 | float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); | 179 | #define LANG_THAI 1 |
144 | #endif | 180 | |
181 | uint16_t cur_layer = LY_0000; | ||
182 | uint16_t cur_lang = LANG_ENG; | ||
183 | bool is_layer_persistant = false; | ||
184 | |||
185 | void change_layer(uint16_t new_layer) { | ||
186 | if(cur_layer != new_layer) { | ||
187 | layer_off(cur_layer); | ||
188 | layer_on(new_layer); | ||
189 | cur_layer = new_layer; | ||
190 | } | ||
191 | } | ||
192 | |||
193 | void change_lang(uint16_t lang) { | ||
194 | while(lang != cur_lang) { | ||
195 | SEND_STRING(SS_LGUI(" ")); | ||
196 | cur_lang = (cur_lang + 1) % NUM_LANGS; | ||
197 | } | ||
198 | } | ||
199 | |||
200 | void user_panic(void) { | ||
201 | SEND_STRING("Planck Keyboard: User Panic!"); | ||
202 | } | ||
203 | |||
204 | void update_env_thai(void) { | ||
205 | if(LY_THAI_A <= cur_layer && cur_layer <= LY_THAI_C) { | ||
206 | change_lang(LANG_THAI); | ||
207 | } else { | ||
208 | change_lang(LANG_ENG); | ||
209 | } | ||
210 | } | ||
211 | |||
212 | uint16_t get_persistant_layer_from_keycode(uint16_t keycode) { | ||
213 | switch(keycode) { | ||
214 | case FUNC_A: return LY_1000; | ||
215 | case FUNC_B: return LY_1010; | ||
216 | case FUNC_C: return LY_0010; | ||
217 | case FUNC_D: return LY_0000; | ||
218 | case LTHAI_A: return LY_THAI_A; | ||
219 | case LTHAI_B: return LY_THAI_B; | ||
220 | case LTHAI_C: return LY_THAI_C; | ||
221 | case LSW0110: return LY_0110; | ||
222 | case LSW1111: return LY_1111; | ||
223 | case LSW0100: return LY_0100; | ||
224 | } | ||
225 | return 0; // this line is unreachable but be here to make the complier happy | ||
226 | } | ||
227 | |||
228 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
229 | |||
230 | if(!is_layer_persistant && FUNC_A <= keycode && keycode <= FUNC_D) { | ||
231 | uint16_t mask = 1 << (3 - (keycode - FUNC_A)); | ||
232 | uint16_t cur_layer_code = cur_layer - LY_0000; | ||
233 | if(!(LY_0000 <= cur_layer && cur_layer <= LY_1111)) | ||
234 | user_panic(); | ||
235 | if(!(cur_layer_code & mask) == record->event.pressed) | ||
236 | change_layer((mask ^ cur_layer_code) + LY_0000); | ||
237 | return false; | ||
238 | } | ||
239 | |||
240 | if(!(record->event.pressed)) | ||
241 | return !(MIN_KC <= keycode && keycode <= MAX_KC); | ||
242 | |||
243 | switch(keycode) { | ||
244 | case USER_NAME: | ||
245 | SEND_STRING("Gun Pinyo"); | ||
246 | return false; | ||
145 | 247 | ||
146 | uint16_t cur_layer_code = 0; | 248 | case USER_EMAIL: |
249 | SEND_STRING("gunpinyo@gmail.com"); | ||
250 | return false; | ||
251 | |||
252 | case SANDBOX: | ||
253 | case STICK: | ||
254 | change_layer(keycode == STICK ? LY_STICK : LY_SANDBOX); | ||
255 | change_lang(LANG_ENG); | ||
256 | is_layer_persistant = true; | ||
257 | return false; | ||
258 | |||
259 | case FUNC_A: case FUNC_B: case FUNC_C: case FUNC_D: | ||
260 | case LTHAI_A: case LTHAI_B: case LTHAI_C: | ||
261 | case LSW0110: case LSW1111: case LSW0100: | ||
262 | if(is_layer_persistant) { | ||
263 | change_layer(get_persistant_layer_from_keycode(keycode)); | ||
264 | update_env_thai(); | ||
265 | // `FUNC_D` resets the layer configuration when `is_layer_persistant` | ||
266 | is_layer_persistant = keycode != FUNC_D; | ||
267 | if(!is_layer_persistant) { | ||
268 | clear_keyboard(); | ||
269 | layer_clear(); | ||
270 | } | ||
271 | } | ||
272 | return false; | ||
273 | } | ||
274 | return true; | ||
275 | } | ||
276 | |||
277 | #ifdef RGB_MATRIX_ENABLE | ||
278 | void rgb_matrix_indicators_kb(void) { | ||
279 | // `42` is the index of the middle light at the bottom row (in planck light) | ||
280 | // it is disabled because it does not have a cover, hence irritates my eyes | ||
281 | rgb_matrix_set_color(42, 0, 0, 0); | ||
282 | } | ||
283 | #endif | ||
147 | 284 | ||
148 | #ifdef AUDIO_ENABLE | 285 | #ifdef AUDIO_ENABLE |
286 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
287 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
288 | |||
289 | float tone_ly_normal[][2] = SONG(QWERTY_SOUND); | ||
290 | float tone_ly_spacial[][2] = SONG(DVORAK_SOUND); | ||
149 | 291 | ||
150 | float tone_startup[][2] = SONG(STARTUP_SOUND); | 292 | float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); |
151 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
152 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
153 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
154 | float tone_plover[][2] = SONG(PLOVER_SOUND); | ||
155 | float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); | ||
156 | float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); | ||
157 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
158 | #endif | 293 | #endif |
159 | 294 | ||
160 | void startup_user() { | 295 | void startup_user() { |
161 | _delay_ms(20); // gets rid of tick | ||
162 | set_unicode_input_mode(UC_LNX); | ||
163 | #ifdef AUDIO_ENABLE | 296 | #ifdef AUDIO_ENABLE |
164 | PLAY_SONG(tone_startup); | 297 | PLAY_SONG(tone_startup); |
165 | #endif | 298 | #endif |
@@ -168,22 +301,6 @@ void startup_user() { | |||
168 | void shutdown_user() { | 301 | void shutdown_user() { |
169 | #ifdef AUDIO_ENABLE | 302 | #ifdef AUDIO_ENABLE |
170 | PLAY_SONG(tone_goodbye); | 303 | PLAY_SONG(tone_goodbye); |
171 | _delay_ms(150); | ||
172 | stop_all_notes(); | 304 | stop_all_notes(); |
173 | #endif | 305 | #endif |
174 | } | 306 | } |
175 | |||
176 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
177 | uint16_t mask = 1 << (3 - (keycode - FN_A)); | ||
178 | if (!process_record_dynamic_macro(keycode, record)) | ||
179 | return false; | ||
180 | if(FN_A <= keycode && keycode <= FN_D) { | ||
181 | if(!(cur_layer_code & mask) == record->event.pressed) { | ||
182 | layer_off(cur_layer_code + LY_0000); | ||
183 | cur_layer_code ^= mask; | ||
184 | layer_on(cur_layer_code + LY_0000); | ||
185 | } | ||
186 | return false; | ||
187 | } | ||
188 | return true; | ||
189 | } | ||
diff --git a/keyboards/planck/keymaps/gunp/readme.md b/keyboards/planck/keymaps/gunp/readme.md index aef41bef6..ea20f6ac2 100644 --- a/keyboards/planck/keymaps/gunp/readme.md +++ b/keyboards/planck/keymaps/gunp/readme.md | |||
@@ -1,24 +1,78 @@ | |||
1 | # GunP Planck Layout | 1 |  |
2 | ## TODO: | 2 | |
3 | - fix the problem between builtin dynamic macros | 3 | # gunp layout for Planck keyboards |
4 | and my custom layout switching mechanism. | 4 | |
5 | - implement Thai layers. | 5 | * Layout Maintainer: [Gun Pinyo](https://github.com/gunpinyo) |
6 | ``` | 6 | |
7 | {8| Gun Pinyo |8} "with no modifiers or with Shift" {8| Gun Pinyo |8} | 7 | This is my personal layout for Planck keyboards. Almost all of important |
8 | {0| Del | Q | W | F | P | G | J | L | U | Y | K | Tab |0} | 8 | information is already in the picture of the cheat sheet above. There is also a |
9 | {0|BkSpc| A | R | S | T | D | H | N | E | I | O |Enter|0} | 9 | text-version of this cheat sheet at the end of this readme file. If both of them |
10 | {0|Shift| Z | X | C | V | B | M |FN_A |FN_B |FN_C |FN_D |Shift|0} | 10 | are not the same, then please trust the text-version more because the picture is |
11 | {0| XXX | F21 | F22 | Esc |Space| F23 | F24 | Ctr |Shift| Alt | Gui | XXX |0} | 11 | just a screenshot of the text. |
12 | 12 | ||
13 | {8| "with FN_A" |8} {8| "with FN_A, FN_C" |8} {8| "with FN_C" |8} | 13 | The base layer is `LY-0000`. Next, we custom keycodes called `FuncA`, `FuncB`, |
14 | {0| ∃ / } ) ] > |0} {0| ⊗ ⊕ 7 8 9 ┻ |0} {0| × * ? ! ` # |0} | 14 | `FuncC`, and `FuncD` (`FuncX` for short) which will switch to layout `LY-ABCD` |
15 | {0| ∀ \ { ( [ < |0} {0| ⊚ 0 1 2 3 ┃ |0} {0| → - , .\' = |0} | 15 | depending on the binary state of each `FuncX` where the corresponded binary |
16 | {0| & | @ ~ $ ^ |0} {0| ┏ ┓ 4 5 6 ┳ |0} {0| ∘ + ; :\" _ |0} | 16 | digit is a boolean "keycode `FuncX` is currently being pressed". This mechanism |
17 | {0| F1 ..... F6 |0} {0| ┗ ┛ ┫ ━ ┣ ╋ |0} {0| F7 .... F12 |0} | 17 | allows us to access up to 16 different layers, however, only some of them have |
18 | 18 | been used. A layer matches regex `LY-....` is currently used if and only if the | |
19 | {8| "with FN_ACD" |8} {8| "with FN_CD" |8} {8| "with FN_BCD" |8} | 19 | cheat sheet mentions it. |
20 | {0| ฐ ฎ ฏ ฮ ข ฃ |0} {0| ็ ์ ่ ้ ๊ ๋ |0} {0| ฒ ฤ ฦ ม ค ฅ |0} | 20 | |
21 | {0| ถ ด ต อ ก จ |0} {0| โ แ เ า ั ะ |0} {0| ณ ร ล น ว ง |0} | 21 | Once each of these non-based layers activates (by a combination of `FuncX` |
22 | {0| ภ บ ป ส ห ฉ |0} {0| ไ ใ ิ ี ึ ื |0} {0| ญ ช ซ ย ท ฑ |0} | 22 | keycodes): |
23 | {0| ฯ ผ ฝ ศ ษ ๆ |0} {0| ๅ ฺ ํ ุ ู ำ |0} {0| ฌ ฬ ฟ พ ธ ฆ |0} | 23 | - the left-half (rows 0-3, columns 0-5) will switch according to its |
24 | individual keymap on cheat sheet, | ||
25 | - the right-half (rows 0-3, columns 6-11) will switch to the `RIGHT-HALF` | ||
26 | keymap such that keycodes that matches the regex `(L....|Thai[ABC])` are | ||
27 | disabled and (partially) being replaced by `FuncX` keycodes on the same | ||
28 | position of the base layer and keycodes in binary numbers there are | ||
29 | disabled. | ||
30 | |||
31 | Another keycode in the base layer is `Stick`. When it is press, the rules of | ||
32 | keyboard change into persistent mode. Here, the right-half is exactly the | ||
33 | `RIGHT-HALF` keymap in the cheat sheet. Keycodes in left-half are all no-op | ||
34 | initially and can be changed to other layers by tapping on the corresponded | ||
35 | keycodes `(L....|Thai[ABC])`. To switch back to the normal rules governed by | ||
36 | `FuncX` press a `Relax` keycode. | ||
37 | |||
38 | Remark: | ||
39 | - Layers `LY-Thai[ABC]` are only accessible via persistent mode. | ||
40 | - This layout doesn't employ any transparent keycode, therefore, empty | ||
41 | keycodes (including dummy keycodes `XXX`) are all no-op. | ||
42 | - Prefixes `S-`, `C-`, `A-`, and `G-` are combinators for `sft-🠜`, `ctl-🠜`, | ||
43 | `alt-🠜`, and `gui-🠜`, respectively. | ||
44 | - All keycodes that starts with a capital letter are custom keycodes. Except | ||
45 | single letters which stand for their alphabet. | ||
46 | - There is a conflict with dynamic macro (QMK's feature) with my layer | ||
47 | switching mechanisms, so I disable it but keep its keycodes there for later | ||
48 | implementation. | ||
49 | |||
50 | ``` | ||
51 | {H| "LY-0000": base-layer -- "`[🠝]` here becomes `FuncD` in other layers" |H} {H| "RIGHT-HALF": "when `Stick` is on" |H} | ||
52 | {8| pgup| Q | W | F | P | G | J | L | U | Y | K | tab |8} {8| L0110| [🠜] |bkspc| [🠞] | XXX | XXX |8} | ||
53 | {8| pgdn| A | R | S | T | D | H | N | E | I | O |Stick|8} {8| L1111|ThaiA|ThaiB|ThaiC| XXX | XXX |8} | ||
54 | {8|sft-🠜| Z | X | C | V | B | M |FuncA|FuncB|FuncC| [🠝] |sft-🠞|8} {8| L0100|L1000|L1010|L0010|Relax|sft-🠞 |8} | ||
55 | {8|ctl-🠜|alt-🠜|gui-🠜| esc |bkspc|enter|FuncD|space|print| [🠜] | [🠟] | [🠞] |8} {8| Relax|space|enter|gui-🠞|alt-🠞|ctl-🠞 |8} | ||
56 | |||
57 | {H| "LY-0100": "col0 as no-op" |H} {H| "LY-1101" -- "Email: gunpinyo@gmail.com" |H} {x| "LY-0110" -- "gunpinyo" |x} | ||
58 | {8| C-G home [🠝] end C-[🠝] |8} {8| Sandbox XXX AudTog KeyLock RgbTog QmkReset |8} {✜| S-f7 S-f8 f7 f8 f9 S-f9 |✜} | ||
59 | {8| pgup [🠜] [🠟] [🠞] C-[🠟] |8} {8| wake caplock MyName Email RgbMod QmkDebug |8} {✜| S-f4 S-f5 f4 f5 f6 S-f6 |✜} | ||
60 | {8| pgdn C-S C-A C-Z SC-Z |8} {8| sleep numlock DmRec1 DmPlay1 XXX QmkEepRst |8} {✜| S-f1 S-f2 f1 f2 f3 S-f3 |✜} | ||
61 | {8| C-[🠜] C-F C-[🠞] |8} {8| power scrlock DmRec2 DmPlay2 DmStop insert |8} {✜|S-f10 S-f11 f10f11f12 S-f12|✜} | ||
62 | |||
63 | {8| "LY-1000" |8} {8| "LY-1010" |8} {8| "LY-0010" |8} {H| "LY-1111" - "powered by QMK firmware" |H} | ||
64 | {H| % ? ! ` |H} {H| # 7 8 9 |H} {H| & | ~ ^ |H} {8| msAC1 msAC0 scr-🠜 mov-🠝 scr-🠞 scr-🠝 |8} | ||
65 | {H| @ , . ' = |H} {H| * 4 5 6 + |H} {H| { [ ( < / |H} {8| msAC2 XXX mov-🠜 mov-🠟 mov-🠞 scr-🠟 |8} | ||
66 | {H| $ ; : \" _ |H} {H| 0 1 2 3 - |H} {H| } ] ) > \ |H} {8| mPrev btn-🠝 mRWD mPlay mFFD btn-✜ |8} | ||
67 | {8| mNext btn-🠟 pause mStop btn-🠜 btn-🠞 |8} | ||
68 | 1. evdev pc105 (US: qwerty, TH: kedmanee) 5. "LY-1110" is `G-`+"LY-0110" | ||
69 | 2. `G-space` is used to switch XKB layout 6. "LY-1100" is `S-`+"LY-0100" except [C-S, C-A, C-Z, SC-Z, C-F] which become | ||
70 | 3. when `Stick` is off, layer switchers other than `FuncX` are disabled [C-X, C-C, C-V, C-L, C-R] respectively | ||
71 | 4. ["LY-1000", "LY-1010", "LY-0010"] omit col0 and row3, but they have all `mod-🠜` from the base-layer, the rest are no-op | ||
72 | |||
73 | {H| "LY-0001" -- "`mod#🠜` is oneshot-mod" |H} {8| "LY-ThaiA" |8} {8| "LY-ThaiB" |8} {8| "LY-ThaiC" |8} | ||
74 | {8| C-H C-0 SC-pgup bri-🠝 SC-pgdn vol-🠝 |8} {H| ฌ ฅ ค ม ฤ ฦ |H} {H| ์ ็ ่ ้ ๊ ๋ |H} {H| ภ ฃ ข ฮ ฎ ฏ |H} | ||
75 | {8| SC-T C-[+] C-pgup bri-🠟 C-pgdn vol-🠟 |8} {H| ณ ว ง น ร ล |H} {H| โ แ เ า ั ะ |H} {H| ถ จ ก อ ด ต |H} | ||
76 | {8| sft#🠜 C-[-] A-[🠜] C-T A-[🠞] vol-✜ |8} {H| ญ ธ ท ย ชซ |H} {H| ใ ไ ิ ี ึ ื |H} {H| ศ ษ ส ห บ ป |H} | ||
77 | {8| ctl#🠜 alt#🠜 gui#🠜 C-W delete menu |8} {H| ฒ ฆ ฑ ฬ พฟ |H} {H| ๅ ฺ ํ ำ ุ ู |H} {H| ฯ ๆ ฐ ฉ ผ ฝ |H} | ||
24 | ``` | 78 | ``` |
diff --git a/keyboards/planck/keymaps/gunp/rules.mk b/keyboards/planck/keymaps/gunp/rules.mk index ec69d6e78..fa936c03d 100644 --- a/keyboards/planck/keymaps/gunp/rules.mk +++ b/keyboards/planck/keymaps/gunp/rules.mk | |||
@@ -1,20 +1,18 @@ | |||
1 | # Build Options | 1 | # Build Options |
2 | # change to "no" to disable the options, or define them in the Makefile in | 2 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration |
3 | # the appropriate keymap folder that will get included automatically | 3 | MOUSEKEY_ENABLE = yes # Mouse keys |
4 | # | 4 | EXTRAKEY_ENABLE = yes # Audio control and System control |
5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 5 | CONSOLE_ENABLE = yes # Console for debug |
6 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | 6 | COMMAND_ENABLE = no # Commands for debug and configuration |
7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
8 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
9 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
12 | MIDI_ENABLE = no # MIDI controls | ||
13 | AUDIO_ENABLE = yes # Audio output on port C6 | ||
14 | UNICODE_ENABLE = yes # Unicode | ||
15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
16 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | ||
17 | |||
18 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 7 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
19 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 8 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
9 | # if NKRO_ENABLE doesn't work, see here: | ||
10 | # https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
11 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
13 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
14 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
15 | AUDIO_ENABLE = yes # Audio output | ||
20 | 16 | ||
17 | KEY_LOCK_ENABLE = yes | ||
18 | DEBOUNCE_TYPE = sym_defer_pk | ||
diff --git a/keyboards/planck/keymaps/gunp/upload-and-make.sh b/keyboards/planck/keymaps/gunp/upload-and-make.sh deleted file mode 100755 index fd8f34c82..000000000 --- a/keyboards/planck/keymaps/gunp/upload-and-make.sh +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | pushd ~/git-repos/qmk_firmware/ | ||
4 | rm -rf keyboards/planck/keymaps/gunp/ | ||
5 | cp -rf ~/Documents/qmk-planck/ keyboards/planck/keymaps/gunp/ | ||
6 | if [[ $1 == "dfu" ]]; then | ||
7 | # sudo dfu-programmer atmega32u4 erase --force | ||
8 | # sudo dfu-programmer atmega32u4 flash .build/planck_rev4_gunp.hex | ||
9 | # sudo dfu-programmer atmega32u4 reset | ||
10 | sudo make planck/rev4:gunp:dfu | ||
11 | # bash ~/bin/gunp-kb-layout-reset | ||
12 | else | ||
13 | make planck/rev4:gunp:clean | ||
14 | make planck/rev4:gunp:all | ||
15 | fi | ||
16 | popd | ||