I'm using the XI2 extension to process key presses. Then in the field event->xcookie->data I get an XIDeviceEvent deviceEvent. And then I get a 32 bit key code in deviceEvent->detail.
How can I convert this 32 bit key code to a string or a character? Like if the Q-Key is pressed, I want to get the String "q".