diff options
author | Jack Humbert <jack.humb@gmail.com> | 2015-08-24 19:31:12 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2015-08-24 19:31:12 -0400 |
commit | cda23c754e4d16438e2b42d86b4ce9a1eadc03d7 (patch) | |
tree | e9a0a1a0c848f215abd3f00bdbd43951b07ea98a /keyboard/planck/keymap_common.c | |
parent | b8425e8b58db204e700589e6f37d647515d33034 (diff) |
midi working
Diffstat (limited to 'keyboard/planck/keymap_common.c')
-rw-r--r-- | keyboard/planck/keymap_common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/keyboard/planck/keymap_common.c b/keyboard/planck/keymap_common.c index 1ce4500973..886bfe23c4 100644 --- a/keyboard/planck/keymap_common.c +++ b/keyboard/planck/keymap_common.c @@ -23,6 +23,7 @@ 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" static action_t keycode_to_action(uint16_t keycode); @@ -69,9 +70,14 @@ action_t action_for_key(uint8_t layer, keypos_t key) } else if (keycode == RESET) { bootloader_jump(); return; - } else if (keycode > RESET) { - // MIDI + } else if (keycode == DEBUG) { + print("\nDEBUG: enabled.\n"); + debug_enable = true; return; + } else if (keycode >= 0x6000 && keycode < 0x7000) { + action_t action; + action.code = ACTION_FUNCTION_OPT(keycode & 0xFF, (keycode & 0x0F00) >> 8); + return action; } switch (keycode) { |