X11: Call XRefreshKeyboardMapping() when we get various MappingNotify events. According to the Xlib docs, you need to do this or Xlib's internal state gets out of sync.