Remove magic bodges from via keymaps (#19890)

This commit is contained in:
Joel Challis
2023-02-22 01:15:18 +00:00
committed by GitHub
parent 26854f5940
commit 0512e286a6
28 changed files with 19 additions and 222 deletions

View File

@@ -43,22 +43,3 @@ void keyboard_post_init_kb(void) {
}
#endif
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) { return false; }
switch(keycode) {
case KC_LG:
if (record->event.pressed) {
process_magic(GUI_TOG, record);
}
return false;
case KC_MACOS:
if (record->event.pressed) {
process_magic(CG_TOGG, record);
}
return false;
default:
return true;
}
return true;
}

View File

@@ -57,18 +57,3 @@
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, K403, K404, K405, KC_NO, K407, K408, K409, K410, K411, K412, K413 } \
}
enum keyboard_keycodes {
#ifdef VIA_ENABLE
LOCK_GUI = USER00,
TOG_MACOS_KEYMAP,
NEW_SAFE_RANGE = SAFE_RANGE // Important!
#else
LOCK_GUI = SAFE_RANGE,
TOG_MACOS_KEYMAP,
NEW_SAFE_RANGE // Important!
#endif
};
#define KC_LG LOCK_GUI
#define KC_MACOS TOG_MACOS_KEYMAP