Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions proto/enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ enum GamepadHotkey
HOTKEY_RS_DOWN = 83;
HOTKEY_RS_LEFT = 84;
HOTKEY_RS_RIGHT = 85;
HOTKEY_REBOOT_WEBCONFIG = 86;
HOTKEY_REBOOT_USB = 87;
}

enum AnimationEffects
Expand Down
10 changes: 10 additions & 0 deletions src/gamepad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,16 @@ void Gamepad::processHotkeyAction(GamepadHotkey action) {
System::reboot(System::BootMode::DEFAULT);
}
break;
case HOTKEY_REBOOT_WEBCONFIG:
if (action != lastAction) {
System::reboot(System::BootMode::WEBCONFIG);
}
break;
case HOTKEY_REBOOT_USB:
if (action != lastAction) {
System::reboot(System::BootMode::USB);
}
break;
case HOTKEY_SAVE_CONFIG:
if (action != lastAction) {
Storage::getInstance().save(true);
Expand Down
2 changes: 2 additions & 0 deletions www/src/Locales/en/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ export default {
'load-profile-5': 'Load Profile #5',
'load-profile-6': 'Load Profile #6',
'reboot-default': 'Reboot GP2040-CE',
'reboot-webconfig': 'Reboot GP2040-CE into web-config mode',
'reboot-usb': 'Reboot GP2040-CE into BOOTSEL/USB mode',
'save-config': 'Save Config',
'next-profile': 'Next Profile',
'previous-profile': 'Previous Profile',
Expand Down
2 changes: 2 additions & 0 deletions www/src/Pages/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ const HOTKEY_ACTIONS = [
{ labelKey: 'hotkey-actions.r3-button', value: 20 },
{ labelKey: 'hotkey-actions.touchpad-button', value: 21 },
{ labelKey: 'hotkey-actions.reboot-default', value: 22 },
{ labelKey: 'hotkey-actions.reboot-webconfig', value: 86 },
{ labelKey: 'hotkey-actions.reboot-usb', value: 87 },
{ labelKey: 'hotkey-actions.save-config', value: 43 },
{ labelKey: 'hotkey-actions.b1-button', value: 23 },
{ labelKey: 'hotkey-actions.b2-button', value: 24 },
Expand Down