KeyPress/Release and modifiers

Glynn Clements glynn at gclements.plus.com
Fri Jun 8 15:43:51 PDT 2007


Samuel Thibault wrote:

> I have some program that needs to track all pressures/releases of a
> given key that I access through modifiers (shift-a for instance), and I
> have a problem with the modifier: if I do
> 
> - press shift
> - press a
> - release shift
> - release a
> 
> Key events are KeyPress Shift_L, KeyPress 'A', KeyRelease Shift_L,
> KeyRelease 'a'.

No, the actual X events are probably:

	type = KeyPress   keycode = 50
	type = KeyPress   keycode = 38
	type = KeyRelease keycode = 50
	type = KeyRelease keycode = 38

A raw XKeyEvent doesn't have a KeySym; translation of a keycode to a
KeySym is handled separately.

If you're referring to some higher-level toolkit, try asking in a
forum which is specific to that toolkit. Or try to bypass the toolkit.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list