diff options
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/keycodes.h | 29 | ||||
-rw-r--r-- | quantum/process_keycode/process_sequencer.c | 24 | ||||
-rw-r--r-- | quantum/quantum_keycodes_legacy.h | 1 |
3 files changed, 32 insertions, 22 deletions
diff --git a/quantum/keycodes.h b/quantum/keycodes.h index 73b86ce9b9..36cec4eab8 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -494,15 +494,15 @@ enum qk_keycode_defines { QK_MIDI_MODULATION_SPEED_UP = 0x718D, QK_MIDI_PITCH_BEND_DOWN = 0x718E, QK_MIDI_PITCH_BEND_UP = 0x718F, - SQ_ON = 0x7200, - SQ_OFF = 0x7201, - SQ_TOG = 0x7202, - SQ_TMPD = 0x7203, - SQ_TMPU = 0x7204, - SQ_RESD = 0x7205, - SQ_RESU = 0x7206, - SQ_SALL = 0x7207, - SQ_SCLR = 0x7208, + QK_SEQUENCER_ON = 0x7200, + QK_SEQUENCER_OFF = 0x7201, + QK_SEQUENCER_TOGGLE = 0x7202, + QK_SEQUENCER_TEMPO_DOWN = 0x7203, + QK_SEQUENCER_TEMPO_UP = 0x7204, + QK_SEQUENCER_RESOLUTION_DOWN = 0x7205, + QK_SEQUENCER_RESOLUTION_UP = 0x7206, + QK_SEQUENCER_STEPS_ALL = 0x7207, + QK_SEQUENCER_STEPS_CLEAR = 0x7208, QK_JOYSTICK_BUTTON_0 = 0x7400, QK_JOYSTICK_BUTTON_1 = 0x7401, QK_JOYSTICK_BUTTON_2 = 0x7402, @@ -1085,6 +1085,15 @@ enum qk_keycode_defines { MI_MODU = QK_MIDI_MODULATION_SPEED_UP, MI_BNDD = QK_MIDI_PITCH_BEND_DOWN, MI_BNDU = QK_MIDI_PITCH_BEND_UP, + SQ_ON = QK_SEQUENCER_ON, + SQ_OFF = QK_SEQUENCER_OFF, + SQ_TOGG = QK_SEQUENCER_TOGGLE, + SQ_TMPD = QK_SEQUENCER_TEMPO_DOWN, + SQ_TMPU = QK_SEQUENCER_TEMPO_UP, + SQ_RESD = QK_SEQUENCER_RESOLUTION_DOWN, + SQ_RESU = QK_SEQUENCER_RESOLUTION_UP, + SQ_SALL = QK_SEQUENCER_STEPS_ALL, + SQ_SCLR = QK_SEQUENCER_STEPS_CLEAR, JS_0 = QK_JOYSTICK_BUTTON_0, JS_1 = QK_JOYSTICK_BUTTON_1, JS_2 = QK_JOYSTICK_BUTTON_2, @@ -1329,7 +1338,7 @@ enum qk_keycode_defines { #define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT) #define IS_MAGIC_KEYCODE(code) ((code) >= MAGIC_SWAP_CONTROL_CAPSLOCK && (code) <= MAGIC_TOGGLE_ESCAPE_CAPSLOCK) #define IS_MIDI_KEYCODE(code) ((code) >= QK_MIDI_ON && (code) <= QK_MIDI_PITCH_BEND_UP) -#define IS_SEQUENCER_KEYCODE(code) ((code) >= SQ_ON && (code) <= SQ_SCLR) +#define IS_SEQUENCER_KEYCODE(code) ((code) >= QK_SEQUENCER_ON && (code) <= QK_SEQUENCER_STEPS_CLEAR) #define IS_JOYSTICK_KEYCODE(code) ((code) >= QK_JOYSTICK_BUTTON_0 && (code) <= QK_JOYSTICK_BUTTON_31) #define IS_PROGRAMMABLE_BUTTON_KEYCODE(code) ((code) >= QK_PROGRAMMABLE_BUTTON_1 && (code) <= QK_PROGRAMMABLE_BUTTON_32) #define IS_AUDIO_KEYCODE(code) ((code) >= QK_AUDIO_ON && (code) <= QK_AUDIO_VOICE_PREVIOUS) diff --git a/quantum/process_keycode/process_sequencer.c b/quantum/process_keycode/process_sequencer.c index 334b4c0092..6391d1ba9d 100644 --- a/quantum/process_keycode/process_sequencer.c +++ b/quantum/process_keycode/process_sequencer.c @@ -19,39 +19,39 @@ bool process_sequencer(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { - case SQ_ON: + case QK_SEQUENCER_ON: sequencer_on(); return false; - case SQ_OFF: + case QK_SEQUENCER_OFF: sequencer_off(); return false; - case SQ_TOG: + case QK_SEQUENCER_TOGGLE: sequencer_toggle(); return false; - case SQ_TMPD: + case QK_SEQUENCER_TEMPO_DOWN: sequencer_decrease_tempo(); return false; - case SQ_TMPU: + case QK_SEQUENCER_TEMPO_UP: sequencer_increase_tempo(); return false; - case SEQUENCER_RESOLUTION_MIN ... SEQUENCER_RESOLUTION_MAX: - sequencer_set_resolution(keycode - SEQUENCER_RESOLUTION_MIN); - return false; - case SQ_RESD: + case QK_SEQUENCER_RESOLUTION_DOWN: sequencer_decrease_resolution(); return false; - case SQ_RESU: + case QK_SEQUENCER_RESOLUTION_UP: sequencer_increase_resolution(); return false; - case SQ_SALL: + case QK_SEQUENCER_STEPS_ALL: sequencer_set_all_steps_on(); return false; - case SQ_SCLR: + case QK_SEQUENCER_STEPS_CLEAR: sequencer_set_all_steps_off(); return false; case SEQUENCER_STEP_MIN ... SEQUENCER_STEP_MAX: sequencer_toggle_step(keycode - SEQUENCER_STEP_MIN); return false; + case SEQUENCER_RESOLUTION_MIN ... SEQUENCER_RESOLUTION_MAX: + sequencer_set_resolution(keycode - SEQUENCER_RESOLUTION_MIN); + return false; case SEQUENCER_TRACK_MIN ... SEQUENCER_TRACK_MAX: sequencer_toggle_single_active_track(keycode - SEQUENCER_TRACK_MIN); return false; diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index 28634d00f7..b23ed00e98 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -4,3 +4,4 @@ // Deprecated Quantum keycodes #define SH_TG QK_SWAP_HANDS_TOGGLE +#define SQ_TOG QK_SEQUENCER_TOGGLE |