Android Open Source - valence Key Translator






From Project

Back to project page valence.

License

The source code is released under:

Apache License

If you think the Android project valence listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright 2011 David Simmons/* w w  w  .j av  a  2 s  .c  o  m*/
 * http://cafbit.com/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.cafbit.valence.rfb;

import java.util.HashMap;
import java.util.Map;

import android.view.KeyEvent;

public class KeyTranslator {

    // this table was auto-generated from the keysyms.pl perl script.
    public static final int[][] UNICODE_TABLE = {
        {0x0009, 0xFF09},    // XK_Tab
        {0x0020, 0x0020},    // XK_space
        {0x0021, 0x0021},    // XK_exclam
        {0x0022, 0x0022},    // XK_quotedbl
        {0x0023, 0x0023},    // XK_numbersign
        {0x0024, 0x0024},    // XK_dollar
        {0x0025, 0x0025},    // XK_percent
        {0x0026, 0x0026},    // XK_ampersand
        {0x0027, 0x0027},    // XK_apostrophe
        {0x0028, 0x0028},    // XK_parenleft
        {0x0029, 0x0029},    // XK_parenright
        {0x002A, 0x002A},    // XK_asterisk
        {0x002B, 0x002B},    // XK_plus
        {0x002C, 0x002C},    // XK_comma
        {0x002D, 0x002D},    // XK_minus
        {0x002E, 0x002E},    // XK_period
        {0x002F, 0x002F},    // XK_slash
        {0x0030, 0x0030},    // XK_0
        {0x0031, 0x0031},    // XK_1
        {0x0032, 0x0032},    // XK_2
        {0x0033, 0x0033},    // XK_3
        {0x0034, 0x0034},    // XK_4
        {0x0035, 0x0035},    // XK_5
        {0x0036, 0x0036},    // XK_6
        {0x0037, 0x0037},    // XK_7
        {0x0038, 0x0038},    // XK_8
        {0x0039, 0x0039},    // XK_9
        {0x003A, 0x003A},    // XK_colon
        {0x003B, 0x003B},    // XK_semicolon
        {0x003C, 0x003C},    // XK_less
        {0x003D, 0x003D},    // XK_equal
        {0x003E, 0x003E},    // XK_greater
        {0x003F, 0x003F},    // XK_question
        {0x0040, 0x0040},    // XK_at
        {0x0041, 0x0041},    // XK_A
        {0x0042, 0x0042},    // XK_B
        {0x0043, 0x0043},    // XK_C
        {0x0044, 0x0044},    // XK_D
        {0x0045, 0x0045},    // XK_E
        {0x0046, 0x0046},    // XK_F
        {0x0047, 0x0047},    // XK_G
        {0x0048, 0x0048},    // XK_H
        {0x0049, 0x0049},    // XK_I
        {0x004A, 0x004A},    // XK_J
        {0x004B, 0x004B},    // XK_K
        {0x004C, 0x004C},    // XK_L
        {0x004D, 0x004D},    // XK_M
        {0x004E, 0x004E},    // XK_N
        {0x004F, 0x004F},    // XK_O
        {0x0050, 0x0050},    // XK_P
        {0x0051, 0x0051},    // XK_Q
        {0x0052, 0x0052},    // XK_R
        {0x0053, 0x0053},    // XK_S
        {0x0054, 0x0054},    // XK_T
        {0x0055, 0x0055},    // XK_U
        {0x0056, 0x0056},    // XK_V
        {0x0057, 0x0057},    // XK_W
        {0x0058, 0x0058},    // XK_X
        {0x0059, 0x0059},    // XK_Y
        {0x005A, 0x005A},    // XK_Z
        {0x005B, 0x005B},    // XK_bracketleft
        {0x005C, 0x005C},    // XK_backslash
        {0x005D, 0x005D},    // XK_bracketright
        {0x005E, 0x005E},    // XK_asciicircum
        {0x005F, 0x005F},    // XK_underscore
        {0x0060, 0x0060},    // XK_grave
        {0x0061, 0x0061},    // XK_a
        {0x0062, 0x0062},    // XK_b
        {0x0063, 0x0063},    // XK_c
        {0x0064, 0x0064},    // XK_d
        {0x0065, 0x0065},    // XK_e
        {0x0066, 0x0066},    // XK_f
        {0x0067, 0x0067},    // XK_g
        {0x0068, 0x0068},    // XK_h
        {0x0069, 0x0069},    // XK_i
        {0x006A, 0x006A},    // XK_j
        {0x006B, 0x006B},    // XK_k
        {0x006C, 0x006C},    // XK_l
        {0x006D, 0x006D},    // XK_m
        {0x006E, 0x006E},    // XK_n
        {0x006F, 0x006F},    // XK_o
        {0x0070, 0x0070},    // XK_p
        {0x0071, 0x0071},    // XK_q
        {0x0072, 0x0072},    // XK_r
        {0x0073, 0x0073},    // XK_s
        {0x0074, 0x0074},    // XK_t
        {0x0075, 0x0075},    // XK_u
        {0x0076, 0x0076},    // XK_v
        {0x0077, 0x0077},    // XK_w
        {0x0078, 0x0078},    // XK_x
        {0x0079, 0x0079},    // XK_y
        {0x007A, 0x007A},    // XK_z
        {0x007B, 0x007B},    // XK_braceleft
        {0x007C, 0x007C},    // XK_bar
        {0x007D, 0x007D},    // XK_braceright
        {0x007E, 0x007E},    // XK_asciitilde
        {0x00A0, 0x00A0},    // XK_nobreakspace
        {0x00A1, 0x00A1},    // XK_exclamdown
        {0x00A2, 0x00A2},    // XK_cent
        {0x00A3, 0x00A3},    // XK_sterling
        {0x00A4, 0x00A4},    // XK_currency
        {0x00A5, 0x00A5},    // XK_yen
        {0x00A6, 0x00A6},    // XK_brokenbar
        {0x00A7, 0x00A7},    // XK_section
        {0x00A8, 0x00A8},    // XK_diaeresis
        {0x00A9, 0x00A9},    // XK_copyright
        {0x00AA, 0x00AA},    // XK_ordfeminine
        {0x00AB, 0x00AB},    // XK_guillemotleft
        {0x00AC, 0x00AC},    // XK_notsign
        {0x00AD, 0x00AD},    // XK_hyphen
        {0x00AE, 0x00AE},    // XK_registered
        {0x00AF, 0x00AF},    // XK_macron
        {0x00B0, 0x00B0},    // XK_degree
        {0x00B1, 0x00B1},    // XK_plusminus
        {0x00B2, 0x00B2},    // XK_twosuperior
        {0x00B3, 0x00B3},    // XK_threesuperior
        {0x00B4, 0x00B4},    // XK_acute
        {0x00B5, 0x00B5},    // XK_mu
        {0x00B6, 0x00B6},    // XK_paragraph
        {0x00B7, 0x00B7},    // XK_periodcentered
        {0x00B8, 0x00B8},    // XK_cedilla
        {0x00B9, 0x00B9},    // XK_onesuperior
        {0x00BA, 0x00BA},    // XK_masculine
        {0x00BB, 0x00BB},    // XK_guillemotright
        {0x00BC, 0x00BC},    // XK_onequarter
        {0x00BD, 0x00BD},    // XK_onehalf
        {0x00BE, 0x00BE},    // XK_threequarters
        {0x00BF, 0x00BF},    // XK_questiondown
        {0x00C0, 0x00C0},    // XK_Agrave
        {0x00C1, 0x00C1},    // XK_Aacute
        {0x00C2, 0x00C2},    // XK_Acircumflex
        {0x00C3, 0x00C3},    // XK_Atilde
        {0x00C4, 0x00C4},    // XK_Adiaeresis
        {0x00C5, 0x00C5},    // XK_Aring
        {0x00C6, 0x00C6},    // XK_AE
        {0x00C7, 0x00C7},    // XK_Ccedilla
        {0x00C8, 0x00C8},    // XK_Egrave
        {0x00C9, 0x00C9},    // XK_Eacute
        {0x00CA, 0x00CA},    // XK_Ecircumflex
        {0x00CB, 0x00CB},    // XK_Ediaeresis
        {0x00CC, 0x00CC},    // XK_Igrave
        {0x00CD, 0x00CD},    // XK_Iacute
        {0x00CE, 0x00CE},    // XK_Icircumflex
        {0x00CF, 0x00CF},    // XK_Idiaeresis
        {0x00D0, 0x00D0},    // XK_ETH
        {0x00D1, 0x00D1},    // XK_Ntilde
        {0x00D2, 0x00D2},    // XK_Ograve
        {0x00D3, 0x00D3},    // XK_Oacute
        {0x00D4, 0x00D4},    // XK_Ocircumflex
        {0x00D5, 0x00D5},    // XK_Otilde
        {0x00D6, 0x00D6},    // XK_Odiaeresis
        {0x00D7, 0x00D7},    // XK_multiply
        {0x00D8, 0x00D8},    // XK_Oslash
        {0x00D8, 0x00D8},    // XK_Ooblique
        {0x00D9, 0x00D9},    // XK_Ugrave
        {0x00DA, 0x00DA},    // XK_Uacute
        {0x00DB, 0x00DB},    // XK_Ucircumflex
        {0x00DC, 0x00DC},    // XK_Udiaeresis
        {0x00DD, 0x00DD},    // XK_Yacute
        {0x00DE, 0x00DE},    // XK_THORN
        {0x00DF, 0x00DF},    // XK_ssharp
        {0x00E0, 0x00E0},    // XK_agrave
        {0x00E1, 0x00E1},    // XK_aacute
        {0x00E2, 0x00E2},    // XK_acircumflex
        {0x00E3, 0x00E3},    // XK_atilde
        {0x00E4, 0x00E4},    // XK_adiaeresis
        {0x00E5, 0x00E5},    // XK_aring
        {0x00E6, 0x00E6},    // XK_ae
        {0x00E7, 0x00E7},    // XK_ccedilla
        {0x00E8, 0x00E8},    // XK_egrave
        {0x00E9, 0x00E9},    // XK_eacute
        {0x00EA, 0x00EA},    // XK_ecircumflex
        {0x00EB, 0x00EB},    // XK_ediaeresis
        {0x00EC, 0x00EC},    // XK_igrave
        {0x00ED, 0x00ED},    // XK_iacute
        {0x00EE, 0x00EE},    // XK_icircumflex
        {0x00EF, 0x00EF},    // XK_idiaeresis
        {0x00F0, 0x00F0},    // XK_eth
        {0x00F1, 0x00F1},    // XK_ntilde
        {0x00F2, 0x00F2},    // XK_ograve
        {0x00F3, 0x00F3},    // XK_oacute
        {0x00F4, 0x00F4},    // XK_ocircumflex
        {0x00F5, 0x00F5},    // XK_otilde
        {0x00F6, 0x00F6},    // XK_odiaeresis
        {0x00F7, 0x00F7},    // XK_division
        {0x00F8, 0x00F8},    // XK_oslash
        {0x00F8, 0x00F8},    // XK_ooblique
        {0x00F9, 0x00F9},    // XK_ugrave
        {0x00FA, 0x00FA},    // XK_uacute
        {0x00FB, 0x00FB},    // XK_ucircumflex
        {0x00FC, 0x00FC},    // XK_udiaeresis
        {0x00FD, 0x00FD},    // XK_yacute
        {0x00FE, 0x00FE},    // XK_thorn
        {0x00FF, 0x00FF},    // XK_ydiaeresis
        {0x0104, 0x01A1},    // XK_Aogonek
        {0x02D8, 0x01A2},    // XK_breve
        {0x0141, 0x01A3},    // XK_Lstroke
        {0x013D, 0x01A5},    // XK_Lcaron
        {0x015A, 0x01A6},    // XK_Sacute
        {0x0160, 0x01A9},    // XK_Scaron
        {0x015E, 0x01AA},    // XK_Scedilla
        {0x0164, 0x01AB},    // XK_Tcaron
        {0x0179, 0x01AC},    // XK_Zacute
        {0x017D, 0x01AE},    // XK_Zcaron
        {0x017B, 0x01AF},    // XK_Zabovedot
        {0x0105, 0x01B1},    // XK_aogonek
        {0x02DB, 0x01B2},    // XK_ogonek
        {0x0142, 0x01B3},    // XK_lstroke
        {0x013E, 0x01B5},    // XK_lcaron
        {0x015B, 0x01B6},    // XK_sacute
        {0x02C7, 0x01B7},    // XK_caron
        {0x0161, 0x01B9},    // XK_scaron
        {0x015F, 0x01BA},    // XK_scedilla
        {0x0165, 0x01BB},    // XK_tcaron
        {0x017A, 0x01BC},    // XK_zacute
        {0x02DD, 0x01BD},    // XK_doubleacute
        {0x017E, 0x01BE},    // XK_zcaron
        {0x017C, 0x01BF},    // XK_zabovedot
        {0x0154, 0x01C0},    // XK_Racute
        {0x0102, 0x01C3},    // XK_Abreve
        {0x0139, 0x01C5},    // XK_Lacute
        {0x0106, 0x01C6},    // XK_Cacute
        {0x010C, 0x01C8},    // XK_Ccaron
        {0x0118, 0x01CA},    // XK_Eogonek
        {0x011A, 0x01CC},    // XK_Ecaron
        {0x010E, 0x01CF},    // XK_Dcaron
        {0x0110, 0x01D0},    // XK_Dstroke
        {0x0143, 0x01D1},    // XK_Nacute
        {0x0147, 0x01D2},    // XK_Ncaron
        {0x0150, 0x01D5},    // XK_Odoubleacute
        {0x0158, 0x01D8},    // XK_Rcaron
        {0x016E, 0x01D9},    // XK_Uring
        {0x0170, 0x01DB},    // XK_Udoubleacute
        {0x0162, 0x01DE},    // XK_Tcedilla
        {0x0155, 0x01E0},    // XK_racute
        {0x0103, 0x01E3},    // XK_abreve
        {0x013A, 0x01E5},    // XK_lacute
        {0x0107, 0x01E6},    // XK_cacute
        {0x010D, 0x01E8},    // XK_ccaron
        {0x0119, 0x01EA},    // XK_eogonek
        {0x011B, 0x01EC},    // XK_ecaron
        {0x010F, 0x01EF},    // XK_dcaron
        {0x0111, 0x01F0},    // XK_dstroke
        {0x0144, 0x01F1},    // XK_nacute
        {0x0148, 0x01F2},    // XK_ncaron
        {0x0151, 0x01F5},    // XK_odoubleacute
        {0x0171, 0x01FB},    // XK_udoubleacute
        {0x0159, 0x01F8},    // XK_rcaron
        {0x016F, 0x01F9},    // XK_uring
        {0x0163, 0x01FE},    // XK_tcedilla
        {0x02D9, 0x01FF},    // XK_abovedot
        {0x0126, 0x02A1},    // XK_Hstroke
        {0x0124, 0x02A6},    // XK_Hcircumflex
        {0x0130, 0x02A9},    // XK_Iabovedot
        {0x011E, 0x02AB},    // XK_Gbreve
        {0x0134, 0x02AC},    // XK_Jcircumflex
        {0x0127, 0x02B1},    // XK_hstroke
        {0x0125, 0x02B6},    // XK_hcircumflex
        {0x0131, 0x02B9},    // XK_idotless
        {0x011F, 0x02BB},    // XK_gbreve
        {0x0135, 0x02BC},    // XK_jcircumflex
        {0x010A, 0x02C5},    // XK_Cabovedot
        {0x0108, 0x02C6},    // XK_Ccircumflex
        {0x0120, 0x02D5},    // XK_Gabovedot
        {0x011C, 0x02D8},    // XK_Gcircumflex
        {0x016C, 0x02DD},    // XK_Ubreve
        {0x015C, 0x02DE},    // XK_Scircumflex
        {0x010B, 0x02E5},    // XK_cabovedot
        {0x0109, 0x02E6},    // XK_ccircumflex
        {0x0121, 0x02F5},    // XK_gabovedot
        {0x011D, 0x02F8},    // XK_gcircumflex
        {0x016D, 0x02FD},    // XK_ubreve
        {0x015D, 0x02FE},    // XK_scircumflex
        {0x0138, 0x03A2},    // XK_kra
        {0x0156, 0x03A3},    // XK_Rcedilla
        {0x0128, 0x03A5},    // XK_Itilde
        {0x013B, 0x03A6},    // XK_Lcedilla
        {0x0112, 0x03AA},    // XK_Emacron
        {0x0122, 0x03AB},    // XK_Gcedilla
        {0x0166, 0x03AC},    // XK_Tslash
        {0x0157, 0x03B3},    // XK_rcedilla
        {0x0129, 0x03B5},    // XK_itilde
        {0x013C, 0x03B6},    // XK_lcedilla
        {0x0113, 0x03BA},    // XK_emacron
        {0x0123, 0x03BB},    // XK_gcedilla
        {0x0167, 0x03BC},    // XK_tslash
        {0x014A, 0x03BD},    // XK_ENG
        {0x014B, 0x03BF},    // XK_eng
        {0x0100, 0x03C0},    // XK_Amacron
        {0x012E, 0x03C7},    // XK_Iogonek
        {0x0116, 0x03CC},    // XK_Eabovedot
        {0x012A, 0x03CF},    // XK_Imacron
        {0x0145, 0x03D1},    // XK_Ncedilla
        {0x014C, 0x03D2},    // XK_Omacron
        {0x0136, 0x03D3},    // XK_Kcedilla
        {0x0172, 0x03D9},    // XK_Uogonek
        {0x0168, 0x03DD},    // XK_Utilde
        {0x016A, 0x03DE},    // XK_Umacron
        {0x0101, 0x03E0},    // XK_amacron
        {0x012F, 0x03E7},    // XK_iogonek
        {0x0117, 0x03EC},    // XK_eabovedot
        {0x012B, 0x03EF},    // XK_imacron
        {0x0146, 0x03F1},    // XK_ncedilla
        {0x014D, 0x03F2},    // XK_omacron
        {0x0137, 0x03F3},    // XK_kcedilla
        {0x0173, 0x03F9},    // XK_uogonek
        {0x0169, 0x03FD},    // XK_utilde
        {0x016B, 0x03FE},    // XK_umacron
        {0x1E02, 0x1001E02}, // XK_Babovedot
        {0x1E03, 0x1001E03}, // XK_babovedot
        {0x1E0A, 0x1001E0A}, // XK_Dabovedot
        {0x1E80, 0x1001E80}, // XK_Wgrave
        {0x1E82, 0x1001E82}, // XK_Wacute
        {0x1E0B, 0x1001E0B}, // XK_dabovedot
        {0x1EF2, 0x1001EF2}, // XK_Ygrave
        {0x1E1E, 0x1001E1E}, // XK_Fabovedot
        {0x1E1F, 0x1001E1F}, // XK_fabovedot
        {0x1E40, 0x1001E40}, // XK_Mabovedot
        {0x1E41, 0x1001E41}, // XK_mabovedot
        {0x1E56, 0x1001E56}, // XK_Pabovedot
        {0x1E81, 0x1001E81}, // XK_wgrave
        {0x1E57, 0x1001E57}, // XK_pabovedot
        {0x1E83, 0x1001E83}, // XK_wacute
        {0x1E60, 0x1001E60}, // XK_Sabovedot
        {0x1EF3, 0x1001EF3}, // XK_ygrave
        {0x1E84, 0x1001E84}, // XK_Wdiaeresis
        {0x1E85, 0x1001E85}, // XK_wdiaeresis
        {0x1E61, 0x1001E61}, // XK_sabovedot
        {0x0174, 0x1000174}, // XK_Wcircumflex
        {0x1E6A, 0x1001E6A}, // XK_Tabovedot
        {0x0176, 0x1000176}, // XK_Ycircumflex
        {0x0175, 0x1000175}, // XK_wcircumflex
        {0x1E6B, 0x1001E6B}, // XK_tabovedot
        {0x0177, 0x1000177}, // XK_ycircumflex
        {0x0152, 0x13BC},    // XK_OE
        {0x0153, 0x13BD},    // XK_oe
        {0x0178, 0x13BE},    // XK_Ydiaeresis
        {0x203E, 0x047E},    // XK_overline
        {0x3002, 0x04A1},    // XK_kana_fullstop
        {0x300C, 0x04A2},    // XK_kana_openingbracket
        {0x300D, 0x04A3},    // XK_kana_closingbracket
        {0x3001, 0x04A4},    // XK_kana_comma
        {0x30FB, 0x04A5},    // XK_kana_conjunctive
        {0x30F2, 0x04A6},    // XK_kana_WO
        {0x30A1, 0x04A7},    // XK_kana_a
        {0x30A3, 0x04A8},    // XK_kana_i
        {0x30A5, 0x04A9},    // XK_kana_u
        {0x30A7, 0x04AA},    // XK_kana_e
        {0x30A9, 0x04AB},    // XK_kana_o
        {0x30E3, 0x04AC},    // XK_kana_ya
        {0x30E5, 0x04AD},    // XK_kana_yu
        {0x30E7, 0x04AE},    // XK_kana_yo
        {0x30C3, 0x04AF},    // XK_kana_tsu
        {0x30FC, 0x04B0},    // XK_prolongedsound
        {0x30A2, 0x04B1},    // XK_kana_A
        {0x30A4, 0x04B2},    // XK_kana_I
        {0x30A6, 0x04B3},    // XK_kana_U
        {0x30A8, 0x04B4},    // XK_kana_E
        {0x30AA, 0x04B5},    // XK_kana_O
        {0x30AB, 0x04B6},    // XK_kana_KA
        {0x30AD, 0x04B7},    // XK_kana_KI
        {0x30AF, 0x04B8},    // XK_kana_KU
        {0x30B1, 0x04B9},    // XK_kana_KE
        {0x30B3, 0x04BA},    // XK_kana_KO
        {0x30B5, 0x04BB},    // XK_kana_SA
        {0x30B7, 0x04BC},    // XK_kana_SHI
        {0x30B9, 0x04BD},    // XK_kana_SU
        {0x30BB, 0x04BE},    // XK_kana_SE
        {0x30BD, 0x04BF},    // XK_kana_SO
        {0x30BF, 0x04C0},    // XK_kana_TA
        {0x30C1, 0x04C1},    // XK_kana_CHI
        {0x30C4, 0x04C2},    // XK_kana_TSU
        {0x30C6, 0x04C3},    // XK_kana_TE
        {0x30C8, 0x04C4},    // XK_kana_TO
        {0x30CA, 0x04C5},    // XK_kana_NA
        {0x30CB, 0x04C6},    // XK_kana_NI
        {0x30CC, 0x04C7},    // XK_kana_NU
        {0x30CD, 0x04C8},    // XK_kana_NE
        {0x30CE, 0x04C9},    // XK_kana_NO
        {0x30CF, 0x04CA},    // XK_kana_HA
        {0x30D2, 0x04CB},    // XK_kana_HI
        {0x30D5, 0x04CC},    // XK_kana_FU
        {0x30D8, 0x04CD},    // XK_kana_HE
        {0x30DB, 0x04CE},    // XK_kana_HO
        {0x30DE, 0x04CF},    // XK_kana_MA
        {0x30DF, 0x04D0},    // XK_kana_MI
        {0x30E0, 0x04D1},    // XK_kana_MU
        {0x30E1, 0x04D2},    // XK_kana_ME
        {0x30E2, 0x04D3},    // XK_kana_MO
        {0x30E4, 0x04D4},    // XK_kana_YA
        {0x30E6, 0x04D5},    // XK_kana_YU
        {0x30E8, 0x04D6},    // XK_kana_YO
        {0x30E9, 0x04D7},    // XK_kana_RA
        {0x30EA, 0x04D8},    // XK_kana_RI
        {0x30EB, 0x04D9},    // XK_kana_RU
        {0x30EC, 0x04DA},    // XK_kana_RE
        {0x30ED, 0x04DB},    // XK_kana_RO
        {0x30EF, 0x04DC},    // XK_kana_WA
        {0x30F3, 0x04DD},    // XK_kana_N
        {0x309B, 0x04DE},    // XK_voicedsound
        {0x309C, 0x04DF},    // XK_semivoicedsound
        {0x06F0, 0x10006F0}, // XK_Farsi_0
        {0x06F1, 0x10006F1}, // XK_Farsi_1
        {0x06F2, 0x10006F2}, // XK_Farsi_2
        {0x06F3, 0x10006F3}, // XK_Farsi_3
        {0x06F4, 0x10006F4}, // XK_Farsi_4
        {0x06F5, 0x10006F5}, // XK_Farsi_5
        {0x06F6, 0x10006F6}, // XK_Farsi_6
        {0x06F7, 0x10006F7}, // XK_Farsi_7
        {0x06F8, 0x10006F8}, // XK_Farsi_8
        {0x06F9, 0x10006F9}, // XK_Farsi_9
        {0x066A, 0x100066A}, // XK_Arabic_percent
        {0x0670, 0x1000670}, // XK_Arabic_superscript_alef
        {0x0679, 0x1000679}, // XK_Arabic_tteh
        {0x067E, 0x100067E}, // XK_Arabic_peh
        {0x0686, 0x1000686}, // XK_Arabic_tcheh
        {0x0688, 0x1000688}, // XK_Arabic_ddal
        {0x0691, 0x1000691}, // XK_Arabic_rreh
        {0x060C, 0x05AC},    // XK_Arabic_comma
        {0x06D4, 0x10006D4}, // XK_Arabic_fullstop
        {0x0660, 0x1000660}, // XK_Arabic_0
        {0x0661, 0x1000661}, // XK_Arabic_1
        {0x0662, 0x1000662}, // XK_Arabic_2
        {0x0663, 0x1000663}, // XK_Arabic_3
        {0x0664, 0x1000664}, // XK_Arabic_4
        {0x0665, 0x1000665}, // XK_Arabic_5
        {0x0666, 0x1000666}, // XK_Arabic_6
        {0x0667, 0x1000667}, // XK_Arabic_7
        {0x0668, 0x1000668}, // XK_Arabic_8
        {0x0669, 0x1000669}, // XK_Arabic_9
        {0x061B, 0x05BB},    // XK_Arabic_semicolon
        {0x061F, 0x05BF},    // XK_Arabic_question_mark
        {0x0621, 0x05C1},    // XK_Arabic_hamza
        {0x0622, 0x05C2},    // XK_Arabic_maddaonalef
        {0x0623, 0x05C3},    // XK_Arabic_hamzaonalef
        {0x0624, 0x05C4},    // XK_Arabic_hamzaonwaw
        {0x0625, 0x05C5},    // XK_Arabic_hamzaunderalef
        {0x0626, 0x05C6},    // XK_Arabic_hamzaonyeh
        {0x0627, 0x05C7},    // XK_Arabic_alef
        {0x0628, 0x05C8},    // XK_Arabic_beh
        {0x0629, 0x05C9},    // XK_Arabic_tehmarbuta
        {0x062A, 0x05CA},    // XK_Arabic_teh
        {0x062B, 0x05CB},    // XK_Arabic_theh
        {0x062C, 0x05CC},    // XK_Arabic_jeem
        {0x062D, 0x05CD},    // XK_Arabic_hah
        {0x062E, 0x05CE},    // XK_Arabic_khah
        {0x062F, 0x05CF},    // XK_Arabic_dal
        {0x0630, 0x05D0},    // XK_Arabic_thal
        {0x0631, 0x05D1},    // XK_Arabic_ra
        {0x0632, 0x05D2},    // XK_Arabic_zain
        {0x0633, 0x05D3},    // XK_Arabic_seen
        {0x0634, 0x05D4},    // XK_Arabic_sheen
        {0x0635, 0x05D5},    // XK_Arabic_sad
        {0x0636, 0x05D6},    // XK_Arabic_dad
        {0x0637, 0x05D7},    // XK_Arabic_tah
        {0x0638, 0x05D8},    // XK_Arabic_zah
        {0x0639, 0x05D9},    // XK_Arabic_ain
        {0x063A, 0x05DA},    // XK_Arabic_ghain
        {0x0640, 0x05E0},    // XK_Arabic_tatweel
        {0x0641, 0x05E1},    // XK_Arabic_feh
        {0x0642, 0x05E2},    // XK_Arabic_qaf
        {0x0643, 0x05E3},    // XK_Arabic_kaf
        {0x0644, 0x05E4},    // XK_Arabic_lam
        {0x0645, 0x05E5},    // XK_Arabic_meem
        {0x0646, 0x05E6},    // XK_Arabic_noon
        {0x0647, 0x05E7},    // XK_Arabic_ha
        {0x0648, 0x05E8},    // XK_Arabic_waw
        {0x0649, 0x05E9},    // XK_Arabic_alefmaksura
        {0x064A, 0x05EA},    // XK_Arabic_yeh
        {0x064B, 0x05EB},    // XK_Arabic_fathatan
        {0x064C, 0x05EC},    // XK_Arabic_dammatan
        {0x064D, 0x05ED},    // XK_Arabic_kasratan
        {0x064E, 0x05EE},    // XK_Arabic_fatha
        {0x064F, 0x05EF},    // XK_Arabic_damma
        {0x0650, 0x05F0},    // XK_Arabic_kasra
        {0x0651, 0x05F1},    // XK_Arabic_shadda
        {0x0652, 0x05F2},    // XK_Arabic_sukun
        {0x0653, 0x1000653}, // XK_Arabic_madda_above
        {0x0654, 0x1000654}, // XK_Arabic_hamza_above
        {0x0655, 0x1000655}, // XK_Arabic_hamza_below
        {0x0698, 0x1000698}, // XK_Arabic_jeh
        {0x06A4, 0x10006A4}, // XK_Arabic_veh
        {0x06A9, 0x10006A9}, // XK_Arabic_keheh
        {0x06AF, 0x10006AF}, // XK_Arabic_gaf
        {0x06BA, 0x10006BA}, // XK_Arabic_noon_ghunna
        {0x06BE, 0x10006BE}, // XK_Arabic_heh_doachashmee
        {0x06CC, 0x10006CC}, // XK_Farsi_yeh
        {0x06CC, 0x10006CC}, // XK_Arabic_farsi_yeh
        {0x06D2, 0x10006D2}, // XK_Arabic_yeh_baree
        {0x06C1, 0x10006C1}, // XK_Arabic_heh_goal
        {0x0492, 0x1000492}, // XK_Cyrillic_GHE_bar
        {0x0493, 0x1000493}, // XK_Cyrillic_ghe_bar
        {0x0496, 0x1000496}, // XK_Cyrillic_ZHE_descender
        {0x0497, 0x1000497}, // XK_Cyrillic_zhe_descender
        {0x049A, 0x100049A}, // XK_Cyrillic_KA_descender
        {0x049B, 0x100049B}, // XK_Cyrillic_ka_descender
        {0x049C, 0x100049C}, // XK_Cyrillic_KA_vertstroke
        {0x049D, 0x100049D}, // XK_Cyrillic_ka_vertstroke
        {0x04A2, 0x10004A2}, // XK_Cyrillic_EN_descender
        {0x04A3, 0x10004A3}, // XK_Cyrillic_en_descender
        {0x04AE, 0x10004AE}, // XK_Cyrillic_U_straight
        {0x04AF, 0x10004AF}, // XK_Cyrillic_u_straight
        {0x04B0, 0x10004B0}, // XK_Cyrillic_U_straight_bar
        {0x04B1, 0x10004B1}, // XK_Cyrillic_u_straight_bar
        {0x04B2, 0x10004B2}, // XK_Cyrillic_HA_descender
        {0x04B3, 0x10004B3}, // XK_Cyrillic_ha_descender
        {0x04B6, 0x10004B6}, // XK_Cyrillic_CHE_descender
        {0x04B7, 0x10004B7}, // XK_Cyrillic_che_descender
        {0x04B8, 0x10004B8}, // XK_Cyrillic_CHE_vertstroke
        {0x04B9, 0x10004B9}, // XK_Cyrillic_che_vertstroke
        {0x04BA, 0x10004BA}, // XK_Cyrillic_SHHA
        {0x04BB, 0x10004BB}, // XK_Cyrillic_shha
        {0x04D8, 0x10004D8}, // XK_Cyrillic_SCHWA
        {0x04D9, 0x10004D9}, // XK_Cyrillic_schwa
        {0x04E2, 0x10004E2}, // XK_Cyrillic_I_macron
        {0x04E3, 0x10004E3}, // XK_Cyrillic_i_macron
        {0x04E8, 0x10004E8}, // XK_Cyrillic_O_bar
        {0x04E9, 0x10004E9}, // XK_Cyrillic_o_bar
        {0x04EE, 0x10004EE}, // XK_Cyrillic_U_macron
        {0x04EF, 0x10004EF}, // XK_Cyrillic_u_macron
        {0x0452, 0x06A1},    // XK_Serbian_dje
        {0x0453, 0x06A2},    // XK_Macedonia_gje
        {0x0451, 0x06A3},    // XK_Cyrillic_io
        {0x0454, 0x06A4},    // XK_Ukrainian_ie
        {0x0455, 0x06A5},    // XK_Macedonia_dse
        {0x0456, 0x06A6},    // XK_Ukrainian_i
        {0x0457, 0x06A7},    // XK_Ukrainian_yi
        {0x0458, 0x06A8},    // XK_Cyrillic_je
        {0x0459, 0x06A9},    // XK_Cyrillic_lje
        {0x045A, 0x06AA},    // XK_Cyrillic_nje
        {0x045B, 0x06AB},    // XK_Serbian_tshe
        {0x045C, 0x06AC},    // XK_Macedonia_kje
        {0x0491, 0x06AD},    // XK_Ukrainian_ghe_with_upturn
        {0x045E, 0x06AE},    // XK_Byelorussian_shortu
        {0x045F, 0x06AF},    // XK_Cyrillic_dzhe
        {0x2116, 0x06B0},    // XK_numerosign
        {0x0402, 0x06B1},    // XK_Serbian_DJE
        {0x0403, 0x06B2},    // XK_Macedonia_GJE
        {0x0401, 0x06B3},    // XK_Cyrillic_IO
        {0x0404, 0x06B4},    // XK_Ukrainian_IE
        {0x0405, 0x06B5},    // XK_Macedonia_DSE
        {0x0406, 0x06B6},    // XK_Ukrainian_I
        {0x0407, 0x06B7},    // XK_Ukrainian_YI
        {0x0408, 0x06B8},    // XK_Cyrillic_JE
        {0x0409, 0x06B9},    // XK_Cyrillic_LJE
        {0x040A, 0x06BA},    // XK_Cyrillic_NJE
        {0x040B, 0x06BB},    // XK_Serbian_TSHE
        {0x040C, 0x06BC},    // XK_Macedonia_KJE
        {0x0490, 0x06BD},    // XK_Ukrainian_GHE_WITH_UPTURN
        {0x040E, 0x06BE},    // XK_Byelorussian_SHORTU
        {0x040F, 0x06BF},    // XK_Cyrillic_DZHE
        {0x044E, 0x06C0},    // XK_Cyrillic_yu
        {0x0430, 0x06C1},    // XK_Cyrillic_a
        {0x0431, 0x06C2},    // XK_Cyrillic_be
        {0x0446, 0x06C3},    // XK_Cyrillic_tse
        {0x0434, 0x06C4},    // XK_Cyrillic_de
        {0x0435, 0x06C5},    // XK_Cyrillic_ie
        {0x0444, 0x06C6},    // XK_Cyrillic_ef
        {0x0433, 0x06C7},    // XK_Cyrillic_ghe
        {0x0445, 0x06C8},    // XK_Cyrillic_ha
        {0x0438, 0x06C9},    // XK_Cyrillic_i
        {0x0439, 0x06CA},    // XK_Cyrillic_shorti
        {0x043A, 0x06CB},    // XK_Cyrillic_ka
        {0x043B, 0x06CC},    // XK_Cyrillic_el
        {0x043C, 0x06CD},    // XK_Cyrillic_em
        {0x043D, 0x06CE},    // XK_Cyrillic_en
        {0x043E, 0x06CF},    // XK_Cyrillic_o
        {0x043F, 0x06D0},    // XK_Cyrillic_pe
        {0x044F, 0x06D1},    // XK_Cyrillic_ya
        {0x0440, 0x06D2},    // XK_Cyrillic_er
        {0x0441, 0x06D3},    // XK_Cyrillic_es
        {0x0442, 0x06D4},    // XK_Cyrillic_te
        {0x0443, 0x06D5},    // XK_Cyrillic_u
        {0x0436, 0x06D6},    // XK_Cyrillic_zhe
        {0x0432, 0x06D7},    // XK_Cyrillic_ve
        {0x044C, 0x06D8},    // XK_Cyrillic_softsign
        {0x044B, 0x06D9},    // XK_Cyrillic_yeru
        {0x0437, 0x06DA},    // XK_Cyrillic_ze
        {0x0448, 0x06DB},    // XK_Cyrillic_sha
        {0x044D, 0x06DC},    // XK_Cyrillic_e
        {0x0449, 0x06DD},    // XK_Cyrillic_shcha
        {0x0447, 0x06DE},    // XK_Cyrillic_che
        {0x044A, 0x06DF},    // XK_Cyrillic_hardsign
        {0x042E, 0x06E0},    // XK_Cyrillic_YU
        {0x0410, 0x06E1},    // XK_Cyrillic_A
        {0x0411, 0x06E2},    // XK_Cyrillic_BE
        {0x0426, 0x06E3},    // XK_Cyrillic_TSE
        {0x0414, 0x06E4},    // XK_Cyrillic_DE
        {0x0415, 0x06E5},    // XK_Cyrillic_IE
        {0x0424, 0x06E6},    // XK_Cyrillic_EF
        {0x0413, 0x06E7},    // XK_Cyrillic_GHE
        {0x0425, 0x06E8},    // XK_Cyrillic_HA
        {0x0418, 0x06E9},    // XK_Cyrillic_I
        {0x0419, 0x06EA},    // XK_Cyrillic_SHORTI
        {0x041A, 0x06EB},    // XK_Cyrillic_KA
        {0x041B, 0x06EC},    // XK_Cyrillic_EL
        {0x041C, 0x06ED},    // XK_Cyrillic_EM
        {0x041D, 0x06EE},    // XK_Cyrillic_EN
        {0x041E, 0x06EF},    // XK_Cyrillic_O
        {0x041F, 0x06F0},    // XK_Cyrillic_PE
        {0x042F, 0x06F1},    // XK_Cyrillic_YA
        {0x0420, 0x06F2},    // XK_Cyrillic_ER
        {0x0421, 0x06F3},    // XK_Cyrillic_ES
        {0x0422, 0x06F4},    // XK_Cyrillic_TE
        {0x0423, 0x06F5},    // XK_Cyrillic_U
        {0x0416, 0x06F6},    // XK_Cyrillic_ZHE
        {0x0412, 0x06F7},    // XK_Cyrillic_VE
        {0x042C, 0x06F8},    // XK_Cyrillic_SOFTSIGN
        {0x042B, 0x06F9},    // XK_Cyrillic_YERU
        {0x0417, 0x06FA},    // XK_Cyrillic_ZE
        {0x0428, 0x06FB},    // XK_Cyrillic_SHA
        {0x042D, 0x06FC},    // XK_Cyrillic_E
        {0x0429, 0x06FD},    // XK_Cyrillic_SHCHA
        {0x0427, 0x06FE},    // XK_Cyrillic_CHE
        {0x042A, 0x06FF},    // XK_Cyrillic_HARDSIGN
        {0x0386, 0x07A1},    // XK_Greek_ALPHAaccent
        {0x0388, 0x07A2},    // XK_Greek_EPSILONaccent
        {0x0389, 0x07A3},    // XK_Greek_ETAaccent
        {0x038A, 0x07A4},    // XK_Greek_IOTAaccent
        {0x03AA, 0x07A5},    // XK_Greek_IOTAdieresis
        {0x038C, 0x07A7},    // XK_Greek_OMICRONaccent
        {0x038E, 0x07A8},    // XK_Greek_UPSILONaccent
        {0x03AB, 0x07A9},    // XK_Greek_UPSILONdieresis
        {0x038F, 0x07AB},    // XK_Greek_OMEGAaccent
        {0x0385, 0x07AE},    // XK_Greek_accentdieresis
        {0x2015, 0x07AF},    // XK_Greek_horizbar
        {0x03AC, 0x07B1},    // XK_Greek_alphaaccent
        {0x03AD, 0x07B2},    // XK_Greek_epsilonaccent
        {0x03AE, 0x07B3},    // XK_Greek_etaaccent
        {0x03AF, 0x07B4},    // XK_Greek_iotaaccent
        {0x03CA, 0x07B5},    // XK_Greek_iotadieresis
        {0x0390, 0x07B6},    // XK_Greek_iotaaccentdieresis
        {0x03CC, 0x07B7},    // XK_Greek_omicronaccent
        {0x03CD, 0x07B8},    // XK_Greek_upsilonaccent
        {0x03CB, 0x07B9},    // XK_Greek_upsilondieresis
        {0x03B0, 0x07BA},    // XK_Greek_upsilonaccentdieresis
        {0x03CE, 0x07BB},    // XK_Greek_omegaaccent
        {0x0391, 0x07C1},    // XK_Greek_ALPHA
        {0x0392, 0x07C2},    // XK_Greek_BETA
        {0x0393, 0x07C3},    // XK_Greek_GAMMA
        {0x0394, 0x07C4},    // XK_Greek_DELTA
        {0x0395, 0x07C5},    // XK_Greek_EPSILON
        {0x0396, 0x07C6},    // XK_Greek_ZETA
        {0x0397, 0x07C7},    // XK_Greek_ETA
        {0x0398, 0x07C8},    // XK_Greek_THETA
        {0x0399, 0x07C9},    // XK_Greek_IOTA
        {0x039A, 0x07CA},    // XK_Greek_KAPPA
        {0x039B, 0x07CB},    // XK_Greek_LAMDA
        {0x039B, 0x07CB},    // XK_Greek_LAMBDA
        {0x039C, 0x07CC},    // XK_Greek_MU
        {0x039D, 0x07CD},    // XK_Greek_NU
        {0x039E, 0x07CE},    // XK_Greek_XI
        {0x039F, 0x07CF},    // XK_Greek_OMICRON
        {0x03A0, 0x07D0},    // XK_Greek_PI
        {0x03A1, 0x07D1},    // XK_Greek_RHO
        {0x03A3, 0x07D2},    // XK_Greek_SIGMA
        {0x03A4, 0x07D4},    // XK_Greek_TAU
        {0x03A5, 0x07D5},    // XK_Greek_UPSILON
        {0x03A6, 0x07D6},    // XK_Greek_PHI
        {0x03A7, 0x07D7},    // XK_Greek_CHI
        {0x03A8, 0x07D8},    // XK_Greek_PSI
        {0x03A9, 0x07D9},    // XK_Greek_OMEGA
        {0x03B1, 0x07E1},    // XK_Greek_alpha
        {0x03B2, 0x07E2},    // XK_Greek_beta
        {0x03B3, 0x07E3},    // XK_Greek_gamma
        {0x03B4, 0x07E4},    // XK_Greek_delta
        {0x03B5, 0x07E5},    // XK_Greek_epsilon
        {0x03B6, 0x07E6},    // XK_Greek_zeta
        {0x03B7, 0x07E7},    // XK_Greek_eta
        {0x03B8, 0x07E8},    // XK_Greek_theta
        {0x03B9, 0x07E9},    // XK_Greek_iota
        {0x03BA, 0x07EA},    // XK_Greek_kappa
        {0x03BB, 0x07EB},    // XK_Greek_lamda
        {0x03BB, 0x07EB},    // XK_Greek_lambda
        {0x03BC, 0x07EC},    // XK_Greek_mu
        {0x03BD, 0x07ED},    // XK_Greek_nu
        {0x03BE, 0x07EE},    // XK_Greek_xi
        {0x03BF, 0x07EF},    // XK_Greek_omicron
        {0x03C0, 0x07F0},    // XK_Greek_pi
        {0x03C1, 0x07F1},    // XK_Greek_rho
        {0x03C3, 0x07F2},    // XK_Greek_sigma
        {0x03C2, 0x07F3},    // XK_Greek_finalsmallsigma
        {0x03C4, 0x07F4},    // XK_Greek_tau
        {0x03C5, 0x07F5},    // XK_Greek_upsilon
        {0x03C6, 0x07F6},    // XK_Greek_phi
        {0x03C7, 0x07F7},    // XK_Greek_chi
        {0x03C8, 0x07F8},    // XK_Greek_psi
        {0x03C9, 0x07F9},    // XK_Greek_omega
        {0x23B7, 0x08A1},    // XK_leftradical
        {0x2320, 0x08A4},    // XK_topintegral
        {0x2321, 0x08A5},    // XK_botintegral
        {0x23A1, 0x08A7},    // XK_topleftsqbracket
        {0x23A3, 0x08A8},    // XK_botleftsqbracket
        {0x23A4, 0x08A9},    // XK_toprightsqbracket
        {0x23A6, 0x08AA},    // XK_botrightsqbracket
        {0x239B, 0x08AB},    // XK_topleftparens
        {0x239D, 0x08AC},    // XK_botleftparens
        {0x239E, 0x08AD},    // XK_toprightparens
        {0x23A0, 0x08AE},    // XK_botrightparens
        {0x23A8, 0x08AF},    // XK_leftmiddlecurlybrace
        {0x23AC, 0x08B0},    // XK_rightmiddlecurlybrace
        {0x2264, 0x08BC},    // XK_lessthanequal
        {0x2260, 0x08BD},    // XK_notequal
        {0x2265, 0x08BE},    // XK_greaterthanequal
        {0x222B, 0x08BF},    // XK_integral
        {0x2234, 0x08C0},    // XK_therefore
        {0x221D, 0x08C1},    // XK_variation
        {0x221E, 0x08C2},    // XK_infinity
        {0x2207, 0x08C5},    // XK_nabla
        {0x223C, 0x08C8},    // XK_approximate
        {0x2243, 0x08C9},    // XK_similarequal
        {0x21D4, 0x08CD},    // XK_ifonlyif
        {0x21D2, 0x08CE},    // XK_implies
        {0x2261, 0x08CF},    // XK_identical
        {0x221A, 0x08D6},    // XK_radical
        {0x2282, 0x08DA},    // XK_includedin
        {0x2283, 0x08DB},    // XK_includes
        {0x2229, 0x08DC},    // XK_intersection
        {0x222A, 0x08DD},    // XK_union
        {0x2227, 0x08DE},    // XK_logicaland
        {0x2228, 0x08DF},    // XK_logicalor
        {0x2202, 0x08EF},    // XK_partialderivative
        {0x0192, 0x08F6},    // XK_function
        {0x2190, 0x08FB},    // XK_leftarrow
        {0x2191, 0x08FC},    // XK_uparrow
        {0x2192, 0x08FD},    // XK_rightarrow
        {0x2193, 0x08FE},    // XK_downarrow
        {0x25C6, 0x09E0},    // XK_soliddiamond
        {0x2592, 0x09E1},    // XK_checkerboard
        {0x2409, 0x09E2},    // XK_ht
        {0x240C, 0x09E3},    // XK_ff
        {0x240D, 0x09E4},    // XK_cr
        {0x240A, 0x09E5},    // XK_lf
        {0x2424, 0x09E8},    // XK_nl
        {0x240B, 0x09E9},    // XK_vt
        {0x2518, 0x09EA},    // XK_lowrightcorner
        {0x2510, 0x09EB},    // XK_uprightcorner
        {0x250C, 0x09EC},    // XK_upleftcorner
        {0x2514, 0x09ED},    // XK_lowleftcorner
        {0x253C, 0x09EE},    // XK_crossinglines
        {0x23BA, 0x09EF},    // XK_horizlinescan1
        {0x23BB, 0x09F0},    // XK_horizlinescan3
        {0x2500, 0x09F1},    // XK_horizlinescan5
        {0x23BC, 0x09F2},    // XK_horizlinescan7
        {0x23BD, 0x09F3},    // XK_horizlinescan9
        {0x251C, 0x09F4},    // XK_leftt
        {0x2524, 0x09F5},    // XK_rightt
        {0x2534, 0x09F6},    // XK_bott
        {0x252C, 0x09F7},    // XK_topt
        {0x2502, 0x09F8},    // XK_vertbar
        {0x2003, 0x0AA1},    // XK_emspace
        {0x2002, 0x0AA2},    // XK_enspace
        {0x2004, 0x0AA3},    // XK_em3space
        {0x2005, 0x0AA4},    // XK_em4space
        {0x2007, 0x0AA5},    // XK_digitspace
        {0x2008, 0x0AA6},    // XK_punctspace
        {0x2009, 0x0AA7},    // XK_thinspace
        {0x200A, 0x0AA8},    // XK_hairspace
        {0x2014, 0x0AA9},    // XK_emdash
        {0x2013, 0x0AAA},    // XK_endash
        {0x2026, 0x0AAE},    // XK_ellipsis
        {0x2025, 0x0AAF},    // XK_doubbaselinedot
        {0x2153, 0x0AB0},    // XK_onethird
        {0x2154, 0x0AB1},    // XK_twothirds
        {0x2155, 0x0AB2},    // XK_onefifth
        {0x2156, 0x0AB3},    // XK_twofifths
        {0x2157, 0x0AB4},    // XK_threefifths
        {0x2158, 0x0AB5},    // XK_fourfifths
        {0x2159, 0x0AB6},    // XK_onesixth
        {0x215A, 0x0AB7},    // XK_fivesixths
        {0x2105, 0x0AB8},    // XK_careof
        {0x2012, 0x0ABB},    // XK_figdash
        {0x215B, 0x0AC3},    // XK_oneeighth
        {0x215C, 0x0AC4},    // XK_threeeighths
        {0x215D, 0x0AC5},    // XK_fiveeighths
        {0x215E, 0x0AC6},    // XK_seveneighths
        {0x2122, 0x0AC9},    // XK_trademark
        {0x2018, 0x0AD0},    // XK_leftsinglequotemark
        {0x2019, 0x0AD1},    // XK_rightsinglequotemark
        {0x201C, 0x0AD2},    // XK_leftdoublequotemark
        {0x201D, 0x0AD3},    // XK_rightdoublequotemark
        {0x211E, 0x0AD4},    // XK_prescription
        {0x2032, 0x0AD6},    // XK_minutes
        {0x2033, 0x0AD7},    // XK_seconds
        {0x271D, 0x0AD9},    // XK_latincross
        {0x2663, 0x0AEC},    // XK_club
        {0x2666, 0x0AED},    // XK_diamond
        {0x2665, 0x0AEE},    // XK_heart
        {0x2720, 0x0AF0},    // XK_maltesecross
        {0x2020, 0x0AF1},    // XK_dagger
        {0x2021, 0x0AF2},    // XK_doubledagger
        {0x2713, 0x0AF3},    // XK_checkmark
        {0x2717, 0x0AF4},    // XK_ballotcross
        {0x266F, 0x0AF5},    // XK_musicalsharp
        {0x266D, 0x0AF6},    // XK_musicalflat
        {0x2642, 0x0AF7},    // XK_malesymbol
        {0x2640, 0x0AF8},    // XK_femalesymbol
        {0x260E, 0x0AF9},    // XK_telephone
        {0x2315, 0x0AFA},    // XK_telephonerecorder
        {0x2117, 0x0AFB},    // XK_phonographcopyright
        {0x2038, 0x0AFC},    // XK_caret
        {0x201A, 0x0AFD},    // XK_singlelowquotemark
        {0x201E, 0x0AFE},    // XK_doublelowquotemark
        {0x22A4, 0x0BC2},    // XK_downtack
        {0x230A, 0x0BC4},    // XK_downstile
        {0x2218, 0x0BCA},    // XK_jot
        {0x2395, 0x0BCC},    // XK_quad
        {0x22A5, 0x0BCE},    // XK_uptack
        {0x25CB, 0x0BCF},    // XK_circle
        {0x2308, 0x0BD3},    // XK_upstile
        {0x22A3, 0x0BDC},    // XK_lefttack
        {0x22A2, 0x0BFC},    // XK_righttack
        {0x2017, 0x0CDF},    // XK_hebrew_doublelowline
        {0x05D0, 0x0CE0},    // XK_hebrew_aleph
        {0x05D1, 0x0CE1},    // XK_hebrew_bet
        {0x05D2, 0x0CE2},    // XK_hebrew_gimel
        {0x05D3, 0x0CE3},    // XK_hebrew_dalet
        {0x05D4, 0x0CE4},    // XK_hebrew_he
        {0x05D5, 0x0CE5},    // XK_hebrew_waw
        {0x05D6, 0x0CE6},    // XK_hebrew_zain
        {0x05D7, 0x0CE7},    // XK_hebrew_chet
        {0x05D8, 0x0CE8},    // XK_hebrew_tet
        {0x05D9, 0x0CE9},    // XK_hebrew_yod
        {0x05DA, 0x0CEA},    // XK_hebrew_finalkaph
        {0x05DB, 0x0CEB},    // XK_hebrew_kaph
        {0x05DC, 0x0CEC},    // XK_hebrew_lamed
        {0x05DD, 0x0CED},    // XK_hebrew_finalmem
        {0x05DE, 0x0CEE},    // XK_hebrew_mem
        {0x05DF, 0x0CEF},    // XK_hebrew_finalnun
        {0x05E0, 0x0CF0},    // XK_hebrew_nun
        {0x05E1, 0x0CF1},    // XK_hebrew_samech
        {0x05E2, 0x0CF2},    // XK_hebrew_ayin
        {0x05E3, 0x0CF3},    // XK_hebrew_finalpe
        {0x05E4, 0x0CF4},    // XK_hebrew_pe
        {0x05E5, 0x0CF5},    // XK_hebrew_finalzade
        {0x05E6, 0x0CF6},    // XK_hebrew_zade
        {0x05E7, 0x0CF7},    // XK_hebrew_qoph
        {0x05E8, 0x0CF8},    // XK_hebrew_resh
        {0x05E9, 0x0CF9},    // XK_hebrew_shin
        {0x05EA, 0x0CFA},    // XK_hebrew_taw
        {0x0E01, 0x0DA1},    // XK_Thai_kokai
        {0x0E02, 0x0DA2},    // XK_Thai_khokhai
        {0x0E03, 0x0DA3},    // XK_Thai_khokhuat
        {0x0E04, 0x0DA4},    // XK_Thai_khokhwai
        {0x0E05, 0x0DA5},    // XK_Thai_khokhon
        {0x0E06, 0x0DA6},    // XK_Thai_khorakhang
        {0x0E07, 0x0DA7},    // XK_Thai_ngongu
        {0x0E08, 0x0DA8},    // XK_Thai_chochan
        {0x0E09, 0x0DA9},    // XK_Thai_choching
        {0x0E0A, 0x0DAA},    // XK_Thai_chochang
        {0x0E0B, 0x0DAB},    // XK_Thai_soso
        {0x0E0C, 0x0DAC},    // XK_Thai_chochoe
        {0x0E0D, 0x0DAD},    // XK_Thai_yoying
        {0x0E0E, 0x0DAE},    // XK_Thai_dochada
        {0x0E0F, 0x0DAF},    // XK_Thai_topatak
        {0x0E10, 0x0DB0},    // XK_Thai_thothan
        {0x0E11, 0x0DB1},    // XK_Thai_thonangmontho
        {0x0E12, 0x0DB2},    // XK_Thai_thophuthao
        {0x0E13, 0x0DB3},    // XK_Thai_nonen
        {0x0E14, 0x0DB4},    // XK_Thai_dodek
        {0x0E15, 0x0DB5},    // XK_Thai_totao
        {0x0E16, 0x0DB6},    // XK_Thai_thothung
        {0x0E17, 0x0DB7},    // XK_Thai_thothahan
        {0x0E18, 0x0DB8},    // XK_Thai_thothong
        {0x0E19, 0x0DB9},    // XK_Thai_nonu
        {0x0E1A, 0x0DBA},    // XK_Thai_bobaimai
        {0x0E1B, 0x0DBB},    // XK_Thai_popla
        {0x0E1C, 0x0DBC},    // XK_Thai_phophung
        {0x0E1D, 0x0DBD},    // XK_Thai_fofa
        {0x0E1E, 0x0DBE},    // XK_Thai_phophan
        {0x0E1F, 0x0DBF},    // XK_Thai_fofan
        {0x0E20, 0x0DC0},    // XK_Thai_phosamphao
        {0x0E21, 0x0DC1},    // XK_Thai_moma
        {0x0E22, 0x0DC2},    // XK_Thai_yoyak
        {0x0E23, 0x0DC3},    // XK_Thai_rorua
        {0x0E24, 0x0DC4},    // XK_Thai_ru
        {0x0E25, 0x0DC5},    // XK_Thai_loling
        {0x0E26, 0x0DC6},    // XK_Thai_lu
        {0x0E27, 0x0DC7},    // XK_Thai_wowaen
        {0x0E28, 0x0DC8},    // XK_Thai_sosala
        {0x0E29, 0x0DC9},    // XK_Thai_sorusi
        {0x0E2A, 0x0DCA},    // XK_Thai_sosua
        {0x0E2B, 0x0DCB},    // XK_Thai_hohip
        {0x0E2C, 0x0DCC},    // XK_Thai_lochula
        {0x0E2D, 0x0DCD},    // XK_Thai_oang
        {0x0E2E, 0x0DCE},    // XK_Thai_honokhuk
        {0x0E2F, 0x0DCF},    // XK_Thai_paiyannoi
        {0x0E30, 0x0DD0},    // XK_Thai_saraa
        {0x0E31, 0x0DD1},    // XK_Thai_maihanakat
        {0x0E32, 0x0DD2},    // XK_Thai_saraaa
        {0x0E33, 0x0DD3},    // XK_Thai_saraam
        {0x0E34, 0x0DD4},    // XK_Thai_sarai
        {0x0E35, 0x0DD5},    // XK_Thai_saraii
        {0x0E36, 0x0DD6},    // XK_Thai_saraue
        {0x0E37, 0x0DD7},    // XK_Thai_sarauee
        {0x0E38, 0x0DD8},    // XK_Thai_sarau
        {0x0E39, 0x0DD9},    // XK_Thai_sarauu
        {0x0E3A, 0x0DDA},    // XK_Thai_phinthu
        {0x0E3F, 0x0DDF},    // XK_Thai_baht
        {0x0E40, 0x0DE0},    // XK_Thai_sarae
        {0x0E41, 0x0DE1},    // XK_Thai_saraae
        {0x0E42, 0x0DE2},    // XK_Thai_sarao
        {0x0E43, 0x0DE3},    // XK_Thai_saraaimaimuan
        {0x0E44, 0x0DE4},    // XK_Thai_saraaimaimalai
        {0x0E45, 0x0DE5},    // XK_Thai_lakkhangyao
        {0x0E46, 0x0DE6},    // XK_Thai_maiyamok
        {0x0E47, 0x0DE7},    // XK_Thai_maitaikhu
        {0x0E48, 0x0DE8},    // XK_Thai_maiek
        {0x0E49, 0x0DE9},    // XK_Thai_maitho
        {0x0E4A, 0x0DEA},    // XK_Thai_maitri
        {0x0E4B, 0x0DEB},    // XK_Thai_maichattawa
        {0x0E4C, 0x0DEC},    // XK_Thai_thanthakhat
        {0x0E4D, 0x0DED},    // XK_Thai_nikhahit
        {0x0E50, 0x0DF0},    // XK_Thai_leksun
        {0x0E51, 0x0DF1},    // XK_Thai_leknung
        {0x0E52, 0x0DF2},    // XK_Thai_leksong
        {0x0E53, 0x0DF3},    // XK_Thai_leksam
        {0x0E54, 0x0DF4},    // XK_Thai_leksi
        {0x0E55, 0x0DF5},    // XK_Thai_lekha
        {0x0E56, 0x0DF6},    // XK_Thai_lekhok
        {0x0E57, 0x0DF7},    // XK_Thai_lekchet
        {0x0E58, 0x0DF8},    // XK_Thai_lekpaet
        {0x0E59, 0x0DF9},    // XK_Thai_lekkao
        {0x0587, 0x1000587}, // XK_Armenian_ligature_ew
        {0x0589, 0x1000589}, // XK_Armenian_full_stop
        {0x0589, 0x1000589}, // XK_Armenian_verjaket
        {0x055D, 0x100055D}, // XK_Armenian_separation_mark
        {0x055D, 0x100055D}, // XK_Armenian_but
        {0x058A, 0x100058A}, // XK_Armenian_hyphen
        {0x058A, 0x100058A}, // XK_Armenian_yentamna
        {0x055C, 0x100055C}, // XK_Armenian_exclam
        {0x055C, 0x100055C}, // XK_Armenian_amanak
        {0x055B, 0x100055B}, // XK_Armenian_accent
        {0x055B, 0x100055B}, // XK_Armenian_shesht
        {0x055E, 0x100055E}, // XK_Armenian_question
        {0x055E, 0x100055E}, // XK_Armenian_paruyk
        {0x0531, 0x1000531}, // XK_Armenian_AYB
        {0x0561, 0x1000561}, // XK_Armenian_ayb
        {0x0532, 0x1000532}, // XK_Armenian_BEN
        {0x0562, 0x1000562}, // XK_Armenian_ben
        {0x0533, 0x1000533}, // XK_Armenian_GIM
        {0x0563, 0x1000563}, // XK_Armenian_gim
        {0x0534, 0x1000534}, // XK_Armenian_DA
        {0x0564, 0x1000564}, // XK_Armenian_da
        {0x0535, 0x1000535}, // XK_Armenian_YECH
        {0x0565, 0x1000565}, // XK_Armenian_yech
        {0x0536, 0x1000536}, // XK_Armenian_ZA
        {0x0566, 0x1000566}, // XK_Armenian_za
        {0x0537, 0x1000537}, // XK_Armenian_E
        {0x0567, 0x1000567}, // XK_Armenian_e
        {0x0538, 0x1000538}, // XK_Armenian_AT
        {0x0568, 0x1000568}, // XK_Armenian_at
        {0x0539, 0x1000539}, // XK_Armenian_TO
        {0x0569, 0x1000569}, // XK_Armenian_to
        {0x053A, 0x100053A}, // XK_Armenian_ZHE
        {0x056A, 0x100056A}, // XK_Armenian_zhe
        {0x053B, 0x100053B}, // XK_Armenian_INI
        {0x056B, 0x100056B}, // XK_Armenian_ini
        {0x053C, 0x100053C}, // XK_Armenian_LYUN
        {0x056C, 0x100056C}, // XK_Armenian_lyun
        {0x053D, 0x100053D}, // XK_Armenian_KHE
        {0x056D, 0x100056D}, // XK_Armenian_khe
        {0x053E, 0x100053E}, // XK_Armenian_TSA
        {0x056E, 0x100056E}, // XK_Armenian_tsa
        {0x053F, 0x100053F}, // XK_Armenian_KEN
        {0x056F, 0x100056F}, // XK_Armenian_ken
        {0x0540, 0x1000540}, // XK_Armenian_HO
        {0x0570, 0x1000570}, // XK_Armenian_ho
        {0x0541, 0x1000541}, // XK_Armenian_DZA
        {0x0571, 0x1000571}, // XK_Armenian_dza
        {0x0542, 0x1000542}, // XK_Armenian_GHAT
        {0x0572, 0x1000572}, // XK_Armenian_ghat
        {0x0543, 0x1000543}, // XK_Armenian_TCHE
        {0x0573, 0x1000573}, // XK_Armenian_tche
        {0x0544, 0x1000544}, // XK_Armenian_MEN
        {0x0574, 0x1000574}, // XK_Armenian_men
        {0x0545, 0x1000545}, // XK_Armenian_HI
        {0x0575, 0x1000575}, // XK_Armenian_hi
        {0x0546, 0x1000546}, // XK_Armenian_NU
        {0x0576, 0x1000576}, // XK_Armenian_nu
        {0x0547, 0x1000547}, // XK_Armenian_SHA
        {0x0577, 0x1000577}, // XK_Armenian_sha
        {0x0548, 0x1000548}, // XK_Armenian_VO
        {0x0578, 0x1000578}, // XK_Armenian_vo
        {0x0549, 0x1000549}, // XK_Armenian_CHA
        {0x0579, 0x1000579}, // XK_Armenian_cha
        {0x054A, 0x100054A}, // XK_Armenian_PE
        {0x057A, 0x100057A}, // XK_Armenian_pe
        {0x054B, 0x100054B}, // XK_Armenian_JE
        {0x057B, 0x100057B}, // XK_Armenian_je
        {0x054C, 0x100054C}, // XK_Armenian_RA
        {0x057C, 0x100057C}, // XK_Armenian_ra
        {0x054D, 0x100054D}, // XK_Armenian_SE
        {0x057D, 0x100057D}, // XK_Armenian_se
        {0x054E, 0x100054E}, // XK_Armenian_VEV
        {0x057E, 0x100057E}, // XK_Armenian_vev
        {0x054F, 0x100054F}, // XK_Armenian_TYUN
        {0x057F, 0x100057F}, // XK_Armenian_tyun
        {0x0550, 0x1000550}, // XK_Armenian_RE
        {0x0580, 0x1000580}, // XK_Armenian_re
        {0x0551, 0x1000551}, // XK_Armenian_TSO
        {0x0581, 0x1000581}, // XK_Armenian_tso
        {0x0552, 0x1000552}, // XK_Armenian_VYUN
        {0x0582, 0x1000582}, // XK_Armenian_vyun
        {0x0553, 0x1000553}, // XK_Armenian_PYUR
        {0x0583, 0x1000583}, // XK_Armenian_pyur
        {0x0554, 0x1000554}, // XK_Armenian_KE
        {0x0584, 0x1000584}, // XK_Armenian_ke
        {0x0555, 0x1000555}, // XK_Armenian_O
        {0x0585, 0x1000585}, // XK_Armenian_o
        {0x0556, 0x1000556}, // XK_Armenian_FE
        {0x0586, 0x1000586}, // XK_Armenian_fe
        {0x055A, 0x100055A}, // XK_Armenian_apostrophe
        {0x10D0, 0x10010D0}, // XK_Georgian_an
        {0x10D1, 0x10010D1}, // XK_Georgian_ban
        {0x10D2, 0x10010D2}, // XK_Georgian_gan
        {0x10D3, 0x10010D3}, // XK_Georgian_don
        {0x10D4, 0x10010D4}, // XK_Georgian_en
        {0x10D5, 0x10010D5}, // XK_Georgian_vin
        {0x10D6, 0x10010D6}, // XK_Georgian_zen
        {0x10D7, 0x10010D7}, // XK_Georgian_tan
        {0x10D8, 0x10010D8}, // XK_Georgian_in
        {0x10D9, 0x10010D9}, // XK_Georgian_kan
        {0x10DA, 0x10010DA}, // XK_Georgian_las
        {0x10DB, 0x10010DB}, // XK_Georgian_man
        {0x10DC, 0x10010DC}, // XK_Georgian_nar
        {0x10DD, 0x10010DD}, // XK_Georgian_on
        {0x10DE, 0x10010DE}, // XK_Georgian_par
        {0x10DF, 0x10010DF}, // XK_Georgian_zhar
        {0x10E0, 0x10010E0}, // XK_Georgian_rae
        {0x10E1, 0x10010E1}, // XK_Georgian_san
        {0x10E2, 0x10010E2}, // XK_Georgian_tar
        {0x10E3, 0x10010E3}, // XK_Georgian_un
        {0x10E4, 0x10010E4}, // XK_Georgian_phar
        {0x10E5, 0x10010E5}, // XK_Georgian_khar
        {0x10E6, 0x10010E6}, // XK_Georgian_ghan
        {0x10E7, 0x10010E7}, // XK_Georgian_qar
        {0x10E8, 0x10010E8}, // XK_Georgian_shin
        {0x10E9, 0x10010E9}, // XK_Georgian_chin
        {0x10EA, 0x10010EA}, // XK_Georgian_can
        {0x10EB, 0x10010EB}, // XK_Georgian_jil
        {0x10EC, 0x10010EC}, // XK_Georgian_cil
        {0x10ED, 0x10010ED}, // XK_Georgian_char
        {0x10EE, 0x10010EE}, // XK_Georgian_xan
        {0x10EF, 0x10010EF}, // XK_Georgian_jhan
        {0x10F0, 0x10010F0}, // XK_Georgian_hae
        {0x10F1, 0x10010F1}, // XK_Georgian_he
        {0x10F2, 0x10010F2}, // XK_Georgian_hie
        {0x10F3, 0x10010F3}, // XK_Georgian_we
        {0x10F4, 0x10010F4}, // XK_Georgian_har
        {0x10F5, 0x10010F5}, // XK_Georgian_hoe
        {0x10F6, 0x10010F6}, // XK_Georgian_fi
        {0x1E8A, 0x1001E8A}, // XK_Xabovedot
        {0x012C, 0x100012C}, // XK_Ibreve
        {0x01B5, 0x10001B5}, // XK_Zstroke
        {0x01E6, 0x10001E6}, // XK_Gcaron
        {0x01D2, 0x10001D1}, // XK_Ocaron
        {0x019F, 0x100019F}, // XK_Obarred
        {0x1E8B, 0x1001E8B}, // XK_xabovedot
        {0x012D, 0x100012D}, // XK_ibreve
        {0x01B6, 0x10001B6}, // XK_zstroke
        {0x01E7, 0x10001E7}, // XK_gcaron
        {0x01D2, 0x10001D2}, // XK_ocaron
        {0x0275, 0x1000275}, // XK_obarred
        {0x018F, 0x100018F}, // XK_SCHWA
        {0x0259, 0x1000259}, // XK_schwa
        {0x1E36, 0x1001E36}, // XK_Lbelowdot
        {0x1E37, 0x1001E37}, // XK_lbelowdot
        {0x1EA0, 0x1001EA0}, // XK_Abelowdot
        {0x1EA1, 0x1001EA1}, // XK_abelowdot
        {0x1EA2, 0x1001EA2}, // XK_Ahook
        {0x1EA3, 0x1001EA3}, // XK_ahook
        {0x1EA4, 0x1001EA4}, // XK_Acircumflexacute
        {0x1EA5, 0x1001EA5}, // XK_acircumflexacute
        {0x1EA6, 0x1001EA6}, // XK_Acircumflexgrave
        {0x1EA7, 0x1001EA7}, // XK_acircumflexgrave
        {0x1EA8, 0x1001EA8}, // XK_Acircumflexhook
        {0x1EA9, 0x1001EA9}, // XK_acircumflexhook
        {0x1EAA, 0x1001EAA}, // XK_Acircumflextilde
        {0x1EAB, 0x1001EAB}, // XK_acircumflextilde
        {0x1EAC, 0x1001EAC}, // XK_Acircumflexbelowdot
        {0x1EAD, 0x1001EAD}, // XK_acircumflexbelowdot
        {0x1EAE, 0x1001EAE}, // XK_Abreveacute
        {0x1EAF, 0x1001EAF}, // XK_abreveacute
        {0x1EB0, 0x1001EB0}, // XK_Abrevegrave
        {0x1EB1, 0x1001EB1}, // XK_abrevegrave
        {0x1EB2, 0x1001EB2}, // XK_Abrevehook
        {0x1EB3, 0x1001EB3}, // XK_abrevehook
        {0x1EB4, 0x1001EB4}, // XK_Abrevetilde
        {0x1EB5, 0x1001EB5}, // XK_abrevetilde
        {0x1EB6, 0x1001EB6}, // XK_Abrevebelowdot
        {0x1EB7, 0x1001EB7}, // XK_abrevebelowdot
        {0x1EB8, 0x1001EB8}, // XK_Ebelowdot
        {0x1EB9, 0x1001EB9}, // XK_ebelowdot
        {0x1EBA, 0x1001EBA}, // XK_Ehook
        {0x1EBB, 0x1001EBB}, // XK_ehook
        {0x1EBC, 0x1001EBC}, // XK_Etilde
        {0x1EBD, 0x1001EBD}, // XK_etilde
        {0x1EBE, 0x1001EBE}, // XK_Ecircumflexacute
        {0x1EBF, 0x1001EBF}, // XK_ecircumflexacute
        {0x1EC0, 0x1001EC0}, // XK_Ecircumflexgrave
        {0x1EC1, 0x1001EC1}, // XK_ecircumflexgrave
        {0x1EC2, 0x1001EC2}, // XK_Ecircumflexhook
        {0x1EC3, 0x1001EC3}, // XK_ecircumflexhook
        {0x1EC4, 0x1001EC4}, // XK_Ecircumflextilde
        {0x1EC5, 0x1001EC5}, // XK_ecircumflextilde
        {0x1EC6, 0x1001EC6}, // XK_Ecircumflexbelowdot
        {0x1EC7, 0x1001EC7}, // XK_ecircumflexbelowdot
        {0x1EC8, 0x1001EC8}, // XK_Ihook
        {0x1EC9, 0x1001EC9}, // XK_ihook
        {0x1ECA, 0x1001ECA}, // XK_Ibelowdot
        {0x1ECB, 0x1001ECB}, // XK_ibelowdot
        {0x1ECC, 0x1001ECC}, // XK_Obelowdot
        {0x1ECD, 0x1001ECD}, // XK_obelowdot
        {0x1ECE, 0x1001ECE}, // XK_Ohook
        {0x1ECF, 0x1001ECF}, // XK_ohook
        {0x1ED0, 0x1001ED0}, // XK_Ocircumflexacute
        {0x1ED1, 0x1001ED1}, // XK_ocircumflexacute
        {0x1ED2, 0x1001ED2}, // XK_Ocircumflexgrave
        {0x1ED3, 0x1001ED3}, // XK_ocircumflexgrave
        {0x1ED4, 0x1001ED4}, // XK_Ocircumflexhook
        {0x1ED5, 0x1001ED5}, // XK_ocircumflexhook
        {0x1ED6, 0x1001ED6}, // XK_Ocircumflextilde
        {0x1ED7, 0x1001ED7}, // XK_ocircumflextilde
        {0x1ED8, 0x1001ED8}, // XK_Ocircumflexbelowdot
        {0x1ED9, 0x1001ED9}, // XK_ocircumflexbelowdot
        {0x1EDA, 0x1001EDA}, // XK_Ohornacute
        {0x1EDB, 0x1001EDB}, // XK_ohornacute
        {0x1EDC, 0x1001EDC}, // XK_Ohorngrave
        {0x1EDD, 0x1001EDD}, // XK_ohorngrave
        {0x1EDE, 0x1001EDE}, // XK_Ohornhook
        {0x1EDF, 0x1001EDF}, // XK_ohornhook
        {0x1EE0, 0x1001EE0}, // XK_Ohorntilde
        {0x1EE1, 0x1001EE1}, // XK_ohorntilde
        {0x1EE2, 0x1001EE2}, // XK_Ohornbelowdot
        {0x1EE3, 0x1001EE3}, // XK_ohornbelowdot
        {0x1EE4, 0x1001EE4}, // XK_Ubelowdot
        {0x1EE5, 0x1001EE5}, // XK_ubelowdot
        {0x1EE6, 0x1001EE6}, // XK_Uhook
        {0x1EE7, 0x1001EE7}, // XK_uhook
        {0x1EE8, 0x1001EE8}, // XK_Uhornacute
        {0x1EE9, 0x1001EE9}, // XK_uhornacute
        {0x1EEA, 0x1001EEA}, // XK_Uhorngrave
        {0x1EEB, 0x1001EEB}, // XK_uhorngrave
        {0x1EEC, 0x1001EEC}, // XK_Uhornhook
        {0x1EED, 0x1001EED}, // XK_uhornhook
        {0x1EEE, 0x1001EEE}, // XK_Uhorntilde
        {0x1EEF, 0x1001EEF}, // XK_uhorntilde
        {0x1EF0, 0x1001EF0}, // XK_Uhornbelowdot
        {0x1EF1, 0x1001EF1}, // XK_uhornbelowdot
        {0x1EF4, 0x1001EF4}, // XK_Ybelowdot
        {0x1EF5, 0x1001EF5}, // XK_ybelowdot
        {0x1EF6, 0x1001EF6}, // XK_Yhook
        {0x1EF7, 0x1001EF7}, // XK_yhook
        {0x1EF8, 0x1001EF8}, // XK_Ytilde
        {0x1EF9, 0x1001EF9}, // XK_ytilde
        {0x01A0, 0x10001A0}, // XK_Ohorn
        {0x01A1, 0x10001A1}, // XK_ohorn
        {0x01AF, 0x10001AF}, // XK_Uhorn
        {0x01B0, 0x10001B0}, // XK_uhorn
        {0x20A0, 0x10020A0}, // XK_EcuSign
        {0x20A1, 0x10020A1}, // XK_ColonSign
        {0x20A2, 0x10020A2}, // XK_CruzeiroSign
        {0x20A3, 0x10020A3}, // XK_FFrancSign
        {0x20A4, 0x10020A4}, // XK_LiraSign
        {0x20A5, 0x10020A5}, // XK_MillSign
        {0x20A6, 0x10020A6}, // XK_NairaSign
        {0x20A7, 0x10020A7}, // XK_PesetaSign
        {0x20A8, 0x10020A8}, // XK_RupeeSign
        {0x20A9, 0x10020A9}, // XK_WonSign
        {0x20AA, 0x10020AA}, // XK_NewSheqelSign
        {0x20AB, 0x10020AB}, // XK_DongSign
        {0x20AC, 0x20AC},    // XK_EuroSign
        {0x2070, 0x1002070}, // XK_zerosuperior
        {0x2074, 0x1002074}, // XK_foursuperior
        {0x2075, 0x1002075}, // XK_fivesuperior
        {0x2076, 0x1002076}, // XK_sixsuperior
        {0x2077, 0x1002077}, // XK_sevensuperior
        {0x2078, 0x1002078}, // XK_eightsuperior
        {0x2079, 0x1002079}, // XK_ninesuperior
        {0x2080, 0x1002080}, // XK_zerosubscript
        {0x2081, 0x1002081}, // XK_onesubscript
        {0x2082, 0x1002082}, // XK_twosubscript
        {0x2083, 0x1002083}, // XK_threesubscript
        {0x2084, 0x1002084}, // XK_foursubscript
        {0x2085, 0x1002085}, // XK_fivesubscript
        {0x2086, 0x1002086}, // XK_sixsubscript
        {0x2087, 0x1002087}, // XK_sevensubscript
        {0x2088, 0x1002088}, // XK_eightsubscript
        {0x2089, 0x1002089}, // XK_ninesubscript
        {0x2202, 0x1002202}, // XK_partdifferential
        {0x2205, 0x1002205}, // XK_emptyset
        {0x2208, 0x1002208}, // XK_elementof
        {0x2209, 0x1002209}, // XK_notelementof
        {0x220B, 0x100220B}, // XK_containsas
        {0x221A, 0x100221A}, // XK_squareroot
        {0x221B, 0x100221B}, // XK_cuberoot
        {0x221C, 0x100221C}, // XK_fourthroot
        {0x222C, 0x100222C}, // XK_dintegral
        {0x222D, 0x100222D}, // XK_tintegral
        {0x2235, 0x1002235}, // XK_because
        {0x2245, 0x1002248}, // XK_approxeq
        {0x2247, 0x1002247}, // XK_notapproxeq
        {0x2262, 0x1002262}, // XK_notidentical
        {0x2263, 0x1002263}, // XK_stricteq
        {0x2800, 0x1002800}, // XK_braille_blank
        {0x2801, 0x1002801}, // XK_braille_dots_1
        {0x2802, 0x1002802}, // XK_braille_dots_2
        {0x2803, 0x1002803}, // XK_braille_dots_12
        {0x2804, 0x1002804}, // XK_braille_dots_3
        {0x2805, 0x1002805}, // XK_braille_dots_13
        {0x2806, 0x1002806}, // XK_braille_dots_23
        {0x2807, 0x1002807}, // XK_braille_dots_123
        {0x2808, 0x1002808}, // XK_braille_dots_4
        {0x2809, 0x1002809}, // XK_braille_dots_14
        {0x280A, 0x100280A}, // XK_braille_dots_24
        {0x280B, 0x100280B}, // XK_braille_dots_124
        {0x280C, 0x100280C}, // XK_braille_dots_34
        {0x280D, 0x100280D}, // XK_braille_dots_134
        {0x280E, 0x100280E}, // XK_braille_dots_234
        {0x280F, 0x100280F}, // XK_braille_dots_1234
        {0x2810, 0x1002810}, // XK_braille_dots_5
        {0x2811, 0x1002811}, // XK_braille_dots_15
        {0x2812, 0x1002812}, // XK_braille_dots_25
        {0x2813, 0x1002813}, // XK_braille_dots_125
        {0x2814, 0x1002814}, // XK_braille_dots_35
        {0x2815, 0x1002815}, // XK_braille_dots_135
        {0x2816, 0x1002816}, // XK_braille_dots_235
        {0x2817, 0x1002817}, // XK_braille_dots_1235
        {0x2818, 0x1002818}, // XK_braille_dots_45
        {0x2819, 0x1002819}, // XK_braille_dots_145
        {0x281A, 0x100281A}, // XK_braille_dots_245
        {0x281B, 0x100281B}, // XK_braille_dots_1245
        {0x281C, 0x100281C}, // XK_braille_dots_345
        {0x281D, 0x100281D}, // XK_braille_dots_1345
        {0x281E, 0x100281E}, // XK_braille_dots_2345
        {0x281F, 0x100281F}, // XK_braille_dots_12345
        {0x2820, 0x1002820}, // XK_braille_dots_6
        {0x2821, 0x1002821}, // XK_braille_dots_16
        {0x2822, 0x1002822}, // XK_braille_dots_26
        {0x2823, 0x1002823}, // XK_braille_dots_126
        {0x2824, 0x1002824}, // XK_braille_dots_36
        {0x2825, 0x1002825}, // XK_braille_dots_136
        {0x2826, 0x1002826}, // XK_braille_dots_236
        {0x2827, 0x1002827}, // XK_braille_dots_1236
        {0x2828, 0x1002828}, // XK_braille_dots_46
        {0x2829, 0x1002829}, // XK_braille_dots_146
        {0x282A, 0x100282A}, // XK_braille_dots_246
        {0x282B, 0x100282B}, // XK_braille_dots_1246
        {0x282C, 0x100282C}, // XK_braille_dots_346
        {0x282D, 0x100282D}, // XK_braille_dots_1346
        {0x282E, 0x100282E}, // XK_braille_dots_2346
        {0x282F, 0x100282F}, // XK_braille_dots_12346
        {0x2830, 0x1002830}, // XK_braille_dots_56
        {0x2831, 0x1002831}, // XK_braille_dots_156
        {0x2832, 0x1002832}, // XK_braille_dots_256
        {0x2833, 0x1002833}, // XK_braille_dots_1256
        {0x2834, 0x1002834}, // XK_braille_dots_356
        {0x2835, 0x1002835}, // XK_braille_dots_1356
        {0x2836, 0x1002836}, // XK_braille_dots_2356
        {0x2837, 0x1002837}, // XK_braille_dots_12356
        {0x2838, 0x1002838}, // XK_braille_dots_456
        {0x2839, 0x1002839}, // XK_braille_dots_1456
        {0x283A, 0x100283A}, // XK_braille_dots_2456
        {0x283B, 0x100283B}, // XK_braille_dots_12456
        {0x283C, 0x100283C}, // XK_braille_dots_3456
        {0x283D, 0x100283D}, // XK_braille_dots_13456
        {0x283E, 0x100283E}, // XK_braille_dots_23456
        {0x283F, 0x100283F}, // XK_braille_dots_123456
        {0x2840, 0x1002840}, // XK_braille_dots_7
        {0x2841, 0x1002841}, // XK_braille_dots_17
        {0x2842, 0x1002842}, // XK_braille_dots_27
        {0x2843, 0x1002843}, // XK_braille_dots_127
        {0x2844, 0x1002844}, // XK_braille_dots_37
        {0x2845, 0x1002845}, // XK_braille_dots_137
        {0x2846, 0x1002846}, // XK_braille_dots_237
        {0x2847, 0x1002847}, // XK_braille_dots_1237
        {0x2848, 0x1002848}, // XK_braille_dots_47
        {0x2849, 0x1002849}, // XK_braille_dots_147
        {0x284A, 0x100284A}, // XK_braille_dots_247
        {0x284B, 0x100284B}, // XK_braille_dots_1247
        {0x284C, 0x100284C}, // XK_braille_dots_347
        {0x284D, 0x100284D}, // XK_braille_dots_1347
        {0x284E, 0x100284E}, // XK_braille_dots_2347
        {0x284F, 0x100284F}, // XK_braille_dots_12347
        {0x2850, 0x1002850}, // XK_braille_dots_57
        {0x2851, 0x1002851}, // XK_braille_dots_157
        {0x2852, 0x1002852}, // XK_braille_dots_257
        {0x2853, 0x1002853}, // XK_braille_dots_1257
        {0x2854, 0x1002854}, // XK_braille_dots_357
        {0x2855, 0x1002855}, // XK_braille_dots_1357
        {0x2856, 0x1002856}, // XK_braille_dots_2357
        {0x2857, 0x1002857}, // XK_braille_dots_12357
        {0x2858, 0x1002858}, // XK_braille_dots_457
        {0x2859, 0x1002859}, // XK_braille_dots_1457
        {0x285A, 0x100285A}, // XK_braille_dots_2457
        {0x285B, 0x100285B}, // XK_braille_dots_12457
        {0x285C, 0x100285C}, // XK_braille_dots_3457
        {0x285D, 0x100285D}, // XK_braille_dots_13457
        {0x285E, 0x100285E}, // XK_braille_dots_23457
        {0x285F, 0x100285F}, // XK_braille_dots_123457
        {0x2860, 0x1002860}, // XK_braille_dots_67
        {0x2861, 0x1002861}, // XK_braille_dots_167
        {0x2862, 0x1002862}, // XK_braille_dots_267
        {0x2863, 0x1002863}, // XK_braille_dots_1267
        {0x2864, 0x1002864}, // XK_braille_dots_367
        {0x2865, 0x1002865}, // XK_braille_dots_1367
        {0x2866, 0x1002866}, // XK_braille_dots_2367
        {0x2867, 0x1002867}, // XK_braille_dots_12367
        {0x2868, 0x1002868}, // XK_braille_dots_467
        {0x2869, 0x1002869}, // XK_braille_dots_1467
        {0x286A, 0x100286A}, // XK_braille_dots_2467
        {0x286B, 0x100286B}, // XK_braille_dots_12467
        {0x286C, 0x100286C}, // XK_braille_dots_3467
        {0x286D, 0x100286D}, // XK_braille_dots_13467
        {0x286E, 0x100286E}, // XK_braille_dots_23467
        {0x286F, 0x100286F}, // XK_braille_dots_123467
        {0x2870, 0x1002870}, // XK_braille_dots_567
        {0x2871, 0x1002871}, // XK_braille_dots_1567
        {0x2872, 0x1002872}, // XK_braille_dots_2567
        {0x2873, 0x1002873}, // XK_braille_dots_12567
        {0x2874, 0x1002874}, // XK_braille_dots_3567
        {0x2875, 0x1002875}, // XK_braille_dots_13567
        {0x2876, 0x1002876}, // XK_braille_dots_23567
        {0x2877, 0x1002877}, // XK_braille_dots_123567
        {0x2878, 0x1002878}, // XK_braille_dots_4567
        {0x2879, 0x1002879}, // XK_braille_dots_14567
        {0x287A, 0x100287A}, // XK_braille_dots_24567
        {0x287B, 0x100287B}, // XK_braille_dots_124567
        {0x287C, 0x100287C}, // XK_braille_dots_34567
        {0x287D, 0x100287D}, // XK_braille_dots_134567
        {0x287E, 0x100287E}, // XK_braille_dots_234567
        {0x287F, 0x100287F}, // XK_braille_dots_1234567
        {0x2880, 0x1002880}, // XK_braille_dots_8
        {0x2881, 0x1002881}, // XK_braille_dots_18
        {0x2882, 0x1002882}, // XK_braille_dots_28
        {0x2883, 0x1002883}, // XK_braille_dots_128
        {0x2884, 0x1002884}, // XK_braille_dots_38
        {0x2885, 0x1002885}, // XK_braille_dots_138
        {0x2886, 0x1002886}, // XK_braille_dots_238
        {0x2887, 0x1002887}, // XK_braille_dots_1238
        {0x2888, 0x1002888}, // XK_braille_dots_48
        {0x2889, 0x1002889}, // XK_braille_dots_148
        {0x288A, 0x100288A}, // XK_braille_dots_248
        {0x288B, 0x100288B}, // XK_braille_dots_1248
        {0x288C, 0x100288C}, // XK_braille_dots_348
        {0x288D, 0x100288D}, // XK_braille_dots_1348
        {0x288E, 0x100288E}, // XK_braille_dots_2348
        {0x288F, 0x100288F}, // XK_braille_dots_12348
        {0x2890, 0x1002890}, // XK_braille_dots_58
        {0x2891, 0x1002891}, // XK_braille_dots_158
        {0x2892, 0x1002892}, // XK_braille_dots_258
        {0x2893, 0x1002893}, // XK_braille_dots_1258
        {0x2894, 0x1002894}, // XK_braille_dots_358
        {0x2895, 0x1002895}, // XK_braille_dots_1358
        {0x2896, 0x1002896}, // XK_braille_dots_2358
        {0x2897, 0x1002897}, // XK_braille_dots_12358
        {0x2898, 0x1002898}, // XK_braille_dots_458
        {0x2899, 0x1002899}, // XK_braille_dots_1458
        {0x289A, 0x100289A}, // XK_braille_dots_2458
        {0x289B, 0x100289B}, // XK_braille_dots_12458
        {0x289C, 0x100289C}, // XK_braille_dots_3458
        {0x289D, 0x100289D}, // XK_braille_dots_13458
        {0x289E, 0x100289E}, // XK_braille_dots_23458
        {0x289F, 0x100289F}, // XK_braille_dots_123458
        {0x28A0, 0x10028A0}, // XK_braille_dots_68
        {0x28A1, 0x10028A1}, // XK_braille_dots_168
        {0x28A2, 0x10028A2}, // XK_braille_dots_268
        {0x28A3, 0x10028A3}, // XK_braille_dots_1268
        {0x28A4, 0x10028A4}, // XK_braille_dots_368
        {0x28A5, 0x10028A5}, // XK_braille_dots_1368
        {0x28A6, 0x10028A6}, // XK_braille_dots_2368
        {0x28A7, 0x10028A7}, // XK_braille_dots_12368
        {0x28A8, 0x10028A8}, // XK_braille_dots_468
        {0x28A9, 0x10028A9}, // XK_braille_dots_1468
        {0x28AA, 0x10028AA}, // XK_braille_dots_2468
        {0x28AB, 0x10028AB}, // XK_braille_dots_12468
        {0x28AC, 0x10028AC}, // XK_braille_dots_3468
        {0x28AD, 0x10028AD}, // XK_braille_dots_13468
        {0x28AE, 0x10028AE}, // XK_braille_dots_23468
        {0x28AF, 0x10028AF}, // XK_braille_dots_123468
        {0x28B0, 0x10028B0}, // XK_braille_dots_568
        {0x28B1, 0x10028B1}, // XK_braille_dots_1568
        {0x28B2, 0x10028B2}, // XK_braille_dots_2568
        {0x28B3, 0x10028B3}, // XK_braille_dots_12568
        {0x28B4, 0x10028B4}, // XK_braille_dots_3568
        {0x28B5, 0x10028B5}, // XK_braille_dots_13568
        {0x28B6, 0x10028B6}, // XK_braille_dots_23568
        {0x28B7, 0x10028B7}, // XK_braille_dots_123568
        {0x28B8, 0x10028B8}, // XK_braille_dots_4568
        {0x28B9, 0x10028B9}, // XK_braille_dots_14568
        {0x28BA, 0x10028BA}, // XK_braille_dots_24568
        {0x28BB, 0x10028BB}, // XK_braille_dots_124568
        {0x28BC, 0x10028BC}, // XK_braille_dots_34568
        {0x28BD, 0x10028BD}, // XK_braille_dots_134568
        {0x28BE, 0x10028BE}, // XK_braille_dots_234568
        {0x28BF, 0x10028BF}, // XK_braille_dots_1234568
        {0x28C0, 0x10028C0}, // XK_braille_dots_78
        {0x28C1, 0x10028C1}, // XK_braille_dots_178
        {0x28C2, 0x10028C2}, // XK_braille_dots_278
        {0x28C3, 0x10028C3}, // XK_braille_dots_1278
        {0x28C4, 0x10028C4}, // XK_braille_dots_378
        {0x28C5, 0x10028C5}, // XK_braille_dots_1378
        {0x28C6, 0x10028C6}, // XK_braille_dots_2378
        {0x28C7, 0x10028C7}, // XK_braille_dots_12378
        {0x28C8, 0x10028C8}, // XK_braille_dots_478
        {0x28C9, 0x10028C9}, // XK_braille_dots_1478
        {0x28CA, 0x10028CA}, // XK_braille_dots_2478
        {0x28CB, 0x10028CB}, // XK_braille_dots_12478
        {0x28CC, 0x10028CC}, // XK_braille_dots_3478
        {0x28CD, 0x10028CD}, // XK_braille_dots_13478
        {0x28CE, 0x10028CE}, // XK_braille_dots_23478
        {0x28CF, 0x10028CF}, // XK_braille_dots_123478
        {0x28D0, 0x10028D0}, // XK_braille_dots_578
        {0x28D1, 0x10028D1}, // XK_braille_dots_1578
        {0x28D2, 0x10028D2}, // XK_braille_dots_2578
        {0x28D3, 0x10028D3}, // XK_braille_dots_12578
        {0x28D4, 0x10028D4}, // XK_braille_dots_3578
        {0x28D5, 0x10028D5}, // XK_braille_dots_13578
        {0x28D6, 0x10028D6}, // XK_braille_dots_23578
        {0x28D7, 0x10028D7}, // XK_braille_dots_123578
        {0x28D8, 0x10028D8}, // XK_braille_dots_4578
        {0x28D9, 0x10028D9}, // XK_braille_dots_14578
        {0x28DA, 0x10028DA}, // XK_braille_dots_24578
        {0x28DB, 0x10028DB}, // XK_braille_dots_124578
        {0x28DC, 0x10028DC}, // XK_braille_dots_34578
        {0x28DD, 0x10028DD}, // XK_braille_dots_134578
        {0x28DE, 0x10028DE}, // XK_braille_dots_234578
        {0x28DF, 0x10028DF}, // XK_braille_dots_1234578
        {0x28E0, 0x10028E0}, // XK_braille_dots_678
        {0x28E1, 0x10028E1}, // XK_braille_dots_1678
        {0x28E2, 0x10028E2}, // XK_braille_dots_2678
        {0x28E3, 0x10028E3}, // XK_braille_dots_12678
        {0x28E4, 0x10028E4}, // XK_braille_dots_3678
        {0x28E5, 0x10028E5}, // XK_braille_dots_13678
        {0x28E6, 0x10028E6}, // XK_braille_dots_23678
        {0x28E7, 0x10028E7}, // XK_braille_dots_123678
        {0x28E8, 0x10028E8}, // XK_braille_dots_4678
        {0x28E9, 0x10028E9}, // XK_braille_dots_14678
        {0x28EA, 0x10028EA}, // XK_braille_dots_24678
        {0x28EB, 0x10028EB}, // XK_braille_dots_124678
        {0x28EC, 0x10028EC}, // XK_braille_dots_34678
        {0x28ED, 0x10028ED}, // XK_braille_dots_134678
        {0x28EE, 0x10028EE}, // XK_braille_dots_234678
        {0x28EF, 0x10028EF}, // XK_braille_dots_1234678
        {0x28F0, 0x10028F0}, // XK_braille_dots_5678
        {0x28F1, 0x10028F1}, // XK_braille_dots_15678
        {0x28F2, 0x10028F2}, // XK_braille_dots_25678
        {0x28F3, 0x10028F3}, // XK_braille_dots_125678
        {0x28F4, 0x10028F4}, // XK_braille_dots_35678
        {0x28F5, 0x10028F5}, // XK_braille_dots_135678
        {0x28F6, 0x10028F6}, // XK_braille_dots_235678
        {0x28F7, 0x10028F7}, // XK_braille_dots_1235678
        {0x28F8, 0x10028F8}, // XK_braille_dots_45678
        {0x28F9, 0x10028F9}, // XK_braille_dots_145678
        {0x28FA, 0x10028FA}, // XK_braille_dots_245678
        {0x28FB, 0x10028FB}, // XK_braille_dots_1245678
        {0x28FC, 0x10028FC}, // XK_braille_dots_345678
        {0x28FD, 0x10028FD}, // XK_braille_dots_1345678
        {0x28FE, 0x10028FE}, // XK_braille_dots_2345678
        {0x28FF, 0x10028FF}, // XK_braille_dots_12345678
    };


    // convert Android keycodes into X11 keysyms
    public static final int[][] KEYCODE_TABLE = {
        {KeyEvent.KEYCODE_UNKNOWN,          0},
        {KeyEvent.KEYCODE_SOFT_LEFT,        0},
        {KeyEvent.KEYCODE_SOFT_RIGHT,       0},
        {KeyEvent.KEYCODE_HOME,             0},
        {KeyEvent.KEYCODE_BACK,             0xFF1B}, // XK_Escape
        {KeyEvent.KEYCODE_CALL,             0},
        {KeyEvent.KEYCODE_ENDCALL,          0},
        {KeyEvent.KEYCODE_STAR,             0x002A}, // XK_asterisk
        {KeyEvent.KEYCODE_POUND,            0x0023}, // XK_numbersign
        {KeyEvent.KEYCODE_DPAD_UP,          0xFF52}, // XK_Up
        {KeyEvent.KEYCODE_DPAD_DOWN,        0xFF54}, // XK_Down
        {KeyEvent.KEYCODE_DPAD_LEFT,        0xFF51}, // XK_Left
        {KeyEvent.KEYCODE_DPAD_RIGHT,       0xFF53}, // XK_Right
        {KeyEvent.KEYCODE_DPAD_CENTER,      0xFF0D}, // XK_Return
        {KeyEvent.KEYCODE_VOLUME_UP,        0x1008FF13}, // XF86AudioRaiseVolume
        {KeyEvent.KEYCODE_VOLUME_DOWN,      0x1008FF11}, // XF86AudioLowerVolume
        {KeyEvent.KEYCODE_POWER,            0},
        {KeyEvent.KEYCODE_CAMERA,           0},
        {KeyEvent.KEYCODE_CLEAR,            0},
        {KeyEvent.KEYCODE_COMMA,            0},
        {KeyEvent.KEYCODE_PERIOD,           0},
        {KeyEvent.KEYCODE_ALT_LEFT,         0},
        {KeyEvent.KEYCODE_ALT_RIGHT,        0},
        {KeyEvent.KEYCODE_SHIFT_LEFT,       0},
        {KeyEvent.KEYCODE_SHIFT_RIGHT,      0},
        {KeyEvent.KEYCODE_TAB,              0},
        {KeyEvent.KEYCODE_SPACE,            0},
        {KeyEvent.KEYCODE_SYM,              0},
        {KeyEvent.KEYCODE_EXPLORER,         0},
        {KeyEvent.KEYCODE_ENVELOPE,         0},
        {KeyEvent.KEYCODE_ENTER,            0xFF0D}, // XK_Return
        {KeyEvent.KEYCODE_DEL,              0xFF08}, // XK_BackSpace
        {KeyEvent.KEYCODE_GRAVE,            0},
        {KeyEvent.KEYCODE_MINUS,            0},
        {KeyEvent.KEYCODE_EQUALS,           0},
        {KeyEvent.KEYCODE_LEFT_BRACKET,     0},
        {KeyEvent.KEYCODE_RIGHT_BRACKET,    0},
        {KeyEvent.KEYCODE_BACKSLASH,        0},
        {KeyEvent.KEYCODE_SEMICOLON,        0},
        {KeyEvent.KEYCODE_APOSTROPHE,       0},
        {KeyEvent.KEYCODE_SLASH,            0},
        {KeyEvent.KEYCODE_AT,               0},
        {KeyEvent.KEYCODE_NUM,              0},
        {KeyEvent.KEYCODE_HEADSETHOOK,      0},
        {KeyEvent.KEYCODE_FOCUS,            0},
        {KeyEvent.KEYCODE_PLUS,             0},
        {KeyEvent.KEYCODE_MENU,             0},
        {KeyEvent.KEYCODE_NOTIFICATION,     0},
        {KeyEvent.KEYCODE_SEARCH,           0xFF1B}, // XK_Escape
    };

    // a custom pre-built hashtable structure would be better...
    static Map<Short,Integer> unicodeMap = new HashMap<Short,Integer>();
    static Map<Integer,Integer> keycodeMap = new HashMap<Integer,Integer>();
    static {
        for (int[] entry : UNICODE_TABLE) {
            unicodeMap.put((short)entry[0], entry[1]);
        }
        for (int[] entry : KEYCODE_TABLE) {
            keycodeMap.put(entry[0], entry[1]);
        }
    };

    public static int translate(char ch) {
        int unicode = (int)ch;
        Short s = new Short((short)unicode);
        if (unicode != 0 && unicodeMap.containsKey(s)) {
            return unicodeMap.get(s);
        } else {
            return 0;
        }
    }

    public static int translate(KeyEvent keyEvent) {
        int unicode = keyEvent.getUnicodeChar();
        Short s = new Short((short)unicode);
        if (unicode != 0 && unicodeMap.containsKey(s)) {
            return unicodeMap.get(s);
        }
        int keycode = keyEvent.getKeyCode();
        if (keycodeMap.containsKey(keycode)) {
            return keycodeMap.get(keycode);
        }
        return 0;
    }
}




Java Source Code List

com.cafbit.valence.HelpActivity.java
com.cafbit.valence.MoteContextImpl.java
com.cafbit.valence.OptionsMenuHelper.java
com.cafbit.valence.RFBRecvThread.java
com.cafbit.valence.RFBThread.java
com.cafbit.valence.SelectionActivity.java
com.cafbit.valence.TouchPadEvent.java
com.cafbit.valence.TouchPadHandler.java
com.cafbit.valence.TouchPadView.java
com.cafbit.valence.ValenceActivity.java
com.cafbit.valence.ValenceApplication.java
com.cafbit.valence.ValenceIOException.java
com.cafbit.valence.device.ValenceDeviceClass.java
com.cafbit.valence.device.ValenceDeviceSetupView.java
com.cafbit.valence.device.ValenceDevice.java
com.cafbit.valence.device.ValenceMDNSDiscoveryHandler.java
com.cafbit.valence.rfb.DES.java
com.cafbit.valence.rfb.KeyTranslator.java
com.cafbit.valence.rfb.RFBConnection.java
com.cafbit.valence.rfb.RFBEvent.java
com.cafbit.valence.rfb.RFBException.java
com.cafbit.valence.rfb.RFBKeyEvent.java
com.cafbit.valence.rfb.RFBMessage.java
com.cafbit.valence.rfb.RFBPointerEvent.java
com.cafbit.valence.rfb.RFBSecurityARD.java
com.cafbit.valence.rfb.RFBSecurityNone.java
com.cafbit.valence.rfb.RFBSecurityVNC.java
com.cafbit.valence.rfb.RFBSecurity.java
com.cafbit.valence.rfb.RFBStream.java
com.cafbit.valence.rfb.Security.java
com.cafbit.valence.rfb.Util.java
com.cafbit.valence.rfb.Version.java