feat: support sending modifier keys (#18)

Co-authored-by: E44 <129310925+programmer-44@users.noreply.github.com>
This commit is contained in:
2026-01-19 18:47:53 +01:00
committed by GitHub
parent c8e21a64bf
commit 4d5d9849da
7 changed files with 339 additions and 388 deletions
+1 -7
View File
@@ -216,12 +216,6 @@ func keyboardInputRoute(ctx echo.Context) error {
return ctx.JSON(http.StatusBadRequest, shared.ErrorResponse{Description: fmt.Sprintf("Invalid action: %s", input.Action)})
}
code, ok := pkg.KeyboardEvents[input.Key]
if !ok {
slog.Error("Unsupported key", "key", input.Key)
return ctx.JSON(http.StatusBadRequest, shared.ErrorResponse{Description: fmt.Sprintf("Unsupported key: %s", input.Key)})
}
var action pkg.KeyAction
if input.Action == "press" {
action = pkg.KeyPress
@@ -231,7 +225,7 @@ func keyboardInputRoute(ctx echo.Context) error {
}
inputs = append(inputs, pkg.Input{
Key: code,
Key: input.Key,
Action: action,
})
}