Fixed warnings for X build.

XKeycodeToKeysym has been declared deprecated.
This pull request would replace the deprecated function with The Right Way(tm).