diff options
author | Tobias Matt <[email protected]> | 2016-05-13 10:08:29 +0200 |
---|---|---|
committer | Tobias Matt <[email protected]> | 2016-05-13 10:08:29 +0200 |
commit | 65645fb8cad05307b9faf9a897eefd5ae8c46dad (patch) | |
tree | c522c0cd320c4930b7532d892c0831b148c98e93 /quantum/keymap_common.c | |
parent | 4122ad3f7b0e0dc1083a54b51430c8d7207d74ef (diff) | |
parent | 69f05e1afd2e046938209e00db62d18efead4932 (diff) | |
download | qmk_firmware-65645fb8cad05307b9faf9a897eefd5ae8c46dad.tar.gz qmk_firmware-65645fb8cad05307b9faf9a897eefd5ae8c46dad.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r-- | quantum/keymap_common.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 4b4bd62109..8f00f9cc32 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -24,10 +24,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "action_macro.h" #include "debug.h" #include "backlight.h" -#include "keymap_midi.h" #include "bootloader.h" #include "eeconfig.h" +#ifdef MIDI_ENABLE + #include "keymap_midi.h" +#endif + + extern keymap_config_t keymap_config; #include <stdio.h> @@ -268,6 +272,14 @@ static action_t keycode_to_action(uint16_t keycode) // Set default layer int layer = keycode & 0xFF; action.code = ACTION_LAYER_TOGGLE(layer); + } else if (type == 0x5) { + // OSL(layer) - One-shot layer + int layer = keycode & 0xFF; + action.code = ACTION_LAYER_ONESHOT(layer); + } else if (type == 0x6) { + // OSM(mod) - One-shot mod + int mod = keycode & 0xFF; + action.code = ACTION_MODS_ONESHOT(mod); } break; #ifdef MIDI_ENABLE |