When a non-latin keyboard layout is used, QKeyEvent::key() returns code of the
upper-case version of the character, i.e. QChar(keyEvent->key()) is the
upper-case character the user has pressed. For example, if I press 'Ð'
(Cyrillic letter usually placed on the same key as latin 'A'), QKeyEvent::key()
returns 1060 (0x424) â code of the 'Ð' letter in Unicode character set.
At least it works this way on my Debian system. :)
I guess on other systems this function has the same behavior, at least because
there are too many layouts to make it possible to implement simple and
platform-independent "non-latin <--> latin" key code conversion/mapping.
On Wednesday 23 June 2010 20:04:44 Stephen Collyer wrote:
> If one is working with, say, a Russian, Greek, Arabic, etc physical
> keyboard, under what circumstances are the Qt_Key_<whatever>
> key codes returned in a QKeyEvent ?
> Are the non-latin keys mapped onto these in some well defined way ?
> If not, what does one get in QKeyEvent::key() in the case of non-latin
> keyboards ?
Qt-interest mailing list