Move a couple of general keymap functions from keycodes.c

To get a key by name and resolve an alias - this makes sense for
everyone.

Signed-off-by: Ran Benita <ran234@gmail.com>