From e3f040c978852e6b589a925e6f27f77d9cfddaa9 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Mon, 15 Apr 2024 18:40:53 +0200 Subject: [PATCH] Added the ability to send commands using the Enter key and not clicking the button Was about time lol --- Moonlight/Features/Servers/UI/UserViews/Console.razor | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Moonlight/Features/Servers/UI/UserViews/Console.razor b/Moonlight/Features/Servers/UI/UserViews/Console.razor index a28acb53..79544e30 100644 --- a/Moonlight/Features/Servers/UI/UserViews/Console.razor +++ b/Moonlight/Features/Servers/UI/UserViews/Console.razor @@ -18,7 +18,7 @@
- +
@@ -118,6 +118,14 @@ await InvokeAsync(StateHasChanged); } + + private async Task OnEnterPressed(KeyboardEventArgs args) + { + if(args.Code != "Enter" || args.CtrlKey || args.ShiftKey) + return; + + await SendCommand(); + } public void Dispose() {