add gamepad-bindings for escape key

This commit is contained in:
2026-01-20 09:08:11 +00:00
parent e2454b1093
commit 214ea67b76

View File

@@ -219,9 +219,16 @@ struct
else if !(#l1Pressed state) then else if !(#l1Pressed state) then
() ()
else else
let val () = InputMailbox.append KEY_BACKSPACE let val () = InputMailbox.append InputMsg.KEY_BACKSPACE
in #l1Pressed state := true in #l1Pressed state := true
end end
val () =
(* if l2 and r2 are both pressed, then send escape event *)
if l2 > 0.3 andalso r2 > 0.3 then
InputMailbox.append InputMsg.KEY_ESC
else
()
in in
() ()
end end