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

@@ -41,18 +41,6 @@ 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 LOCK_GUI:
process_magic(GUI_TOG, record);
return false;
default:
break;
}
return true;
}
void board_init(void) {
AFIO->MAPR |= AFIO_MAPR_TIM3_REMAP_PARTIALREMAP;
}

View File

@@ -30,13 +30,3 @@
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, KC_NO, K312, K313, K314 }, \
{ K400, K401, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, K409, K410, KC_NO, K412, K413, K414 } \
}
enum keyboard_keycodes {
#ifdef VIA_ENABLE
LOCK_GUI = USER00,
NEW_SAFE_RANGE = SAFE_RANGE // Important!
#else
LOCK_GUI = SAFE_RANGE,
NEW_SAFE_RANGE // Important!
#endif
};

View File

@@ -103,9 +103,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
eeconfig_update_kb(kb_cums.raw);
return false;
#endif
case LOCK_GUI:
process_magic(GUI_TOG, record);
return false;
default:
return true;
}

View File

@@ -36,5 +36,3 @@
#else
#define URGB_K KC_TRNS
#endif
#define LOCK_GUI KC_F23

View File

@@ -108,9 +108,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
eeconfig_update_kb(kb_cums.raw);
return false;
#endif
case LOCK_GUI:
process_magic(GUI_TOG, record);
return false;
default:
break;
}

View File

@@ -85,5 +85,3 @@
#else
# define URGB_K KC_TRNS
#endif
#define LOCK_GUI KC_F23

View File

@@ -14,22 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wave75.h"
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

@@ -32,18 +32,3 @@
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO }, \
{ K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, K509, K510, KC_NO, K512, K513, K514 } \
}
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

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

View File

@@ -37,23 +37,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

@@ -33,18 +33,3 @@
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, KC_NO, KC_NO, K416 }, \
{ K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, K507, K508, K509, K510, KC_NO, KC_NO, KC_NO, K514, K515, K516 } \
}
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