0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 22:58:04 +03:00

Hold down keys 0-9 to bypass F-key

This commit is contained in:
OneOfEleven
2023-09-14 19:38:28 +01:00
parent 84087c3d13
commit 5c664164b2
19 changed files with 294 additions and 221 deletions

View File

@ -62,11 +62,12 @@ void UI_DisplayLock(void)
// TODO: Original code doesn't do the below, but is needed for proper key debounce
gNextTimeslice = false;
Key = KEYBOARD_Poll();
Key = KEYBOARD_Poll();
if (gKeyReading0 == Key)
{
if (++gDebounceCounter == 2)
if (++gDebounceCounter == key_debounce)
{
if (Key == KEY_INVALID)
{
@ -89,7 +90,8 @@ void UI_DisplayLock(void)
case KEY_8:
case KEY_9:
INPUTBOX_Append(Key - KEY_0);
if (gInputBoxIndex < 6)
if (gInputBoxIndex < 6) // 6 frequency digits
{
Beep = BEEP_1KHZ_60MS_OPTIONAL;
}
@ -118,7 +120,7 @@ void UI_DisplayLock(void)
break;
case KEY_EXIT:
if (gInputBoxIndex)
if (gInputBoxIndex > 0)
{
gInputBox[--gInputBoxIndex] = 10;
gUpdateDisplay = true;