diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-05-05 21:50:51 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-05-05 21:50:51 -0400 |
commit | 41b3e399b1d43db9574c6016951d92974b3d93e7 (patch) | |
tree | df951653f16a38b0c847f0ba3750e74765e3aa54 /quantum/keymap_common.c | |
parent | 74e97eefd7ae76f9ddcb76890a30aa9038804cdb (diff) | |
download | qmk_firmware-41b3e399b1d43db9574c6016951d92974b3d93e7.tar.gz |
adds keycode shortcuts for OSL and OSM
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r-- | quantum/keymap_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 5e78d1157..8f00f9cc3 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -272,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 |