Update default delay and layout before running a script

This commit is contained in:
Spacehuhn 2022-11-07 10:36:26 +01:00
parent 6bd4a56d3e
commit 68f66e1f2a
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,11 @@ void loop() {
// ========== Setup Mode ========== //
if (selector::mode() == SETUP && preferences::hidEnabled()) {
preferences::load(); // Reload the settings (in case the main script path changed)
// Attack settings
keyboard::setLocale(locale::get(preferences::getDefaultLayout().c_str()));
duckparser::setDefaultDelay(preferences::getDefaultDelay());
attack::start(); // Start keystroke injection attack
led::setColor(preferences::getSetupColor()); // Set LED to blue
}