@@ -35,6 +35,7 @@ class ENetMode(UnrealEnum):
3535DLC_MENU_CONTROLLER_TO_KB_KEY_MAP = {
3636 "Gamepad_LeftStick_Up" : "Up" ,
3737 "Gamepad_LeftStick_Down" : "Down" ,
38+ "XboxTypeS_Start" : "Enter" ,
3839 "XboxTypeS_A" : "Enter" ,
3940 "XboxTypeS_B" : "Escape" ,
4041 "XboxTypeS_Y" : "Q" ,
@@ -271,15 +272,12 @@ def marketplace_input_key(
271272 _3 : Any ,
272273 _4 : BoundFunction ,
273274) -> tuple [type [Block ], bool ] | None :
275+ key : str = DLC_MENU_CONTROLLER_TO_KB_KEY_MAP .get (args .ukey , args .ukey )
276+
274277 try :
275- key : str = DLC_MENU_CONTROLLER_TO_KB_KEY_MAP .get (args .ukey , args .ukey )
276278 event : EInputEvent = args .uevent
277279
278280 match key , event :
279- # Keep the standard handling
280- case (("Escape" | "Up" | "Down" | "W" | "S" ), _):
281- return None
282-
283281 # Page up/down are actually bugged on Gearbox's end: they look for both a released event
284282 # and a pressed or repeat, which is a contradition that can never be true.
285283 # Since there can be quite a few mods and we want to be able to scroll through them
@@ -320,14 +318,17 @@ def marketplace_input_key(
320318 return Block , True
321319
322320 case _, _:
323- return Block , True
321+ pass
324322
325- # If we let this function process normally, most inputs end up opening the steam store page
326- # Make sure we always block it
327323 except Exception : # noqa: BLE001
328324 traceback .print_exc ()
329325
330- return Block , True
326+ # These inputs trigger logic in the standard menu, block them all, even if we got an exception.
327+ # If we let them through it usually ends up opening the steam store page.
328+ if key in {"Enter" , "Q" , "E" }:
329+ return Block , True
330+
331+ return None
331332
332333
333334# Called to close the options menu. We temporarily enable it while in a mod options menu triggered
0 commit comments