From 05141b5ef9014807784a479b083e28b0e46d158a Mon Sep 17 00:00:00 2001 From: Cas van Cooten Date: Sat, 4 Mar 2023 15:56:50 +0100 Subject: [PATCH] Add command tab completion to GUI --- ui/components/Console.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/components/Console.tsx b/ui/components/Console.tsx index a3bbe99..556b2be 100644 --- a/ui/components/Console.tsx +++ b/ui/components/Console.tsx @@ -204,6 +204,7 @@ function Console({ allowInput, consoleData, disabled, guid, inputFunction }: Con value={enteredCommand} onKeyDown={getHotkeyHandler([ ['Enter', handleSubmit], + ['Tab', () => autocompleteOptions.length > 0 && setEnteredCommand(autocompleteOptions[0])], ['ArrowUp', () => handleHistory(-1)], ['ArrowDown', () => handleHistory(1)], ])}