diff options
author | David Rambo <davrambo@gmail.com> | 2021-07-02 22:30:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-02 22:30:32 -0700 |
commit | 170de06475c0b6c7a1a16bc6ac99f1994be17261 (patch) | |
tree | b5625d27581629bf0a0ee3babd2ad4f8b6e14cf1 /keyboards/preonic | |
parent | f51d929bd9dff0c11b2cca515d7a2f28fc5995d4 (diff) | |
download | qmk_firmware-170de06475c0b6c7a1a16bc6ac99f1994be17261.tar.gz qmk_firmware-170de06475c0b6c7a1a16bc6ac99f1994be17261.zip |
[Keymap] Update personal keymaps, add Corne keymap, and update non-kc LAYOUT for Iris (#12273)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/preonic')
-rw-r--r-- | keyboards/preonic/keymaps/davidrambo/config.h | 20 | ||||
-rwxr-xr-x | keyboards/preonic/keymaps/davidrambo/keymap.c | 179 | ||||
-rw-r--r-- | keyboards/preonic/keymaps/davidrambo/rules.mk | 3 |
3 files changed, 202 insertions, 0 deletions
diff --git a/keyboards/preonic/keymaps/davidrambo/config.h b/keyboards/preonic/keymaps/davidrambo/config.h new file mode 100644 index 000000000..c99ca8381 --- /dev/null +++ b/keyboards/preonic/keymaps/davidrambo/config.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* Copyright 2021 David Rambo | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #define TAPPING_TERM 200 | ||
20 | #define PERMISSIVE_HOLD | ||
diff --git a/keyboards/preonic/keymaps/davidrambo/keymap.c b/keyboards/preonic/keymaps/davidrambo/keymap.c new file mode 100755 index 000000000..322089d91 --- /dev/null +++ b/keyboards/preonic/keymaps/davidrambo/keymap.c | |||
@@ -0,0 +1,179 @@ | |||
1 | /* Copyright 2021 David Rambo | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | //aliases for clarity in layering | ||
20 | #define A_BSPC LALT(KC_BSPC) // delete whole word in Mac | ||
21 | #define C_BSPC LCTL(KC_BSPC) // delete whole word in PC | ||
22 | #define A_LEFT LALT(KC_LEFT) // move cursor whole word back in Mac | ||
23 | #define A_RGHT LALT(KC_RGHT) // move cursor whole word forward in Mac | ||
24 | #define C_RGHT LCTL(KC_RGHT) // move cursor whole word back in PC | ||
25 | #define C_LEFT LCTL(KC_LEFT) // move cursor whole word forward in PC | ||
26 | #define SftEnt SFT_T(KC_ENT) | ||
27 | #define BS_GUI LGUI_T(KC_BSPC) | ||
28 | #define BS_CTL LCTL_T(KC_BSPC) | ||
29 | #define RECT LCA_T(KC_DEL) // Ctrl+Alt is the basis for Rectangle WM | ||
30 | |||
31 | // internet browser tab shortcuts and window/application swapping for Mac and Win | ||
32 | #define GSL LGUI(S(KC_LEFT)) // back one tab in Safari | ||
33 | #define GSR LGUI(S(KC_RGHT)) // forward one tab in Safari | ||
34 | #define CTLPGUP LCTL(KC_PGUP) // back one tab on PC | ||
35 | #define CTLPGDN LCTL(KC_PGDN) // forward one tab on PC | ||
36 | #define G_TAB LGUI(KC_TAB) // Mac: switch applications | ||
37 | #define G_GRV LGUI(KC_GRV) // Mac: switch between windows within an application | ||
38 | #define A_TAB LALT(KC_TAB) | ||
39 | #define C_TAB LCTL(KC_TAB) | ||
40 | |||
41 | // navigKC_ation layers for both Mac OS X and Windows | ||
42 | #define NAVMAC LT(5, KC_ESC) | ||
43 | #define NAVPC LT(6, KC_ESC) | ||
44 | #define NAVQUD LT(7, KC_ESC) | ||
45 | |||
46 | enum custom_layers { | ||
47 | _COLEMAK, | ||
48 | _PC, | ||
49 | _QUD, | ||
50 | _GAME, | ||
51 | _SYMBOL, | ||
52 | _NAVMAC, | ||
53 | _NAVPC, | ||
54 | _NAVQUD, | ||
55 | } | ||
56 | |||
57 | //tapdance declarations | ||
58 | enum { | ||
59 | SFT_LCK | ||
60 | }; | ||
61 | |||
62 | #define SftLck TD(SFT_LCK) /* alias for tapdance */ | ||
63 | |||
64 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
65 | |||
66 | /* Colemak | ||
67 | * ,-----------------------------------------------------------------------------------. | ||
68 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
69 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
70 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | ||
71 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
72 | * | ESC` | A | R | S | T | D | H | N | E | I | O | " | | ||
73 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
74 | * |SftLck| Z | X | C | V | B | K | M | , | . | /? |SftEnt| | ||
75 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
76 | * | Del |PrnSc | GUI | Alt | Ctrl |BsGui | Space|Symbol| Left | Down | Up |Right | | ||
77 | * `-----------------------------------------------------------------------------------' | ||
78 | */ | ||
79 | |||
80 | [_COLEMAK] = LAYOUT_preonic_grid( | ||
81 | KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5 , KC_6, KC_7, KC_8, KC_9, KC_0, TG(1) , | ||
82 | KC_TAB , KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | ||
83 | NAVMAC , KC_A, KC_R, KC_S, KC_T, KC_D , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | ||
84 | SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt , | ||
85 | RECT , KC_RCTL, KC_LGUI, KC_LCTL, KC_LALT, BS_GUI, KC_SPC, MO(4), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
86 | ), | ||
87 | |||
88 | [_PC] = LAYOUT_preonic_grid( | ||
89 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(2) , | ||
90 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
91 | NAVPC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
92 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
93 | KC_DEL , KC_PSCR, KC_LCTL, KC_LALT, KC_LGUI, BS_CTL , KC_SPC , MO(4) , _______, _______, _______, _______ | ||
94 | ), | ||
95 | |||
96 | [_QUD] = LAYOUT_preonic_grid( | ||
97 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(3) , | ||
98 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
99 | NAVQUD , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
100 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
101 | KC_DEL , KC_PSCR, KC_LGUI, KC_LALT, KC_LCTL, NAVQUD , KC_SPC, MO(4) , _______, _______, _______, _______ | ||
102 | ), | ||
103 | |||
104 | [_GAME] = LAYOUT_preonic_grid( | ||
105 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(0) , | ||
106 | KC_TAB , KC_T , KC_Q , KC_W , KC_E , KC_R , KC_Y , KC_U , KC_I , KC_O , KC_P , _______, | ||
107 | KC_TAB , KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_H , KC_J , KC_K , KC_L , KC_SCLN, _______, | ||
108 | KC_LALT, KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_N , KC_M , _______, _______, _______, _______, | ||
109 | _______, _______, _______, KC_G , KC_B , KC_SPC , KC_I , MO(4) , _______, _______, _______, _______ | ||
110 | ), | ||
111 | |||
112 | /* Symbol | ||
113 | * ,-----------------------------------------------------------------------------------. | ||
114 | * | [ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ] | | ||
115 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
116 | * | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | =+ | | ||
117 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
118 | * | | Home | End | | Play | BRMD | BRMU | -_ |Pg Up | | / | | | ||
119 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
120 | * | `~ | | | | | | | |Pg Dn | Vol- | Vol+ | | | ||
121 | * `-----------------------------------------------------------------------------------' | ||
122 | */ | ||
123 | [_SYMBOL] = LAYOUT_preonic_grid( | ||
124 | KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , | ||
125 | KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC, | ||
126 | KC_BSLS, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL , | ||
127 | _______, KC_HOME, KC_END , KC_MNXT, KC_MPLY, KC_WH_L, KC_WH_R, KC_MINS, KC_PGUP, KC_WH_D, KC_WH_U, _______, | ||
128 | _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE | ||
129 | ), | ||
130 | |||
131 | /* Navigation*/ | ||
132 | |||
133 | [_NAVMAC] = LAYOUT_preonic_grid( | ||
134 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
135 | _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT , KC_UP , A_RGHT , KC_DEL , _______, | ||
136 | _______, _______, _______, _______, _______, _______,S(C_TAB), KC_LEFT, KC_DOWN, KC_RGHT, C_TAB , _______, | ||
137 | _______, _______, _______, _______, _______, _______, G_TAB , A_BSPC , KC_HOME, KC_END , G_GRV , _______, | ||
138 | RESET , _______, _______, _______, KC_RALT, _______, _______, _______, _______, _______, _______, _______ | ||
139 | ), | ||
140 | |||
141 | [_NAVPC] = LAYOUT_preonic_grid( | ||
142 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
143 | _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT , KC_UP , C_RGHT , KC_DEL , _______, | ||
144 | _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______, | ||
145 | _______, _______, _______, _______, _______, _______, A_TAB , C_BSPC , KC_HOME, KC_END , G_GRV , _______, | ||
146 | RESET , _______, _______, KC_RALT, _______, _______, _______, _______, _______, _______, _______, _______ | ||
147 | ), | ||
148 | |||
149 | [_NAVQUD] = LAYOUT_preonic_grid( | ||
150 | _______, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PAST, _______, _______, | ||
151 | _______, _______, _______, _______, _______, _______, _______, KC_P7 , KC_P8 , KC_P9 , _______, _______, | ||
152 | _______, _______, _______, _______, _______, _______, _______, KC_P4 , KC_P2 , KC_P6 , _______, _______, | ||
153 | _______, _______, _______, _______, _______, _______, _______, KC_P1 , KC_P5 , KC_P3 , _______, _______, | ||
154 | _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, KC_PPLS, _______, _______ | ||
155 | ) | ||
156 | }; | ||
157 | |||
158 | // Shift vs capslock function. From bbaserdem's Planck keymap. | ||
159 | void caps_tap (qk_tap_dance_state_t *state, void *user_data) { | ||
160 | if (state->count == 1) { | ||
161 | register_code (KC_LSFT); | ||
162 | } else if (state->count == 2) { | ||
163 | unregister_code (KC_LSFT); | ||
164 | register_code (KC_CAPS); | ||
165 | } | ||
166 | } | ||
167 | void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) { | ||
168 | if (state->count == 1) { | ||
169 | unregister_code (KC_LSFT); | ||
170 | } else { | ||
171 | unregister_code (KC_CAPS); | ||
172 | } | ||
173 | } | ||
174 | |||
175 | //Tap Dance Definitions | ||
176 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
177 | //Tap once for Shift, twice for Caps Lock | ||
178 | [SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end ) | ||
179 | }; | ||
diff --git a/keyboards/preonic/keymaps/davidrambo/rules.mk b/keyboards/preonic/keymaps/davidrambo/rules.mk new file mode 100644 index 000000000..6f0d3dc0b --- /dev/null +++ b/keyboards/preonic/keymaps/davidrambo/rules.mk | |||
@@ -0,0 +1,3 @@ | |||
1 | TAP_DANCE_ENABLE = yes | ||
2 | AUDIO_ENABLE = no | ||
3 | |||