i did this by making a dictionary for gameKeys and gameActions, and then at the top of my main event sheet have a giant bundle of or block events that check if a keyboard or gamepad is pushing one of the relevant buttons:
when the game starts as part of my init function it loads all the default gameKeys from a dictionary project file, but you can change the key codes at runtime by using the LastKeyCode expression. i haven't actually implemented this yet because i'm not sure of the UI, so i don't have an example to share, sorry about that!
so all "on key press" actions are replaced with "if gameActions key 'down' is 1" and all "key is down" actions are replaced with "if gameActions key 'down' >= 1" and such.
(these r collapsed)
this also meant i could keep track of how many frames each key has been down, which i used to implement DAS or auto-repeat with this function:
i also frequently add 1 to the relevant gameActions if, for instance, you're in the menu and push "confirm" so that it doesn't automatically confirm when the next window opens as well
i'm actually pretty proud of this one (i love that i was able to implement auto-repeat like that tbh) but i do agree it was kind of a bummer it was so roundabout. i hope my code helps, lmk if you need clarification!