Keysym, Keycode plus updated event handling

Moved in 99b48d59a02dd7e852fe22e42976f9c6aecd43c8.