summaryrefslogtreecommitdiff
path: root/keyboards/hadron
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-11-23 13:35:34 +0000
committerGitHub <noreply@github.com>2024-11-23 13:35:34 +0000
commite4e015c0c80ca59d329e1343ee7803250b7e60fe (patch)
tree35fda543ce80327a2b79bdc522a4ebebed1a0729 /keyboards/hadron
parent4a5bae51cd1f2cbca0ab8c8ae6e15262f8dc5a68 (diff)
Update keymaps to use PDF keycode (#24633)
Diffstat (limited to 'keyboards/hadron')
-rw-r--r--keyboards/hadron/ver2/keymaps/default/keymap.c20
-rw-r--r--keyboards/hadron/ver2/keymaps/side_numpad/keymap.c15
-rw-r--r--keyboards/hadron/ver3/keymaps/default/keymap.c21
3 files changed, 12 insertions, 44 deletions
diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c
index 65d6ef91f9..951cacb423 100644
--- a/keyboards/hadron/ver2/keymaps/default/keymap.c
+++ b/keyboards/hadron/ver2/keymaps/default/keymap.c
@@ -16,10 +16,7 @@ extern rgblight_config_t rgblight_config;
16#define _ADJUST 6 16#define _ADJUST 6
17 17
18enum preonic_keycodes { 18enum preonic_keycodes {
19 QWERTY = SAFE_RANGE, 19 LOWER = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE, 20 RAISE,
24 BACKLIT, 21 BACKLIT,
25 RGBLED_TOGGLE, 22 RGBLED_TOGGLE,
@@ -42,6 +39,9 @@ enum preonic_keycodes {
42#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor 39#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
43#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise 40#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
44 41
42#define QWERTY PDF(_QWERTY)
43#define COLEMAK PDF(_COLEMAK)
44#define DVORAK PDF(_DVORAK)
45 45
46const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 46const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47 47
@@ -213,18 +213,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
213 213
214bool process_record_user(uint16_t keycode, keyrecord_t *record) { 214bool process_record_user(uint16_t keycode, keyrecord_t *record) {
215 switch (keycode) { 215 switch (keycode) {
216 case QWERTY:
217 if (record->event.pressed) {
218 set_single_persistent_default_layer(_QWERTY);
219 }
220 return false;
221 break;
222 case COLEMAK:
223 if (record->event.pressed) {
224 set_single_persistent_default_layer(_COLEMAK);
225 }
226 return false;
227 break;
228 case LOWER: 216 case LOWER:
229 if (record->event.pressed) { 217 if (record->event.pressed) {
230 //not sure how to have keyboard check mode and set it to a variable, so my work around 218 //not sure how to have keyboard check mode and set it to a variable, so my work around
diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c
index a4a96b20b6..1e8523d94c 100644
--- a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c
+++ b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c
@@ -16,10 +16,7 @@ extern rgblight_config_t rgblight_config;
16#define _ADJUST 6 16#define _ADJUST 6
17 17
18enum preonic_keycodes { 18enum preonic_keycodes {
19 QWERTY = SAFE_RANGE, 19 LOWER = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE, 20 RAISE,
24 BACKLIT, 21 BACKLIT,
25 RGBLED_TOGGLE, 22 RGBLED_TOGGLE,
@@ -181,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
181 * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. 178 * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
182 * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | | | | 179 * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | | | |
183 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| 180 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
184 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | | | | 181 * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | | | |
185 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| 182 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
186 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | BL + |BL ST |BLSTEP| BL TG| | | | 183 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | BL + |BL ST |BLSTEP| BL TG| | | |
187 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| 184 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
@@ -191,7 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
191[_ADJUST] = LAYOUT( 188[_ADJUST] = LAYOUT(
192 QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, 189 QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
193 _______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, _______, _______, KC_DEL, _______, _______, _______, 190 _______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, _______, _______, KC_DEL, _______, _______, _______,
194 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, _______, _______, 191 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, _______, _______,
195 _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DOWN, BL_UP, BL_STEP, BL_TOGG, _______, _______, _______, 192 _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DOWN, BL_UP, BL_STEP, BL_TOGG, _______, _______, _______,
196 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 193 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
197) 194)
@@ -218,12 +215,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
218 215
219bool process_record_user(uint16_t keycode, keyrecord_t *record) { 216bool process_record_user(uint16_t keycode, keyrecord_t *record) {
220 switch (keycode) { 217 switch (keycode) {
221 case QWERTY:
222 if (record->event.pressed) {
223 set_single_persistent_default_layer(_QWERTY);
224 }
225 return false;
226 break;
227 case LOWER: 218 case LOWER:
228 if (record->event.pressed) { 219 if (record->event.pressed) {
229 //not sure how to have keyboard check mode and set it to a variable, so my work around 220 //not sure how to have keyboard check mode and set it to a variable, so my work around
diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c
index d130745dc6..1e3f3191c2 100644
--- a/keyboards/hadron/ver3/keymaps/default/keymap.c
+++ b/keyboards/hadron/ver3/keymaps/default/keymap.c
@@ -13,10 +13,7 @@
13#define _ADJUST 6 13#define _ADJUST 6
14 14
15enum preonic_keycodes { 15enum preonic_keycodes {
16 QWERTY = SAFE_RANGE, 16 LOWER = SAFE_RANGE,
17 COLEMAK,
18 DVORAK,
19 LOWER,
20 RAISE, 17 RAISE,
21 BACKLIT, 18 BACKLIT,
22 RGBLED_TOGGLE, 19 RGBLED_TOGGLE,
@@ -39,6 +36,10 @@ enum preonic_keycodes {
39#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor 36#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
40#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise 37#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
41 38
39#define QWERTY PDF(_QWERTY)
40#define COLEMAK PDF(_COLEMAK)
41#define DVORAK PDF(_DVORAK)
42
42const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 43const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
43 44
44/* Qwerty 45/* Qwerty
@@ -200,18 +201,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
200 201
201bool process_record_user(uint16_t keycode, keyrecord_t *record) { 202bool process_record_user(uint16_t keycode, keyrecord_t *record) {
202 switch (keycode) { 203 switch (keycode) {
203 case QWERTY:
204 if (record->event.pressed) {
205 set_single_persistent_default_layer(_QWERTY);
206 }
207 return false;
208 break;
209 case COLEMAK:
210 if (record->event.pressed) {
211 set_single_persistent_default_layer(_COLEMAK);
212 }
213 return false;
214 break;
215 case LOWER: 204 case LOWER:
216 if (record->event.pressed) { 205 if (record->event.pressed) {
217 //not sure how to have keyboard check mode and set it to a variable, so my work around 206 //not sure how to have keyboard check mode and set it to a variable, so my work around