Keyboard scancodes, getting keycode/scancode via string

Scancode is rather large, wouldn't be opposed to moving it into it's own hs file. But keyboard seems to be the primary place it is used.