aura-linux: Supports ISO Level3 Latch key.

XK_ISO_Level3_Latch key was treated as a character key.  This CL treats the key as same as AltGr (XK_ISO_Level3_Shift).

Note: Apostrophe key in Latvian keyboard layout (apostrophe variant) is assigned to XK_ISO_Level3_Latch.

BUG=375670
TEST=Done manually.

Review URL: https://codereview.chromium.org/321153002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278646 0039d316-1c4b-4281-b951-d872f2087c98
parent aec5ed53
......@@ -566,10 +566,13 @@ uint16 KeyEvent::GetCharacter() const {
DCHECK(native_event()->type == KeyPress ||
native_event()->type == KeyRelease);
uint16 ch = 0;
if (!IsControlDown())
ch = GetCharacterFromXEvent(native_event());
return ch ? ch : GetCharacterFromKeyCode(key_code_, flags());
// When a control key is held, prefer ASCII characters to non ASCII
// characters in order to use it for shortcut keys. GetCharacterFromKeyCode
// returns 'a' for VKEY_A even if the key is actually bound to 'à' in X11.
// GetCharacterFromXEvent returns 'à' in that case.
return IsControlDown() ?
GetCharacterFromKeyCode(key_code_, flags()) :
GetCharacterFromXEvent(native_event());
#else
if (native_event()) {
DCHECK(EventTypeFromNative(native_event()) == ET_KEY_PRESSED ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment