You got it right on the head! Now, I made one last change. I removed the call to disable_onkey_defaults() from the top of map_default_keys() and placed it at the top of init_key_map(). This makes more sense, since this is where we want to make sure the any on_* events are not set, while we are preping our own handling array. disable_onkey_defaults() is only called once, so it could really be removed, with its logic being moved to the top of init_key_map(). What do you think?

What got me going on this effort is, I was designing a intro splash screen, a main menu, with an options sub menu. I needed a way to turn off the keys during the splash screen display. I also want to add the ability to provide keyboard navigation of the menus when they're being displayed, but return back to the game mapping when they are closed.