mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-09 01:39:12 +00:00
Create AG_TOGG code to toggle Alt/Gui swap.
This commit is contained in:
parent
244e1c5a57
commit
a6d1db2c27
4 changed files with 15 additions and 0 deletions
|
@ -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_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_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Left Alt and GUI swap |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`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_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`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 |
|
||||
|
||||
## [Bluetooth](feature_bluetooth.md)
|
||||
|
|
|
@ -626,6 +626,17 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||
PLAY_SONG(ag_norm_song);
|
||||
#endif
|
||||
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:
|
||||
keymap_config.nkro = !keymap_config.nkro;
|
||||
break;
|
||||
|
|
|
@ -116,6 +116,7 @@ enum quantum_keycodes {
|
|||
MAGIC_UNHOST_NKRO,
|
||||
MAGIC_UNSWAP_ALT_GUI,
|
||||
MAGIC_TOGGLE_NKRO,
|
||||
MAGIC_TOGGLE_ALT_GUI,
|
||||
GRAVE_ESC,
|
||||
|
||||
// Leader key
|
||||
|
@ -590,6 +591,7 @@ enum quantum_keycodes {
|
|||
|
||||
#define AG_SWAP MAGIC_SWAP_ALT_GUI
|
||||
#define AG_NORM MAGIC_UNSWAP_ALT_GUI
|
||||
#define AG_TOGG MAGIC_TOGGLE_ALT_GUI
|
||||
|
||||
// GOTO layer - 16 layers max
|
||||
// when:
|
||||
|
|
Loading…
Reference in a new issue