]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/commit
fix '|' key display problem in en-us with altgr processing
authorChun Yan Liu <cyliu@novell.com>
Wed, 5 Jan 2011 23:48:36 +0000 (23:48 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Jan 2011 23:48:36 +0000 (23:48 +0000)
commit99d53fbb69d3e03be61ae10506a304a3d08d792f
tree065171420f8b69d26ef6d4464c766ed1e3d51e41
parent6df21b765eafcae5d891d5a8092e6f8b74c93031
fix '|' key display problem in en-us with altgr processing

Commit f95d202ed644 handles altgr-insert problem.  Unfortunately, with
that patch, there is a problem in En-us keyboard: '|' (bar) cannot be
displayed. After checking keymap files, we found there are two
definitions to "bar" in en-us: bar 0x56 altgr (in "common") bar 0x2b
shift (in "en-us") First line is actually invalid in en-us
lanuage. The 2nd definition will cover the 1st one.

The previous change in didn't consider multi-definition case. It scans
keymap files, if keysym needs altgr, it will records that, after that,
if keysym is pressed but altgr not pressed, it will add an altgr press
opeartion. It is correct if all keysyms are unique and valid. But in
the above multi-definition case, there is problem: when reading bar
0x56 altgr (in "common") it will record altgr needed, but in fact,
that definition won't be used, it always use the 2nd definition and
won't need altgr. Then if the keysym is pressed, the code will still
add an altgr press operation, that will cause problem.

So, if we cannot avoid multi-definition in keymap files, the altgr
flag (whether altgr needed or not) should also be refreshed according
to the 2nd defintion. In the above case, when reading the 1st line, it
records altgr needed; then reading 2nd line, 2nd definition will cover
the 1st, meanwhile the altgr flag should be reset (the 2nd definition
doesn't need altgr, so altgr flag should be removed.)

Following patch supplements f95d202ed644, and solve the
problem.

Signed-off-by: Chun Yan Liu <cyliu@novell.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
keymaps.c
vnc.c