input: add function to test whether a key is mapped

Will be useful for catching global keyboard shortcuts on Windows.

Explicitly doesn't check for bindings with multiple keys. This would be
too complicated and we can't even say for sure whether a key will emit a
command or not.
wip