sphair / ClanLib

ClanLib is a cross platform C++ toolkit library.
Other
344 stars 76 forks source link

Add InputCode to Key converter + Update UI examples for Font #48

Closed keigen-shu closed 9 years ago

keigen-shu commented 9 years ago

KeyEvent did not work properly on X11 because Key is not linked to the proper values used in InputCode. This commit moves the Key enum in key_event.h to the Display module and adds a function Key clan::decode_ic(InputCode) to convert from platform-specific-values on InputCode to fixed values on Key.

Note that the ALT, CapsLock and ScrollLock keys, albeit defined in Key, is not available in InputCode and thus is converted by the function to Key::none.