diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 9728076d..a67f7362 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -222,6 +222,26 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) dprintf("midi modulation interval %d\n", midi_config.modulation_interval); } return false; + case MI_BENDD: + if (record->event.pressed) { + midi_send_pitchbend(&midi_device, midi_config.channel, -0x2000); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, -0x2000); + } + else { + midi_send_pitchbend(&midi_device, midi_config.channel, 0); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, 0); + } + return false; + case MI_BENDU: + if (record->event.pressed) { + midi_send_pitchbend(&midi_device, midi_config.channel, 0x1fff); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, 0x1fff); + } + else { + midi_send_pitchbend(&midi_device, midi_config.channel, 0); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, 0); + } + return false; }; return true; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 8122bfe7..d545440c 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -383,6 +383,9 @@ enum quantum_keycodes { MI_MOD, // modulation MI_MODSD, // decrease modulation speed MI_MODSU, // increase modulation speed + + MI_BENDD, // Bend down + MI_BENDU, // Bend up #endif // MIDI_ADVANCED // Backlight functionality