moved keysym -> keycode translation into get_keycode