diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 141c83246..d4330e15f 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1529,7 +1529,7 @@ void FurnaceGUI::keyDown(SDL_Event& ev) { } // pattern input otherwise if (mapped&(FURKMOD_ALT|FURKMOD_CTRL|FURKMOD_META|FURKMOD_SHIFT)) break; - if (!ev.key.repeat) { + if (!ev.key.repeat || settings.inputRepeat) { if (cursor.xFine==0) { // note auto it=noteKeys.find(ev.key.keysym.scancode); if (it!=noteKeys.cend()) { diff --git a/src/gui/gui.h b/src/gui/gui.h index d8e419921..7bdfd02b0 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1864,6 +1864,7 @@ class FurnaceGUI { int vsync; int frameRateLimit; int displayRenderTime; + int inputRepeat; unsigned int maxUndoSteps; float vibrationStrength; int vibrationLength; @@ -2104,6 +2105,7 @@ class FurnaceGUI { vsync(1), frameRateLimit(60), displayRenderTime(0), + inputRepeat(0), maxUndoSteps(100), vibrationStrength(0.5f), vibrationLength(20), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index a5e4ea16d..47439b125 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -2431,6 +2431,12 @@ void FurnaceGUI::drawSettings() { settingsChanged=true; } + bool inputRepeatB=settings.inputRepeat; + if (ImGui::Checkbox("Keyboard note/value input repeat (hold key to input continuously)",&inputRepeatB)) { + settings.inputRepeat=inputRepeatB; + settingsChanged=true; + } + ImGui::Text("Effect input behavior:"); ImGui::Indent(); if (ImGui::RadioButton("Move down##eicb0",settings.effectCursorDir==0)) { @@ -4229,6 +4235,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { settings.insTypeMenu=conf.getInt("insTypeMenu",1); settings.selectAssetOnLoad=conf.getInt("selectAssetOnLoad",1); + + settings.inputRepeat=conf.getInt("inputRepeat",0); } if (groups&GUI_SETTINGS_FONT) { @@ -4624,6 +4632,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { clampSetting(settings.displayRenderTime,0,1); clampSetting(settings.vibrationStrength,0.0f,1.0f); clampSetting(settings.vibrationLength,10,500); + clampSetting(settings.inputRepeat,0,1); if (settings.exportLoops<0.0) settings.exportLoops=0.0; if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0; @@ -4776,6 +4785,8 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { conf.set("insTypeMenu",settings.insTypeMenu); conf.set("selectAssetOnLoad",settings.selectAssetOnLoad); + + conf.set("inputRepeat",settings.inputRepeat); } // font