mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-29 06:30:17 +00:00
Create AG_TOGG code to toggle Alt/Gui swap.
This commit is contained in:
parent
244e1c5a57
commit
a6d1db2c27
@ -57,6 +57,7 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
|||||||
|`MAGIC_UNNO_GUI` | |Enable the GUI keys |
|
|`MAGIC_UNNO_GUI` | |Enable the GUI keys |
|
||||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides (for macOS)|
|
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides (for macOS)|
|
||||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and Left GUI |
|
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and Left GUI |
|
||||||
|
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Left Alt and GUI swap |
|
||||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
||||||
|
@ -271,6 +271,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||||
|
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides|
|
||||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||||
|
|
||||||
## [Bluetooth](feature_bluetooth.md)
|
## [Bluetooth](feature_bluetooth.md)
|
||||||
|
@ -626,6 +626,17 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||||||
PLAY_SONG(ag_norm_song);
|
PLAY_SONG(ag_norm_song);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
case MAGIC_TOGGLE_ALT_GUI:
|
||||||
|
keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
|
||||||
|
keymap_config.swap_ralt_rgui = !keymap_config.swap_ralt_rgui;
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
if (keymap_config.swap_ralt_rgui) {
|
||||||
|
PLAY_SONG(ag_swap_song);
|
||||||
|
} else {
|
||||||
|
PLAY_SONG(ag_norm_song);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
case MAGIC_TOGGLE_NKRO:
|
case MAGIC_TOGGLE_NKRO:
|
||||||
keymap_config.nkro = !keymap_config.nkro;
|
keymap_config.nkro = !keymap_config.nkro;
|
||||||
break;
|
break;
|
||||||
|
@ -116,6 +116,7 @@ enum quantum_keycodes {
|
|||||||
MAGIC_UNHOST_NKRO,
|
MAGIC_UNHOST_NKRO,
|
||||||
MAGIC_UNSWAP_ALT_GUI,
|
MAGIC_UNSWAP_ALT_GUI,
|
||||||
MAGIC_TOGGLE_NKRO,
|
MAGIC_TOGGLE_NKRO,
|
||||||
|
MAGIC_TOGGLE_ALT_GUI,
|
||||||
GRAVE_ESC,
|
GRAVE_ESC,
|
||||||
|
|
||||||
// Leader key
|
// Leader key
|
||||||
@ -590,6 +591,7 @@ enum quantum_keycodes {
|
|||||||
|
|
||||||
#define AG_SWAP MAGIC_SWAP_ALT_GUI
|
#define AG_SWAP MAGIC_SWAP_ALT_GUI
|
||||||
#define AG_NORM MAGIC_UNSWAP_ALT_GUI
|
#define AG_NORM MAGIC_UNSWAP_ALT_GUI
|
||||||
|
#define AG_TOGG MAGIC_TOGGLE_ALT_GUI
|
||||||
|
|
||||||
// GOTO layer - 16 layers max
|
// GOTO layer - 16 layers max
|
||||||
// when:
|
// when:
|
||||||
|
Loading…
Reference in New Issue
Block a user