diff options
| author | Drashna Jaelre <drashna@live.com> | 2019-08-22 00:22:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-22 00:22:32 -0700 |
| commit | b5ee6c200c96df0b0e4557defdf3a61f70f5d260 (patch) | |
| tree | fdc6b617251617ccd891875934df196ff86c9f55 /quantum/keycode_config.c | |
| parent | 8a2e328a33efd9479d5176ed959ade725b62d9b0 (diff) | |
| download | qmk_firmware-b5ee6c200c96df0b0e4557defdf3a61f70f5d260.tar.gz qmk_firmware-b5ee6c200c96df0b0e4557defdf3a61f70f5d260.zip | |
Fixup Bootmagic code (#6386)
Diffstat (limited to 'quantum/keycode_config.c')
| -rw-r--r-- | quantum/keycode_config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c index 73fe15861..bfd40d045 100644 --- a/quantum/keycode_config.c +++ b/quantum/keycode_config.c | |||
| @@ -18,6 +18,11 @@ | |||
| 18 | 18 | ||
| 19 | extern keymap_config_t keymap_config; | 19 | extern keymap_config_t keymap_config; |
| 20 | 20 | ||
| 21 | /** \brief keycode_config | ||
| 22 | * | ||
| 23 | * This function is used to check a specific keycode against the bootmagic config, | ||
| 24 | * and will return the corrected keycode, when appropriate. | ||
| 25 | */ | ||
| 21 | uint16_t keycode_config(uint16_t keycode) { | 26 | uint16_t keycode_config(uint16_t keycode) { |
| 22 | 27 | ||
| 23 | switch (keycode) { | 28 | switch (keycode) { |
| @@ -109,6 +114,12 @@ uint16_t keycode_config(uint16_t keycode) { | |||
| 109 | } | 114 | } |
| 110 | } | 115 | } |
| 111 | 116 | ||
| 117 | /** \brief mod_config | ||
| 118 | * | ||
| 119 | * This function checks the mods passed to it against the bootmagic config, | ||
| 120 | * and will remove or replace mods, based on that. | ||
| 121 | */ | ||
| 122 | |||
| 112 | uint8_t mod_config(uint8_t mod) { | 123 | uint8_t mod_config(uint8_t mod) { |
| 113 | if (keymap_config.swap_lalt_lgui) { | 124 | if (keymap_config.swap_lalt_lgui) { |
| 114 | if ((mod & MOD_RGUI) == MOD_LGUI) { | 125 | if ((mod & MOD_RGUI) == MOD_LGUI) { |
