summaryrefslogtreecommitdiff
path: root/keyboard/planck/extended_keymaps
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2015-08-20 00:42:08 -0400
committerJack Humbert <jack.humb@gmail.com>2015-08-20 00:42:08 -0400
commite528087ee539fda2f13795d4a6c03403faef44d5 (patch)
tree6f80bd86bdd5e5a044deee9bb195c0ecc9bfd670 /keyboard/planck/extended_keymaps
parent2d76b5c3d421c984f6b4b9da757383cc87e3f808 (diff)
downloadqmk_firmware-e528087ee539fda2f13795d4a6c03403faef44d5.tar.gz
qmk_firmware-e528087ee539fda2f13795d4a6c03403faef44d5.zip
midi
Diffstat (limited to 'keyboard/planck/extended_keymaps')
-rw-r--r--keyboard/planck/extended_keymaps/extended_keymap_default.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/keyboard/planck/extended_keymaps/extended_keymap_default.c b/keyboard/planck/extended_keymaps/extended_keymap_default.c
index 1d5ac4321b..710611c3cb 100644
--- a/keyboard/planck/extended_keymaps/extended_keymap_default.c
+++ b/keyboard/planck/extended_keymaps/extended_keymap_default.c
@@ -1,5 +1,6 @@
#include "extended_keymap_common.h"
#include "backlight.h"
+#include "lufa.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = { /* Qwerty */
@@ -50,10 +51,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) {
case 0:
if (record->event.pressed) {
- register_code(KC_RSFT);
+ if (!&midi_device) {
+ register_code(KC_RSFT);
+ } else {
+ midi_send_noteon(&midi_device, 1, 64, 127);
+ }
backlight_step();
} else {
- unregister_code(KC_RSFT);
+ if (!&midi_device) {
+ unregister_code(KC_RSFT);
+ } else {
+ midi_send_noteoff(&midi_device, 1, 64, 127);
+ }
}
break;
}