From 9b46f4021e6c96ed4697924a90a8b2b6dd0b0acc Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 25 Aug 2015 17:06:38 -0400 Subject: midi on planck --- keyboard/preonic/extended_keymaps/extended_keymap_lock.c | 2 +- keyboard/preonic/keymap_midi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboard/preonic') diff --git a/keyboard/preonic/extended_keymaps/extended_keymap_lock.c b/keyboard/preonic/extended_keymaps/extended_keymap_lock.c index 70d4551a75..8edf8a283d 100644 --- a/keyboard/preonic/extended_keymaps/extended_keymap_lock.c +++ b/keyboard/preonic/extended_keymaps/extended_keymap_lock.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { MIDI12 }, { MIDI12 }, { MIDI12 }, - {M(0), KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {M(0), KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), MIDI, MIDI, MIDI, MIDI} } }; diff --git a/keyboard/preonic/keymap_midi.c b/keyboard/preonic/keymap_midi.c index ec380fd9ca..c7937bb9b5 100644 --- a/keyboard/preonic/keymap_midi.c +++ b/keyboard/preonic/keymap_midi.c @@ -31,7 +31,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) } } - if (record->event.key.col == 11 && record->event.key.row == 4) { + if (record->event.key.col == 11 && record->event.key.row == 4 && record->event.pressed) { starting_note++; midi_send_cc(&midi_device, 0, 0x7B, 0); midi_send_cc(&midi_device, 1, 0x7B, 0); @@ -39,7 +39,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) midi_send_cc(&midi_device, 3, 0x7B, 0); midi_send_cc(&midi_device, 4, 0x7B, 0); } - if (record->event.key.col == 8 && record->event.key.row == 4) { + if (record->event.key.col == 8 && record->event.key.row == 4 && record->event.pressed) { starting_note--; midi_send_cc(&midi_device, 0, 0x7B, 0); midi_send_cc(&midi_device, 1, 0x7B, 0); -- cgit v1.2.3