From ab5178972ab2e9e64c98fea1c65ee567633fb91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Degerf=C3=A4lt?= Date: Fri, 14 Jul 2023 22:05:39 +0200 Subject: [PATCH] Run key processing even when ctrl key is pressed --- src/studio/editors/music.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/studio/editors/music.c b/src/studio/editors/music.c index 57093606f..959cfb704 100644 --- a/src/studio/editors/music.c +++ b/src/studio/editors/music.c @@ -1442,6 +1442,9 @@ static void processPianoKeyboard(Music* music) { tic_mem* tic = music->tic; + if(tic_api_key(tic, tic_key_ctrl) || tic_api_key(tic, tic_key_alt)) + return; + if(keyWasPressed(music->studio, tic_key_up)) music->piano.edit.y--; else if(keyWasPressed(music->studio, tic_key_down)) music->piano.edit.y++; else if(keyWasPressed(music->studio, tic_key_left)) music->piano.edit.x--; @@ -1547,18 +1550,18 @@ static void processKeyboard(Music* music) : playFrame(music)) : stopTrack(music); } + } - switch (music->tab) - { - case MUSIC_TRACKER_TAB: - music->tracker.edit.y >= 0 - ? processTrackerKeyboard(music) - : processPatternKeyboard(music); - break; - case MUSIC_PIANO_TAB: - processPianoKeyboard(music); - break; - } + switch (music->tab) + { + case MUSIC_TRACKER_TAB: + music->tracker.edit.y >= 0 + ? processTrackerKeyboard(music) + : processPatternKeyboard(music); + break; + case MUSIC_PIANO_TAB: + processPianoKeyboard(music); + break; } }