Remove magic bodges from via keymaps (#19890)
This commit is contained in:
parent
26854f5940
commit
0512e286a6
|
@ -39,20 +39,14 @@ void led_init_ports(void) {
|
|||
|
||||
|
||||
#ifndef WINLOCK_DISABLED
|
||||
static bool win_key_locked = false;
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_TGUI:
|
||||
case GUI_TOG:
|
||||
if (record->event.pressed) {
|
||||
// Toggle GUI lock on key press
|
||||
win_key_locked = !win_key_locked;
|
||||
writePin(LED_WIN_LOCK_PIN, !win_key_locked);
|
||||
// Toggle LED on key press
|
||||
togglePin(LED_WIN_LOCK_PIN);
|
||||
}
|
||||
break;
|
||||
case KC_LGUI:
|
||||
if (win_key_locked) { return false; }
|
||||
break;
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
|
|
@ -25,22 +25,6 @@
|
|||
# include "galaxy.h"
|
||||
#endif
|
||||
|
||||
#ifndef WINLOCK_DISABLED
|
||||
// Define the TGUI key here so it is available in QMK configurator
|
||||
enum DGK6X_keycodes {
|
||||
#ifdef VIA_ENABLE
|
||||
KC_TGUI = USER00, // Toggle between GUI Lock or Unlock
|
||||
NEW_SAFE_RANGE = SAFE_RANGE
|
||||
#else
|
||||
KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock
|
||||
NEW_SAFE_RANGE
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef SAFE_RANGE
|
||||
#define SAFE_RANGE NEW_SAFE_RANGE
|
||||
#endif /* WINLOCK_DISABLED */
|
||||
|
||||
/* Function Prototype */
|
||||
void off_all_leds(void);
|
||||
void on_all_leds(void);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS"
|
||||
"KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_RMOD","RGB_MOD", "RGB_TOG",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS"
|
||||
"KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_RMOD","RGB_MOD", "RGB_TOG",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SCRL", "KC_PAUS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_INS", "KC_END", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS"
|
||||
"KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", "KC_TRNS",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SCRL", "KC_PAUS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_INS", "KC_END", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS"
|
||||
"KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", "KC_TRNS",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_INS", "KC_HOME", "KC_END", "KC_DEL",
|
||||
"KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT","KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_PGDN", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS"
|
||||
"KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_INS", "KC_HOME", "KC_END", "KC_DEL",
|
||||
"KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT","KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_PGDN", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS"
|
||||
"KC_TRNS", "GUI_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD",
|
||||
|
|
|
@ -53,20 +53,14 @@ void led_init_ports(void) {
|
|||
}
|
||||
|
||||
#ifndef WINLOCK_DISABLED
|
||||
static bool win_key_locked = false;
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_TGUI:
|
||||
case GUI_TOG:
|
||||
if (record->event.pressed) {
|
||||
// Toggle GUI lock on key press
|
||||
win_key_locked = !win_key_locked;
|
||||
writePin(LED_WIN_LOCK_PIN, !win_key_locked);
|
||||
// Toggle LED on key press
|
||||
togglePin(LED_WIN_LOCK_PIN);
|
||||
}
|
||||
break;
|
||||
case KC_LGUI:
|
||||
if (win_key_locked) { return false; }
|
||||
break;
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
|
|
@ -78,23 +78,6 @@
|
|||
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \
|
||||
}
|
||||
|
||||
|
||||
#ifndef WINLOCK_DISABLED
|
||||
// Define the TGUI key here so it is available in QMK configurator
|
||||
enum K3x0_keycodes {
|
||||
#ifdef VIA_ENABLE
|
||||
KC_TGUI = USER00, // Toggle between GUI Lock or Unlock
|
||||
NEW_SAFE_RANGE = SAFE_RANGE
|
||||
#else
|
||||
KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock
|
||||
NEW_SAFE_RANGE
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef SAFE_RANGE
|
||||
#define SAFE_RANGE NEW_SAFE_RANGE
|
||||
#endif /* WINLOCK_DISABLED */
|
||||
|
||||
/* Function Prototype */
|
||||
void off_all_leds(void);
|
||||
void on_all_leds(void);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "KC_TGUI", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
|
||||
"_______", "GUI_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
|
||||
]
|
||||
],
|
||||
"author": "tylert",
|
||||
|
|
|
@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
_______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[_LAYER3] = LAYOUT_all( /* Layer 3 */
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
|
|
@ -53,20 +53,14 @@ void led_init_ports(void) {
|
|||
}
|
||||
|
||||
#ifndef WINLOCK_DISABLED
|
||||
static bool win_key_locked = false;
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_TGUI:
|
||||
case GUI_TOG:
|
||||
if (record->event.pressed) {
|
||||
// Toggle GUI lock on key press
|
||||
win_key_locked = !win_key_locked;
|
||||
writePin(LED_WIN_LOCK_PIN, !win_key_locked);
|
||||
// Toggle LED on key press
|
||||
togglePin(LED_WIN_LOCK_PIN);
|
||||
}
|
||||
break;
|
||||
case KC_LGUI:
|
||||
if (win_key_locked) { return false; }
|
||||
break;
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
|
|
@ -75,23 +75,6 @@
|
|||
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \
|
||||
}
|
||||
|
||||
|
||||
#ifndef WINLOCK_DISABLED
|
||||
// Define the TGUI key here so it is available in QMK configurator
|
||||
enum K3x0_keycodes {
|
||||
#ifdef VIA_ENABLE
|
||||
KC_TGUI = USER00, // Toggle between GUI Lock or Unlock
|
||||
NEW_SAFE_RANGE = SAFE_RANGE
|
||||
#else
|
||||
KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock
|
||||
NEW_SAFE_RANGE
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef SAFE_RANGE
|
||||
#define SAFE_RANGE NEW_SAFE_RANGE
|
||||
#endif /* WINLOCK_DISABLED */
|
||||
|
||||
/* Function Prototype */
|
||||
void off_all_leds(void);
|
||||
void on_all_leds(void);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "KC_TGUI", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
|
||||
"_______", "GUI_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
|
||||
]
|
||||
],
|
||||
"author": "tylert",
|
||||
|
|
|
@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
_______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[_LAYER3] = LAYOUT_all( /* Layer 3 */
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -36,5 +36,3 @@
|
|||
#else
|
||||
#define URGB_K KC_TRNS
|
||||
#endif
|
||||
|
||||
#define LOCK_GUI KC_F23
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -85,5 +85,3 @@
|
|||
#else
|
||||
# define URGB_K KC_TRNS
|
||||
#endif
|
||||
|
||||
#define LOCK_GUI KC_F23
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue