input.js 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869
  1. /*
  2. * noVNC: HTML5 VNC client
  3. * Copyright (C) 2011 Joel Martin
  4. * Licensed under LGPL-2 or any later version (see LICENSE.txt)
  5. */
  6. /*jslint browser: true, white: false, bitwise: false */
  7. /*global window, Util */
  8. //
  9. // Keyboard event handler
  10. //
  11. function Keyboard(conf) {
  12. "use strict";
  13. conf = conf || {}; // Configuration
  14. var that = {}, // Public API interface
  15. keyDownList = []; // List of depressed keys
  16. // (even if they are happy)
  17. // Configuration settings
  18. function cdef(v, type, defval, desc) {
  19. Util.conf_default(conf, that, v, type, defval, desc); }
  20. // Capability settings, default can be overridden
  21. cdef('target', 'dom', document, 'DOM element that grabs keyboard input');
  22. cdef('focused', 'bool', true, 'Capture and send key strokes');
  23. cdef('keyPress', 'func', null, 'Handler for key press/release');
  24. that.set_target = function () { throw("target cannot be changed"); }
  25. //
  26. // Private functions
  27. //
  28. // From the event keyCode return the keysym value for keys that need
  29. // to be suppressed otherwise they may trigger unintended browser
  30. // actions
  31. function getKeysymSpecial(evt) {
  32. var keysym = null;
  33. switch ( evt.keyCode ) {
  34. // These generate a keyDown and keyPress in Firefox and Opera
  35. case 8 : keysym = 0xFF08; break; // BACKSPACE
  36. case 13 : keysym = 0xFF0D; break; // ENTER
  37. // This generates a keyDown and keyPress in Opera
  38. case 9 : keysym = 0xFF09; break; // TAB
  39. default : break;
  40. }
  41. if (evt.type === 'keydown') {
  42. switch ( evt.keyCode ) {
  43. case 8 : keysym = 0xFF08; break; // BACKSPACE
  44. case 13 : keysym = 0xFF0D; break; // ENTER
  45. case 9 : keysym = 0xFF09; break; // TAB
  46. case 27 : keysym = 0xFF1B; break; // ESCAPE
  47. case 46 : keysym = 0xFFFF; break; // DELETE
  48. case 36 : keysym = 0xFF50; break; // HOME
  49. case 35 : keysym = 0xFF57; break; // END
  50. case 33 : keysym = 0xFF55; break; // PAGE_UP
  51. case 34 : keysym = 0xFF56; break; // PAGE_DOWN
  52. case 45 : keysym = 0xFF63; break; // INSERT
  53. // '-' during keyPress
  54. case 37 : keysym = 0xFF51; break; // LEFT
  55. case 38 : keysym = 0xFF52; break; // UP
  56. case 39 : keysym = 0xFF53; break; // RIGHT
  57. case 40 : keysym = 0xFF54; break; // DOWN
  58. case 16 : keysym = 0xFFE1; break; // SHIFT
  59. case 17 : keysym = 0xFFE3; break; // CONTROL
  60. //case 18 : keysym = 0xFFE7; break; // Left Meta (Mac Option)
  61. case 18 : keysym = 0xFFE9; break; // Left ALT (Mac Command)
  62. case 112 : keysym = 0xFFBE; break; // F1
  63. case 113 : keysym = 0xFFBF; break; // F2
  64. case 114 : keysym = 0xFFC0; break; // F3
  65. case 115 : keysym = 0xFFC1; break; // F4
  66. case 116 : keysym = 0xFFC2; break; // F5
  67. case 117 : keysym = 0xFFC3; break; // F6
  68. case 118 : keysym = 0xFFC4; break; // F7
  69. case 119 : keysym = 0xFFC5; break; // F8
  70. case 120 : keysym = 0xFFC6; break; // F9
  71. case 121 : keysym = 0xFFC7; break; // F10
  72. case 122 : keysym = 0xFFC8; break; // F11
  73. case 123 : keysym = 0xFFC9; break; // F12
  74. default : break;
  75. }
  76. }
  77. if ((!keysym) && (evt.ctrlKey || evt.altKey)) {
  78. if ((typeof(evt.which) !== "undefined") && (evt.which > 0)) {
  79. keysym = evt.which;
  80. } else {
  81. // IE9 always
  82. // Firefox and Opera when ctrl/alt + special
  83. Util.Warn("which not set, using keyCode");
  84. keysym = evt.keyCode;
  85. }
  86. /* Remap symbols */
  87. switch (keysym) {
  88. case 186 : keysym = 59; break; // ; (IE)
  89. case 187 : keysym = 61; break; // = (IE)
  90. case 188 : keysym = 44; break; // , (Mozilla, IE)
  91. case 109 : // - (Mozilla, Opera)
  92. if (Util.Engine.gecko || Util.Engine.presto) {
  93. keysym = 45; }
  94. break;
  95. case 189 : keysym = 45; break; // - (IE)
  96. case 190 : keysym = 46; break; // . (Mozilla, IE)
  97. case 191 : keysym = 47; break; // / (Mozilla, IE)
  98. case 192 : keysym = 96; break; // ` (Mozilla, IE)
  99. case 219 : keysym = 91; break; // [ (Mozilla, IE)
  100. case 220 : keysym = 92; break; // \ (Mozilla, IE)
  101. case 221 : keysym = 93; break; // ] (Mozilla, IE)
  102. case 222 : keysym = 39; break; // ' (Mozilla, IE)
  103. }
  104. /* Remap shifted and unshifted keys */
  105. if (!!evt.shiftKey) {
  106. switch (keysym) {
  107. case 48 : keysym = 41 ; break; // ) (shifted 0)
  108. case 49 : keysym = 33 ; break; // ! (shifted 1)
  109. case 50 : keysym = 64 ; break; // @ (shifted 2)
  110. case 51 : keysym = 35 ; break; // # (shifted 3)
  111. case 52 : keysym = 36 ; break; // $ (shifted 4)
  112. case 53 : keysym = 37 ; break; // % (shifted 5)
  113. case 54 : keysym = 94 ; break; // ^ (shifted 6)
  114. case 55 : keysym = 38 ; break; // & (shifted 7)
  115. case 56 : keysym = 42 ; break; // * (shifted 8)
  116. case 57 : keysym = 40 ; break; // ( (shifted 9)
  117. case 59 : keysym = 58 ; break; // : (shifted `)
  118. case 61 : keysym = 43 ; break; // + (shifted ;)
  119. case 44 : keysym = 60 ; break; // < (shifted ,)
  120. case 45 : keysym = 95 ; break; // _ (shifted -)
  121. case 46 : keysym = 62 ; break; // > (shifted .)
  122. case 47 : keysym = 63 ; break; // ? (shifted /)
  123. case 96 : keysym = 126; break; // ~ (shifted `)
  124. case 91 : keysym = 123; break; // { (shifted [)
  125. case 92 : keysym = 124; break; // | (shifted \)
  126. case 93 : keysym = 125; break; // } (shifted ])
  127. case 39 : keysym = 34 ; break; // " (shifted ')
  128. }
  129. } else if ((keysym >= 65) && (keysym <=90)) {
  130. /* Remap unshifted A-Z */
  131. keysym += 32;
  132. } else if (evt.keyLocation === 3) {
  133. // numpad keys
  134. switch (keysym) {
  135. case 96 : keysym = 48; break; // 0
  136. case 97 : keysym = 49; break; // 1
  137. case 98 : keysym = 50; break; // 2
  138. case 99 : keysym = 51; break; // 3
  139. case 100: keysym = 52; break; // 4
  140. case 101: keysym = 53; break; // 5
  141. case 102: keysym = 54; break; // 6
  142. case 103: keysym = 55; break; // 7
  143. case 104: keysym = 56; break; // 8
  144. case 105: keysym = 57; break; // 9
  145. case 109: keysym = 45; break; // -
  146. case 110: keysym = 46; break; // .
  147. case 111: keysym = 47; break; // /
  148. }
  149. }
  150. }
  151. return keysym;
  152. }
  153. /* Translate DOM keyPress event to keysym value */
  154. function getKeysym(evt) {
  155. var keysym, msg;
  156. if (typeof(evt.which) !== "undefined") {
  157. // WebKit, Firefox, Opera
  158. keysym = evt.which;
  159. } else {
  160. // IE9
  161. Util.Warn("which not set, using keyCode");
  162. keysym = evt.keyCode;
  163. }
  164. if ((keysym > 255) && (keysym < 0xFF00)) {
  165. msg = "Mapping keysym " + keysym;
  166. // Map Unicode outside Latin 1 to X11 keysyms
  167. keysym = unicodeTable[keysym];
  168. if (typeof(keysym) === 'undefined') {
  169. keysym = 0;
  170. }
  171. Util.Debug(msg + " to " + keysym);
  172. }
  173. return keysym;
  174. }
  175. function show_keyDownList(kind) {
  176. var msg = "keyDownList (" + kind + "):\n";
  177. for (var c = 0; c < keyDownList.length; c++) {
  178. msg = msg + " " + c + " - keyCode: " + keyDownList[c].keyCode +
  179. " - which: " + keyDownList[c].which + "\n";
  180. }
  181. //Util.Debug(msg);
  182. }
  183. function copyKeyEvent(evt) {
  184. var members = ['type', 'keyCode', 'charCode', 'which',
  185. 'altKey', 'ctrlKey', 'shiftKey',
  186. 'keyLocation', 'keyIdentifier'], i, obj = {};
  187. for (i = 0; i < members.length; i++) {
  188. if (typeof(evt[members[i]]) !== "undefined") {
  189. obj[members[i]] = evt[members[i]];
  190. }
  191. }
  192. return obj;
  193. }
  194. function pushKeyEvent(fevt) {
  195. keyDownList.push(fevt);
  196. }
  197. function getKeyEvent(keyCode, pop) {
  198. var i, fevt = null;
  199. for (i = keyDownList.length-1; i >= 0; i--) {
  200. if (keyDownList[i].keyCode === keyCode) {
  201. if ((typeof(pop) !== "undefined") && (pop)) {
  202. fevt = keyDownList.splice(i, 1)[0];
  203. } else {
  204. fevt = keyDownList[i];
  205. }
  206. break;
  207. }
  208. }
  209. return fevt;
  210. }
  211. function ignoreKeyEvent(evt) {
  212. // Blarg. Some keys have a different keyCode on keyDown vs keyUp
  213. if (evt.keyCode === 229) {
  214. // French AZERTY keyboard dead key.
  215. // Lame thing is that the respective keyUp is 219 so we can't
  216. // properly ignore the keyUp event
  217. return true;
  218. }
  219. return false;
  220. }
  221. //
  222. // Key Event Handling:
  223. //
  224. // There are several challenges when dealing with key events:
  225. // - The meaning and use of keyCode, charCode and which depends on
  226. // both the browser and the event type (keyDown/Up vs keyPress).
  227. // - We cannot automatically determine the keyboard layout
  228. // - The keyDown and keyUp events have a keyCode value that has not
  229. // been translated by modifier keys.
  230. // - The keyPress event has a translated (for layout and modifiers)
  231. // character code but the attribute containing it differs. keyCode
  232. // contains the translated value in WebKit (Chrome/Safari), Opera
  233. // 11 and IE9. charCode contains the value in WebKit and Firefox.
  234. // The which attribute contains the value on WebKit, Firefox and
  235. // Opera 11.
  236. // - The keyDown/Up keyCode value indicates (sort of) the physical
  237. // key was pressed but only for standard US layout. On a US
  238. // keyboard, the '-' and '_' characters are on the same key and
  239. // generate a keyCode value of 189. But on an AZERTY keyboard even
  240. // though they are different physical keys they both still
  241. // generate a keyCode of 189!
  242. // - To prevent a key event from propagating to the browser and
  243. // causing unwanted default actions (such as closing a tab,
  244. // opening a menu, shifting focus, etc) we must suppress this
  245. // event in both keyDown and keyPress because not all key strokes
  246. // generate on a keyPress event. Also, in WebKit and IE9
  247. // suppressing the keyDown prevents a keyPress but other browsers
  248. // still generated a keyPress even if keyDown is suppressed.
  249. //
  250. // For safe key events, we wait until the keyPress event before
  251. // reporting a key down event. For unsafe key events, we report a key
  252. // down event when the keyDown event fires and we suppress any further
  253. // actions (including keyPress).
  254. //
  255. // In order to report a key up event that matches what we reported
  256. // for the key down event, we keep a list of keys that are currently
  257. // down. When the keyDown event happens, we add the key event to the
  258. // list. If it is a safe key event, then we update the which attribute
  259. // in the most recent item on the list when we received a keyPress
  260. // event (keyPress should immediately follow keyDown). When we
  261. // received a keyUp event we search for the event on the list with
  262. // a matching keyCode and we report the character code using the value
  263. // in the 'which' attribute that was stored with that key.
  264. //
  265. function onKeyDown(e) {
  266. if (! conf.focused) {
  267. return true;
  268. }
  269. var fevt = null, evt = (e ? e : window.event),
  270. keysym = null, suppress = false;
  271. Util.Debug("onKeyDown kC:" + evt.keyCode + " cC:" + evt.charCode + " w:" + evt.which);
  272. fevt = copyKeyEvent(evt);
  273. keysym = getKeysymSpecial(evt);
  274. // Save keysym decoding for use in keyUp
  275. fevt.keysym = keysym;
  276. if (keysym) {
  277. // If it is a key or key combination that might trigger
  278. // browser behaviors or it has no corresponding keyPress
  279. // event, then send it immediately
  280. if (conf.keyPress && !ignoreKeyEvent(evt)) {
  281. Util.Debug("keyPress down 1, keysym: " + keysym +
  282. " (key: " + evt.keyCode + ", which: " + evt.which + ")");
  283. conf.keyPress(keysym, 1, evt);
  284. }
  285. suppress = true;
  286. }
  287. if (! ignoreKeyEvent(evt)) {
  288. // Add it to the list of depressed keys
  289. pushKeyEvent(fevt);
  290. show_keyDownList('down');
  291. }
  292. if (suppress) {
  293. // Suppress bubbling/default actions
  294. Util.stopEvent(e);
  295. return false;
  296. } else {
  297. // Allow the event to bubble and become a keyPress event which
  298. // will have the character code translated
  299. return true;
  300. }
  301. }
  302. function onKeyPress(e) {
  303. if (! conf.focused) {
  304. return true;
  305. }
  306. var evt = (e ? e : window.event),
  307. kdlen = keyDownList.length, keysym = null;
  308. Util.Debug("onKeyPress kC:" + evt.keyCode + " cC:" + evt.charCode + " w:" + evt.which);
  309. if (((evt.which !== "undefined") && (evt.which === 0)) ||
  310. (getKeysymSpecial(evt))) {
  311. // Firefox and Opera generate a keyPress event even if keyDown
  312. // is suppressed. But the keys we want to suppress will have
  313. // either:
  314. // - the which attribute set to 0
  315. // - getKeysymSpecial() will identify it
  316. Util.Debug("Ignoring special key in keyPress");
  317. Util.stopEvent(e);
  318. return false;
  319. }
  320. keysym = getKeysym(evt);
  321. // Modify the the which attribute in the depressed keys list so
  322. // that the keyUp event will be able to have the character code
  323. // translation available.
  324. if (kdlen > 0) {
  325. keyDownList[kdlen-1].keysym = keysym;
  326. } else {
  327. Util.Warn("keyDownList empty when keyPress triggered");
  328. }
  329. show_keyDownList('press');
  330. // Send the translated keysym
  331. if (conf.keyPress && (keysym > 0)) {
  332. Util.Debug("keyPress down 2, keysym: " + keysym +
  333. " (key: " + evt.keyCode + ", which: " + evt.which + ")");
  334. conf.keyPress(keysym, 1, evt);
  335. }
  336. // Stop keypress events just in case
  337. Util.stopEvent(e);
  338. return false;
  339. }
  340. function onKeyUp(e) {
  341. if (! conf.focused) {
  342. return true;
  343. }
  344. var fevt = null, evt = (e ? e : window.event), i, keysym;
  345. Util.Debug("onKeyUp kC:" + evt.keyCode + " cC:" + evt.charCode + " w:" + evt.which);
  346. fevt = getKeyEvent(evt.keyCode, true);
  347. if (fevt) {
  348. keysym = fevt.keysym;
  349. } else {
  350. Util.Warn("Key event (keyCode = " + evt.keyCode +
  351. ") not found on keyDownList");
  352. keysym = 0;
  353. }
  354. show_keyDownList('up');
  355. if (conf.keyPress && (keysym > 0)) {
  356. Util.Debug("keyPress up, keysym: " + keysym +
  357. " (key: " + evt.keyCode + ", which: " + evt.which + ")");
  358. conf.keyPress(keysym, 0, evt);
  359. }
  360. Util.stopEvent(e);
  361. return false;
  362. }
  363. //
  364. // Public API interface functions
  365. //
  366. that.grab = function() {
  367. //Util.Debug(">> Keyboard.grab");
  368. var c = conf.target;
  369. Util.addEvent(c, 'keydown', onKeyDown);
  370. Util.addEvent(c, 'keyup', onKeyUp);
  371. Util.addEvent(c, 'keypress', onKeyPress);
  372. //Util.Debug("<< Keyboard.grab");
  373. };
  374. that.ungrab = function() {
  375. //Util.Debug(">> Keyboard.ungrab");
  376. var c = conf.target;
  377. Util.removeEvent(c, 'keydown', onKeyDown);
  378. Util.removeEvent(c, 'keyup', onKeyUp);
  379. Util.removeEvent(c, 'keypress', onKeyPress);
  380. //Util.Debug(">> Keyboard.ungrab");
  381. };
  382. return that; // Return the public API interface
  383. } // End of Keyboard()
  384. //
  385. // Mouse event handler
  386. //
  387. function Mouse(conf) {
  388. "use strict";
  389. conf = conf || {}; // Configuration
  390. var that = {}; // Public API interface
  391. // Configuration settings
  392. function cdef(v, type, defval, desc) {
  393. Util.conf_default(conf, that, v, type, defval, desc); }
  394. // Capability settings, default can be overridden
  395. cdef('target', 'dom', document, 'DOM element that grabs mouse input');
  396. cdef('focused', 'bool', true, 'Capture and send mouse clicks/movement');
  397. cdef('mouseButton', 'func', null, 'Handler for mouse button click/release');
  398. cdef('mouseMove', 'func', null, 'Handler for mouse movement');
  399. that.set_target = function () { throw("target cannot be changed"); }
  400. //
  401. // Private functions
  402. //
  403. function onMouseButton(e, down) {
  404. var evt, pos, bmask;
  405. if (! conf.focused) {
  406. return true;
  407. }
  408. evt = (e ? e : window.event);
  409. pos = Util.getEventPosition(e, conf.target, conf.scale);
  410. if (evt.which) {
  411. /* everything except IE */
  412. bmask = 1 << evt.button;
  413. } else {
  414. /* IE including 9 */
  415. bmask = (evt.button & 0x1) + // Left
  416. (evt.button & 0x2) * 2 + // Right
  417. (evt.button & 0x4) / 2; // Middle
  418. }
  419. //Util.Debug("mouse " + pos.x + "," + pos.y + " down: " + down +
  420. // " bmask: " + bmask + "(evt.button: " + evt.button + ")");
  421. if (conf.mouseButton) {
  422. conf.mouseButton(pos.x, pos.y, down, bmask);
  423. }
  424. Util.stopEvent(e);
  425. return false;
  426. }
  427. function onMouseDown(e) {
  428. onMouseButton(e, 1);
  429. }
  430. function onMouseUp(e) {
  431. onMouseButton(e, 0);
  432. }
  433. function onMouseWheel(e) {
  434. var evt, pos, bmask, wheelData;
  435. if (! conf.focused) {
  436. return true;
  437. }
  438. evt = (e ? e : window.event);
  439. pos = Util.getEventPosition(e, conf.target, conf.scale);
  440. wheelData = evt.detail ? evt.detail * -1 : evt.wheelDelta / 40;
  441. if (wheelData > 0) {
  442. bmask = 1 << 3;
  443. } else {
  444. bmask = 1 << 4;
  445. }
  446. //Util.Debug('mouse scroll by ' + wheelData + ':' + pos.x + "," + pos.y);
  447. if (conf.mouseButton) {
  448. conf.mouseButton(pos.x, pos.y, 1, bmask);
  449. conf.mouseButton(pos.x, pos.y, 0, bmask);
  450. }
  451. Util.stopEvent(e);
  452. return false;
  453. }
  454. function onMouseMove(e) {
  455. var evt, pos;
  456. if (! conf.focused) {
  457. return true;
  458. }
  459. evt = (e ? e : window.event);
  460. pos = Util.getEventPosition(e, conf.target, conf.scale);
  461. //Util.Debug('mouse ' + evt.which + '/' + evt.button + ' up:' + pos.x + "," + pos.y);
  462. if (conf.mouseMove) {
  463. conf.mouseMove(pos.x, pos.y);
  464. }
  465. }
  466. function onMouseDisable(e) {
  467. var evt, pos;
  468. if (! conf.focused) {
  469. return true;
  470. }
  471. evt = (e ? e : window.event);
  472. pos = Util.getEventPosition(e, conf.target, conf.scale);
  473. /* Stop propagation if inside canvas area */
  474. if ((pos.x >= 0) && (pos.y >= 0) &&
  475. (pos.x < conf.target.offsetWidth) &&
  476. (pos.y < conf.target.offsetHeight)) {
  477. //Util.Debug("mouse event disabled");
  478. Util.stopEvent(e);
  479. return false;
  480. }
  481. //Util.Debug("mouse event not disabled");
  482. return true;
  483. }
  484. //
  485. // Public API interface functions
  486. //
  487. that.grab = function() {
  488. //Util.Debug(">> Mouse.grab");
  489. var c = conf.target;
  490. Util.addEvent(c, 'mousedown', onMouseDown);
  491. Util.addEvent(c, 'mouseup', onMouseUp);
  492. Util.addEvent(c, 'mousemove', onMouseMove);
  493. Util.addEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
  494. onMouseWheel);
  495. /* Work around right and middle click browser behaviors */
  496. Util.addEvent(document, 'click', onMouseDisable);
  497. Util.addEvent(document.body, 'contextmenu', onMouseDisable);
  498. //Util.Debug("<< Mouse.grab");
  499. };
  500. that.ungrab = function() {
  501. //Util.Debug(">> Mouse.ungrab");
  502. var c = conf.target;
  503. Util.removeEvent(c, 'mousedown', onMouseDown);
  504. Util.removeEvent(c, 'mouseup', onMouseUp);
  505. Util.removeEvent(c, 'mousemove', onMouseMove);
  506. Util.removeEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
  507. onMouseWheel);
  508. /* Work around right and middle click browser behaviors */
  509. Util.removeEvent(document, 'click', onMouseDisable);
  510. Util.removeEvent(document.body, 'contextmenu', onMouseDisable);
  511. //Util.Debug(">> Mouse.ungrab");
  512. };
  513. return that; // Return the public API interface
  514. } // End of Mouse()
  515. /*
  516. * Browser keypress to X11 keysym for Unicode characters > U+00FF
  517. */
  518. unicodeTable = {
  519. 0x0104 : 0x01a1,
  520. 0x02D8 : 0x01a2,
  521. 0x0141 : 0x01a3,
  522. 0x013D : 0x01a5,
  523. 0x015A : 0x01a6,
  524. 0x0160 : 0x01a9,
  525. 0x015E : 0x01aa,
  526. 0x0164 : 0x01ab,
  527. 0x0179 : 0x01ac,
  528. 0x017D : 0x01ae,
  529. 0x017B : 0x01af,
  530. 0x0105 : 0x01b1,
  531. 0x02DB : 0x01b2,
  532. 0x0142 : 0x01b3,
  533. 0x013E : 0x01b5,
  534. 0x015B : 0x01b6,
  535. 0x02C7 : 0x01b7,
  536. 0x0161 : 0x01b9,
  537. 0x015F : 0x01ba,
  538. 0x0165 : 0x01bb,
  539. 0x017A : 0x01bc,
  540. 0x02DD : 0x01bd,
  541. 0x017E : 0x01be,
  542. 0x017C : 0x01bf,
  543. 0x0154 : 0x01c0,
  544. 0x0102 : 0x01c3,
  545. 0x0139 : 0x01c5,
  546. 0x0106 : 0x01c6,
  547. 0x010C : 0x01c8,
  548. 0x0118 : 0x01ca,
  549. 0x011A : 0x01cc,
  550. 0x010E : 0x01cf,
  551. 0x0110 : 0x01d0,
  552. 0x0143 : 0x01d1,
  553. 0x0147 : 0x01d2,
  554. 0x0150 : 0x01d5,
  555. 0x0158 : 0x01d8,
  556. 0x016E : 0x01d9,
  557. 0x0170 : 0x01db,
  558. 0x0162 : 0x01de,
  559. 0x0155 : 0x01e0,
  560. 0x0103 : 0x01e3,
  561. 0x013A : 0x01e5,
  562. 0x0107 : 0x01e6,
  563. 0x010D : 0x01e8,
  564. 0x0119 : 0x01ea,
  565. 0x011B : 0x01ec,
  566. 0x010F : 0x01ef,
  567. 0x0111 : 0x01f0,
  568. 0x0144 : 0x01f1,
  569. 0x0148 : 0x01f2,
  570. 0x0151 : 0x01f5,
  571. 0x0171 : 0x01fb,
  572. 0x0159 : 0x01f8,
  573. 0x016F : 0x01f9,
  574. 0x0163 : 0x01fe,
  575. 0x02D9 : 0x01ff,
  576. 0x0126 : 0x02a1,
  577. 0x0124 : 0x02a6,
  578. 0x0130 : 0x02a9,
  579. 0x011E : 0x02ab,
  580. 0x0134 : 0x02ac,
  581. 0x0127 : 0x02b1,
  582. 0x0125 : 0x02b6,
  583. 0x0131 : 0x02b9,
  584. 0x011F : 0x02bb,
  585. 0x0135 : 0x02bc,
  586. 0x010A : 0x02c5,
  587. 0x0108 : 0x02c6,
  588. 0x0120 : 0x02d5,
  589. 0x011C : 0x02d8,
  590. 0x016C : 0x02dd,
  591. 0x015C : 0x02de,
  592. 0x010B : 0x02e5,
  593. 0x0109 : 0x02e6,
  594. 0x0121 : 0x02f5,
  595. 0x011D : 0x02f8,
  596. 0x016D : 0x02fd,
  597. 0x015D : 0x02fe,
  598. 0x0138 : 0x03a2,
  599. 0x0156 : 0x03a3,
  600. 0x0128 : 0x03a5,
  601. 0x013B : 0x03a6,
  602. 0x0112 : 0x03aa,
  603. 0x0122 : 0x03ab,
  604. 0x0166 : 0x03ac,
  605. 0x0157 : 0x03b3,
  606. 0x0129 : 0x03b5,
  607. 0x013C : 0x03b6,
  608. 0x0113 : 0x03ba,
  609. 0x0123 : 0x03bb,
  610. 0x0167 : 0x03bc,
  611. 0x014A : 0x03bd,
  612. 0x014B : 0x03bf,
  613. 0x0100 : 0x03c0,
  614. 0x012E : 0x03c7,
  615. 0x0116 : 0x03cc,
  616. 0x012A : 0x03cf,
  617. 0x0145 : 0x03d1,
  618. 0x014C : 0x03d2,
  619. 0x0136 : 0x03d3,
  620. 0x0172 : 0x03d9,
  621. 0x0168 : 0x03dd,
  622. 0x016A : 0x03de,
  623. 0x0101 : 0x03e0,
  624. 0x012F : 0x03e7,
  625. 0x0117 : 0x03ec,
  626. 0x012B : 0x03ef,
  627. 0x0146 : 0x03f1,
  628. 0x014D : 0x03f2,
  629. 0x0137 : 0x03f3,
  630. 0x0173 : 0x03f9,
  631. 0x0169 : 0x03fd,
  632. 0x016B : 0x03fe,
  633. 0x1E02 : 0x1001e02,
  634. 0x1E03 : 0x1001e03,
  635. 0x1E0A : 0x1001e0a,
  636. 0x1E80 : 0x1001e80,
  637. 0x1E82 : 0x1001e82,
  638. 0x1E0B : 0x1001e0b,
  639. 0x1EF2 : 0x1001ef2,
  640. 0x1E1E : 0x1001e1e,
  641. 0x1E1F : 0x1001e1f,
  642. 0x1E40 : 0x1001e40,
  643. 0x1E41 : 0x1001e41,
  644. 0x1E56 : 0x1001e56,
  645. 0x1E81 : 0x1001e81,
  646. 0x1E57 : 0x1001e57,
  647. 0x1E83 : 0x1001e83,
  648. 0x1E60 : 0x1001e60,
  649. 0x1EF3 : 0x1001ef3,
  650. 0x1E84 : 0x1001e84,
  651. 0x1E85 : 0x1001e85,
  652. 0x1E61 : 0x1001e61,
  653. 0x0174 : 0x1000174,
  654. 0x1E6A : 0x1001e6a,
  655. 0x0176 : 0x1000176,
  656. 0x0175 : 0x1000175,
  657. 0x1E6B : 0x1001e6b,
  658. 0x0177 : 0x1000177,
  659. 0x0152 : 0x13bc,
  660. 0x0153 : 0x13bd,
  661. 0x0178 : 0x13be,
  662. 0x203E : 0x047e,
  663. 0x3002 : 0x04a1,
  664. 0x300C : 0x04a2,
  665. 0x300D : 0x04a3,
  666. 0x3001 : 0x04a4,
  667. 0x30FB : 0x04a5,
  668. 0x30F2 : 0x04a6,
  669. 0x30A1 : 0x04a7,
  670. 0x30A3 : 0x04a8,
  671. 0x30A5 : 0x04a9,
  672. 0x30A7 : 0x04aa,
  673. 0x30A9 : 0x04ab,
  674. 0x30E3 : 0x04ac,
  675. 0x30E5 : 0x04ad,
  676. 0x30E7 : 0x04ae,
  677. 0x30C3 : 0x04af,
  678. 0x30FC : 0x04b0,
  679. 0x30A2 : 0x04b1,
  680. 0x30A4 : 0x04b2,
  681. 0x30A6 : 0x04b3,
  682. 0x30A8 : 0x04b4,
  683. 0x30AA : 0x04b5,
  684. 0x30AB : 0x04b6,
  685. 0x30AD : 0x04b7,
  686. 0x30AF : 0x04b8,
  687. 0x30B1 : 0x04b9,
  688. 0x30B3 : 0x04ba,
  689. 0x30B5 : 0x04bb,
  690. 0x30B7 : 0x04bc,
  691. 0x30B9 : 0x04bd,
  692. 0x30BB : 0x04be,
  693. 0x30BD : 0x04bf,
  694. 0x30BF : 0x04c0,
  695. 0x30C1 : 0x04c1,
  696. 0x30C4 : 0x04c2,
  697. 0x30C6 : 0x04c3,
  698. 0x30C8 : 0x04c4,
  699. 0x30CA : 0x04c5,
  700. 0x30CB : 0x04c6,
  701. 0x30CC : 0x04c7,
  702. 0x30CD : 0x04c8,
  703. 0x30CE : 0x04c9,
  704. 0x30CF : 0x04ca,
  705. 0x30D2 : 0x04cb,
  706. 0x30D5 : 0x04cc,
  707. 0x30D8 : 0x04cd,
  708. 0x30DB : 0x04ce,
  709. 0x30DE : 0x04cf,
  710. 0x30DF : 0x04d0,
  711. 0x30E0 : 0x04d1,
  712. 0x30E1 : 0x04d2,
  713. 0x30E2 : 0x04d3,
  714. 0x30E4 : 0x04d4,
  715. 0x30E6 : 0x04d5,
  716. 0x30E8 : 0x04d6,
  717. 0x30E9 : 0x04d7,
  718. 0x30EA : 0x04d8,
  719. 0x30EB : 0x04d9,
  720. 0x30EC : 0x04da,
  721. 0x30ED : 0x04db,
  722. 0x30EF : 0x04dc,
  723. 0x30F3 : 0x04dd,
  724. 0x309B : 0x04de,
  725. 0x309C : 0x04df,
  726. 0x06F0 : 0x10006f0,
  727. 0x06F1 : 0x10006f1,
  728. 0x06F2 : 0x10006f2,
  729. 0x06F3 : 0x10006f3,
  730. 0x06F4 : 0x10006f4,
  731. 0x06F5 : 0x10006f5,
  732. 0x06F6 : 0x10006f6,
  733. 0x06F7 : 0x10006f7,
  734. 0x06F8 : 0x10006f8,
  735. 0x06F9 : 0x10006f9,
  736. 0x066A : 0x100066a,
  737. 0x0670 : 0x1000670,
  738. 0x0679 : 0x1000679,
  739. 0x067E : 0x100067e,
  740. 0x0686 : 0x1000686,
  741. 0x0688 : 0x1000688,
  742. 0x0691 : 0x1000691,
  743. 0x060C : 0x05ac,
  744. 0x06D4 : 0x10006d4,
  745. 0x0660 : 0x1000660,
  746. 0x0661 : 0x1000661,
  747. 0x0662 : 0x1000662,
  748. 0x0663 : 0x1000663,
  749. 0x0664 : 0x1000664,
  750. 0x0665 : 0x1000665,
  751. 0x0666 : 0x1000666,
  752. 0x0667 : 0x1000667,
  753. 0x0668 : 0x1000668,
  754. 0x0669 : 0x1000669,
  755. 0x061B : 0x05bb,
  756. 0x061F : 0x05bf,
  757. 0x0621 : 0x05c1,
  758. 0x0622 : 0x05c2,
  759. 0x0623 : 0x05c3,
  760. 0x0624 : 0x05c4,
  761. 0x0625 : 0x05c5,
  762. 0x0626 : 0x05c6,
  763. 0x0627 : 0x05c7,
  764. 0x0628 : 0x05c8,
  765. 0x0629 : 0x05c9,
  766. 0x062A : 0x05ca,
  767. 0x062B : 0x05cb,
  768. 0x062C : 0x05cc,
  769. 0x062D : 0x05cd,
  770. 0x062E : 0x05ce,
  771. 0x062F : 0x05cf,
  772. 0x0630 : 0x05d0,
  773. 0x0631 : 0x05d1,
  774. 0x0632 : 0x05d2,
  775. 0x0633 : 0x05d3,
  776. 0x0634 : 0x05d4,
  777. 0x0635 : 0x05d5,
  778. 0x0636 : 0x05d6,
  779. 0x0637 : 0x05d7,
  780. 0x0638 : 0x05d8,
  781. 0x0639 : 0x05d9,
  782. 0x063A : 0x05da,
  783. 0x0640 : 0x05e0,
  784. 0x0641 : 0x05e1,
  785. 0x0642 : 0x05e2,
  786. 0x0643 : 0x05e3,
  787. 0x0644 : 0x05e4,
  788. 0x0645 : 0x05e5,
  789. 0x0646 : 0x05e6,
  790. 0x0647 : 0x05e7,
  791. 0x0648 : 0x05e8,
  792. 0x0649 : 0x05e9,
  793. 0x064A : 0x05ea,
  794. 0x064B : 0x05eb,
  795. 0x064C : 0x05ec,
  796. 0x064D : 0x05ed,
  797. 0x064E : 0x05ee,
  798. 0x064F : 0x05ef,
  799. 0x0650 : 0x05f0,
  800. 0x0651 : 0x05f1,
  801. 0x0652 : 0x05f2,
  802. 0x0653 : 0x1000653,
  803. 0x0654 : 0x1000654,
  804. 0x0655 : 0x1000655,
  805. 0x0698 : 0x1000698,
  806. 0x06A4 : 0x10006a4,
  807. 0x06A9 : 0x10006a9,
  808. 0x06AF : 0x10006af,
  809. 0x06BA : 0x10006ba,
  810. 0x06BE : 0x10006be,
  811. 0x06CC : 0x10006cc,
  812. 0x06D2 : 0x10006d2,
  813. 0x06C1 : 0x10006c1,
  814. 0x0492 : 0x1000492,
  815. 0x0493 : 0x1000493,
  816. 0x0496 : 0x1000496,
  817. 0x0497 : 0x1000497,
  818. 0x049A : 0x100049a,
  819. 0x049B : 0x100049b,
  820. 0x049C : 0x100049c,
  821. 0x049D : 0x100049d,
  822. 0x04A2 : 0x10004a2,
  823. 0x04A3 : 0x10004a3,
  824. 0x04AE : 0x10004ae,
  825. 0x04AF : 0x10004af,
  826. 0x04B0 : 0x10004b0,
  827. 0x04B1 : 0x10004b1,
  828. 0x04B2 : 0x10004b2,
  829. 0x04B3 : 0x10004b3,
  830. 0x04B6 : 0x10004b6,
  831. 0x04B7 : 0x10004b7,
  832. 0x04B8 : 0x10004b8,
  833. 0x04B9 : 0x10004b9,
  834. 0x04BA : 0x10004ba,
  835. 0x04BB : 0x10004bb,
  836. 0x04D8 : 0x10004d8,
  837. 0x04D9 : 0x10004d9,
  838. 0x04E2 : 0x10004e2,
  839. 0x04E3 : 0x10004e3,
  840. 0x04E8 : 0x10004e8,
  841. 0x04E9 : 0x10004e9,
  842. 0x04EE : 0x10004ee,
  843. 0x04EF : 0x10004ef,
  844. 0x0452 : 0x06a1,
  845. 0x0453 : 0x06a2,
  846. 0x0451 : 0x06a3,
  847. 0x0454 : 0x06a4,
  848. 0x0455 : 0x06a5,
  849. 0x0456 : 0x06a6,
  850. 0x0457 : 0x06a7,
  851. 0x0458 : 0x06a8,
  852. 0x0459 : 0x06a9,
  853. 0x045A : 0x06aa,
  854. 0x045B : 0x06ab,
  855. 0x045C : 0x06ac,
  856. 0x0491 : 0x06ad,
  857. 0x045E : 0x06ae,
  858. 0x045F : 0x06af,
  859. 0x2116 : 0x06b0,
  860. 0x0402 : 0x06b1,
  861. 0x0403 : 0x06b2,
  862. 0x0401 : 0x06b3,
  863. 0x0404 : 0x06b4,
  864. 0x0405 : 0x06b5,
  865. 0x0406 : 0x06b6,
  866. 0x0407 : 0x06b7,
  867. 0x0408 : 0x06b8,
  868. 0x0409 : 0x06b9,
  869. 0x040A : 0x06ba,
  870. 0x040B : 0x06bb,
  871. 0x040C : 0x06bc,
  872. 0x0490 : 0x06bd,
  873. 0x040E : 0x06be,
  874. 0x040F : 0x06bf,
  875. 0x044E : 0x06c0,
  876. 0x0430 : 0x06c1,
  877. 0x0431 : 0x06c2,
  878. 0x0446 : 0x06c3,
  879. 0x0434 : 0x06c4,
  880. 0x0435 : 0x06c5,
  881. 0x0444 : 0x06c6,
  882. 0x0433 : 0x06c7,
  883. 0x0445 : 0x06c8,
  884. 0x0438 : 0x06c9,
  885. 0x0439 : 0x06ca,
  886. 0x043A : 0x06cb,
  887. 0x043B : 0x06cc,
  888. 0x043C : 0x06cd,
  889. 0x043D : 0x06ce,
  890. 0x043E : 0x06cf,
  891. 0x043F : 0x06d0,
  892. 0x044F : 0x06d1,
  893. 0x0440 : 0x06d2,
  894. 0x0441 : 0x06d3,
  895. 0x0442 : 0x06d4,
  896. 0x0443 : 0x06d5,
  897. 0x0436 : 0x06d6,
  898. 0x0432 : 0x06d7,
  899. 0x044C : 0x06d8,
  900. 0x044B : 0x06d9,
  901. 0x0437 : 0x06da,
  902. 0x0448 : 0x06db,
  903. 0x044D : 0x06dc,
  904. 0x0449 : 0x06dd,
  905. 0x0447 : 0x06de,
  906. 0x044A : 0x06df,
  907. 0x042E : 0x06e0,
  908. 0x0410 : 0x06e1,
  909. 0x0411 : 0x06e2,
  910. 0x0426 : 0x06e3,
  911. 0x0414 : 0x06e4,
  912. 0x0415 : 0x06e5,
  913. 0x0424 : 0x06e6,
  914. 0x0413 : 0x06e7,
  915. 0x0425 : 0x06e8,
  916. 0x0418 : 0x06e9,
  917. 0x0419 : 0x06ea,
  918. 0x041A : 0x06eb,
  919. 0x041B : 0x06ec,
  920. 0x041C : 0x06ed,
  921. 0x041D : 0x06ee,
  922. 0x041E : 0x06ef,
  923. 0x041F : 0x06f0,
  924. 0x042F : 0x06f1,
  925. 0x0420 : 0x06f2,
  926. 0x0421 : 0x06f3,
  927. 0x0422 : 0x06f4,
  928. 0x0423 : 0x06f5,
  929. 0x0416 : 0x06f6,
  930. 0x0412 : 0x06f7,
  931. 0x042C : 0x06f8,
  932. 0x042B : 0x06f9,
  933. 0x0417 : 0x06fa,
  934. 0x0428 : 0x06fb,
  935. 0x042D : 0x06fc,
  936. 0x0429 : 0x06fd,
  937. 0x0427 : 0x06fe,
  938. 0x042A : 0x06ff,
  939. 0x0386 : 0x07a1,
  940. 0x0388 : 0x07a2,
  941. 0x0389 : 0x07a3,
  942. 0x038A : 0x07a4,
  943. 0x03AA : 0x07a5,
  944. 0x038C : 0x07a7,
  945. 0x038E : 0x07a8,
  946. 0x03AB : 0x07a9,
  947. 0x038F : 0x07ab,
  948. 0x0385 : 0x07ae,
  949. 0x2015 : 0x07af,
  950. 0x03AC : 0x07b1,
  951. 0x03AD : 0x07b2,
  952. 0x03AE : 0x07b3,
  953. 0x03AF : 0x07b4,
  954. 0x03CA : 0x07b5,
  955. 0x0390 : 0x07b6,
  956. 0x03CC : 0x07b7,
  957. 0x03CD : 0x07b8,
  958. 0x03CB : 0x07b9,
  959. 0x03B0 : 0x07ba,
  960. 0x03CE : 0x07bb,
  961. 0x0391 : 0x07c1,
  962. 0x0392 : 0x07c2,
  963. 0x0393 : 0x07c3,
  964. 0x0394 : 0x07c4,
  965. 0x0395 : 0x07c5,
  966. 0x0396 : 0x07c6,
  967. 0x0397 : 0x07c7,
  968. 0x0398 : 0x07c8,
  969. 0x0399 : 0x07c9,
  970. 0x039A : 0x07ca,
  971. 0x039B : 0x07cb,
  972. 0x039C : 0x07cc,
  973. 0x039D : 0x07cd,
  974. 0x039E : 0x07ce,
  975. 0x039F : 0x07cf,
  976. 0x03A0 : 0x07d0,
  977. 0x03A1 : 0x07d1,
  978. 0x03A3 : 0x07d2,
  979. 0x03A4 : 0x07d4,
  980. 0x03A5 : 0x07d5,
  981. 0x03A6 : 0x07d6,
  982. 0x03A7 : 0x07d7,
  983. 0x03A8 : 0x07d8,
  984. 0x03A9 : 0x07d9,
  985. 0x03B1 : 0x07e1,
  986. 0x03B2 : 0x07e2,
  987. 0x03B3 : 0x07e3,
  988. 0x03B4 : 0x07e4,
  989. 0x03B5 : 0x07e5,
  990. 0x03B6 : 0x07e6,
  991. 0x03B7 : 0x07e7,
  992. 0x03B8 : 0x07e8,
  993. 0x03B9 : 0x07e9,
  994. 0x03BA : 0x07ea,
  995. 0x03BB : 0x07eb,
  996. 0x03BC : 0x07ec,
  997. 0x03BD : 0x07ed,
  998. 0x03BE : 0x07ee,
  999. 0x03BF : 0x07ef,
  1000. 0x03C0 : 0x07f0,
  1001. 0x03C1 : 0x07f1,
  1002. 0x03C3 : 0x07f2,
  1003. 0x03C2 : 0x07f3,
  1004. 0x03C4 : 0x07f4,
  1005. 0x03C5 : 0x07f5,
  1006. 0x03C6 : 0x07f6,
  1007. 0x03C7 : 0x07f7,
  1008. 0x03C8 : 0x07f8,
  1009. 0x03C9 : 0x07f9,
  1010. 0x23B7 : 0x08a1,
  1011. 0x2320 : 0x08a4,
  1012. 0x2321 : 0x08a5,
  1013. 0x23A1 : 0x08a7,
  1014. 0x23A3 : 0x08a8,
  1015. 0x23A4 : 0x08a9,
  1016. 0x23A6 : 0x08aa,
  1017. 0x239B : 0x08ab,
  1018. 0x239D : 0x08ac,
  1019. 0x239E : 0x08ad,
  1020. 0x23A0 : 0x08ae,
  1021. 0x23A8 : 0x08af,
  1022. 0x23AC : 0x08b0,
  1023. 0x2264 : 0x08bc,
  1024. 0x2260 : 0x08bd,
  1025. 0x2265 : 0x08be,
  1026. 0x222B : 0x08bf,
  1027. 0x2234 : 0x08c0,
  1028. 0x221D : 0x08c1,
  1029. 0x221E : 0x08c2,
  1030. 0x2207 : 0x08c5,
  1031. 0x223C : 0x08c8,
  1032. 0x2243 : 0x08c9,
  1033. 0x21D4 : 0x08cd,
  1034. 0x21D2 : 0x08ce,
  1035. 0x2261 : 0x08cf,
  1036. 0x221A : 0x08d6,
  1037. 0x2282 : 0x08da,
  1038. 0x2283 : 0x08db,
  1039. 0x2229 : 0x08dc,
  1040. 0x222A : 0x08dd,
  1041. 0x2227 : 0x08de,
  1042. 0x2228 : 0x08df,
  1043. 0x2202 : 0x08ef,
  1044. 0x0192 : 0x08f6,
  1045. 0x2190 : 0x08fb,
  1046. 0x2191 : 0x08fc,
  1047. 0x2192 : 0x08fd,
  1048. 0x2193 : 0x08fe,
  1049. 0x25C6 : 0x09e0,
  1050. 0x2592 : 0x09e1,
  1051. 0x2409 : 0x09e2,
  1052. 0x240C : 0x09e3,
  1053. 0x240D : 0x09e4,
  1054. 0x240A : 0x09e5,
  1055. 0x2424 : 0x09e8,
  1056. 0x240B : 0x09e9,
  1057. 0x2518 : 0x09ea,
  1058. 0x2510 : 0x09eb,
  1059. 0x250C : 0x09ec,
  1060. 0x2514 : 0x09ed,
  1061. 0x253C : 0x09ee,
  1062. 0x23BA : 0x09ef,
  1063. 0x23BB : 0x09f0,
  1064. 0x2500 : 0x09f1,
  1065. 0x23BC : 0x09f2,
  1066. 0x23BD : 0x09f3,
  1067. 0x251C : 0x09f4,
  1068. 0x2524 : 0x09f5,
  1069. 0x2534 : 0x09f6,
  1070. 0x252C : 0x09f7,
  1071. 0x2502 : 0x09f8,
  1072. 0x2003 : 0x0aa1,
  1073. 0x2002 : 0x0aa2,
  1074. 0x2004 : 0x0aa3,
  1075. 0x2005 : 0x0aa4,
  1076. 0x2007 : 0x0aa5,
  1077. 0x2008 : 0x0aa6,
  1078. 0x2009 : 0x0aa7,
  1079. 0x200A : 0x0aa8,
  1080. 0x2014 : 0x0aa9,
  1081. 0x2013 : 0x0aaa,
  1082. 0x2026 : 0x0aae,
  1083. 0x2025 : 0x0aaf,
  1084. 0x2153 : 0x0ab0,
  1085. 0x2154 : 0x0ab1,
  1086. 0x2155 : 0x0ab2,
  1087. 0x2156 : 0x0ab3,
  1088. 0x2157 : 0x0ab4,
  1089. 0x2158 : 0x0ab5,
  1090. 0x2159 : 0x0ab6,
  1091. 0x215A : 0x0ab7,
  1092. 0x2105 : 0x0ab8,
  1093. 0x2012 : 0x0abb,
  1094. 0x215B : 0x0ac3,
  1095. 0x215C : 0x0ac4,
  1096. 0x215D : 0x0ac5,
  1097. 0x215E : 0x0ac6,
  1098. 0x2122 : 0x0ac9,
  1099. 0x2018 : 0x0ad0,
  1100. 0x2019 : 0x0ad1,
  1101. 0x201C : 0x0ad2,
  1102. 0x201D : 0x0ad3,
  1103. 0x211E : 0x0ad4,
  1104. 0x2032 : 0x0ad6,
  1105. 0x2033 : 0x0ad7,
  1106. 0x271D : 0x0ad9,
  1107. 0x2663 : 0x0aec,
  1108. 0x2666 : 0x0aed,
  1109. 0x2665 : 0x0aee,
  1110. 0x2720 : 0x0af0,
  1111. 0x2020 : 0x0af1,
  1112. 0x2021 : 0x0af2,
  1113. 0x2713 : 0x0af3,
  1114. 0x2717 : 0x0af4,
  1115. 0x266F : 0x0af5,
  1116. 0x266D : 0x0af6,
  1117. 0x2642 : 0x0af7,
  1118. 0x2640 : 0x0af8,
  1119. 0x260E : 0x0af9,
  1120. 0x2315 : 0x0afa,
  1121. 0x2117 : 0x0afb,
  1122. 0x2038 : 0x0afc,
  1123. 0x201A : 0x0afd,
  1124. 0x201E : 0x0afe,
  1125. 0x22A4 : 0x0bc2,
  1126. 0x230A : 0x0bc4,
  1127. 0x2218 : 0x0bca,
  1128. 0x2395 : 0x0bcc,
  1129. 0x22A5 : 0x0bce,
  1130. 0x25CB : 0x0bcf,
  1131. 0x2308 : 0x0bd3,
  1132. 0x22A3 : 0x0bdc,
  1133. 0x22A2 : 0x0bfc,
  1134. 0x2017 : 0x0cdf,
  1135. 0x05D0 : 0x0ce0,
  1136. 0x05D1 : 0x0ce1,
  1137. 0x05D2 : 0x0ce2,
  1138. 0x05D3 : 0x0ce3,
  1139. 0x05D4 : 0x0ce4,
  1140. 0x05D5 : 0x0ce5,
  1141. 0x05D6 : 0x0ce6,
  1142. 0x05D7 : 0x0ce7,
  1143. 0x05D8 : 0x0ce8,
  1144. 0x05D9 : 0x0ce9,
  1145. 0x05DA : 0x0cea,
  1146. 0x05DB : 0x0ceb,
  1147. 0x05DC : 0x0cec,
  1148. 0x05DD : 0x0ced,
  1149. 0x05DE : 0x0cee,
  1150. 0x05DF : 0x0cef,
  1151. 0x05E0 : 0x0cf0,
  1152. 0x05E1 : 0x0cf1,
  1153. 0x05E2 : 0x0cf2,
  1154. 0x05E3 : 0x0cf3,
  1155. 0x05E4 : 0x0cf4,
  1156. 0x05E5 : 0x0cf5,
  1157. 0x05E6 : 0x0cf6,
  1158. 0x05E7 : 0x0cf7,
  1159. 0x05E8 : 0x0cf8,
  1160. 0x05E9 : 0x0cf9,
  1161. 0x05EA : 0x0cfa,
  1162. 0x0E01 : 0x0da1,
  1163. 0x0E02 : 0x0da2,
  1164. 0x0E03 : 0x0da3,
  1165. 0x0E04 : 0x0da4,
  1166. 0x0E05 : 0x0da5,
  1167. 0x0E06 : 0x0da6,
  1168. 0x0E07 : 0x0da7,
  1169. 0x0E08 : 0x0da8,
  1170. 0x0E09 : 0x0da9,
  1171. 0x0E0A : 0x0daa,
  1172. 0x0E0B : 0x0dab,
  1173. 0x0E0C : 0x0dac,
  1174. 0x0E0D : 0x0dad,
  1175. 0x0E0E : 0x0dae,
  1176. 0x0E0F : 0x0daf,
  1177. 0x0E10 : 0x0db0,
  1178. 0x0E11 : 0x0db1,
  1179. 0x0E12 : 0x0db2,
  1180. 0x0E13 : 0x0db3,
  1181. 0x0E14 : 0x0db4,
  1182. 0x0E15 : 0x0db5,
  1183. 0x0E16 : 0x0db6,
  1184. 0x0E17 : 0x0db7,
  1185. 0x0E18 : 0x0db8,
  1186. 0x0E19 : 0x0db9,
  1187. 0x0E1A : 0x0dba,
  1188. 0x0E1B : 0x0dbb,
  1189. 0x0E1C : 0x0dbc,
  1190. 0x0E1D : 0x0dbd,
  1191. 0x0E1E : 0x0dbe,
  1192. 0x0E1F : 0x0dbf,
  1193. 0x0E20 : 0x0dc0,
  1194. 0x0E21 : 0x0dc1,
  1195. 0x0E22 : 0x0dc2,
  1196. 0x0E23 : 0x0dc3,
  1197. 0x0E24 : 0x0dc4,
  1198. 0x0E25 : 0x0dc5,
  1199. 0x0E26 : 0x0dc6,
  1200. 0x0E27 : 0x0dc7,
  1201. 0x0E28 : 0x0dc8,
  1202. 0x0E29 : 0x0dc9,
  1203. 0x0E2A : 0x0dca,
  1204. 0x0E2B : 0x0dcb,
  1205. 0x0E2C : 0x0dcc,
  1206. 0x0E2D : 0x0dcd,
  1207. 0x0E2E : 0x0dce,
  1208. 0x0E2F : 0x0dcf,
  1209. 0x0E30 : 0x0dd0,
  1210. 0x0E31 : 0x0dd1,
  1211. 0x0E32 : 0x0dd2,
  1212. 0x0E33 : 0x0dd3,
  1213. 0x0E34 : 0x0dd4,
  1214. 0x0E35 : 0x0dd5,
  1215. 0x0E36 : 0x0dd6,
  1216. 0x0E37 : 0x0dd7,
  1217. 0x0E38 : 0x0dd8,
  1218. 0x0E39 : 0x0dd9,
  1219. 0x0E3A : 0x0dda,
  1220. 0x0E3F : 0x0ddf,
  1221. 0x0E40 : 0x0de0,
  1222. 0x0E41 : 0x0de1,
  1223. 0x0E42 : 0x0de2,
  1224. 0x0E43 : 0x0de3,
  1225. 0x0E44 : 0x0de4,
  1226. 0x0E45 : 0x0de5,
  1227. 0x0E46 : 0x0de6,
  1228. 0x0E47 : 0x0de7,
  1229. 0x0E48 : 0x0de8,
  1230. 0x0E49 : 0x0de9,
  1231. 0x0E4A : 0x0dea,
  1232. 0x0E4B : 0x0deb,
  1233. 0x0E4C : 0x0dec,
  1234. 0x0E4D : 0x0ded,
  1235. 0x0E50 : 0x0df0,
  1236. 0x0E51 : 0x0df1,
  1237. 0x0E52 : 0x0df2,
  1238. 0x0E53 : 0x0df3,
  1239. 0x0E54 : 0x0df4,
  1240. 0x0E55 : 0x0df5,
  1241. 0x0E56 : 0x0df6,
  1242. 0x0E57 : 0x0df7,
  1243. 0x0E58 : 0x0df8,
  1244. 0x0E59 : 0x0df9,
  1245. 0x0587 : 0x1000587,
  1246. 0x0589 : 0x1000589,
  1247. 0x055D : 0x100055d,
  1248. 0x058A : 0x100058a,
  1249. 0x055C : 0x100055c,
  1250. 0x055B : 0x100055b,
  1251. 0x055E : 0x100055e,
  1252. 0x0531 : 0x1000531,
  1253. 0x0561 : 0x1000561,
  1254. 0x0532 : 0x1000532,
  1255. 0x0562 : 0x1000562,
  1256. 0x0533 : 0x1000533,
  1257. 0x0563 : 0x1000563,
  1258. 0x0534 : 0x1000534,
  1259. 0x0564 : 0x1000564,
  1260. 0x0535 : 0x1000535,
  1261. 0x0565 : 0x1000565,
  1262. 0x0536 : 0x1000536,
  1263. 0x0566 : 0x1000566,
  1264. 0x0537 : 0x1000537,
  1265. 0x0567 : 0x1000567,
  1266. 0x0538 : 0x1000538,
  1267. 0x0568 : 0x1000568,
  1268. 0x0539 : 0x1000539,
  1269. 0x0569 : 0x1000569,
  1270. 0x053A : 0x100053a,
  1271. 0x056A : 0x100056a,
  1272. 0x053B : 0x100053b,
  1273. 0x056B : 0x100056b,
  1274. 0x053C : 0x100053c,
  1275. 0x056C : 0x100056c,
  1276. 0x053D : 0x100053d,
  1277. 0x056D : 0x100056d,
  1278. 0x053E : 0x100053e,
  1279. 0x056E : 0x100056e,
  1280. 0x053F : 0x100053f,
  1281. 0x056F : 0x100056f,
  1282. 0x0540 : 0x1000540,
  1283. 0x0570 : 0x1000570,
  1284. 0x0541 : 0x1000541,
  1285. 0x0571 : 0x1000571,
  1286. 0x0542 : 0x1000542,
  1287. 0x0572 : 0x1000572,
  1288. 0x0543 : 0x1000543,
  1289. 0x0573 : 0x1000573,
  1290. 0x0544 : 0x1000544,
  1291. 0x0574 : 0x1000574,
  1292. 0x0545 : 0x1000545,
  1293. 0x0575 : 0x1000575,
  1294. 0x0546 : 0x1000546,
  1295. 0x0576 : 0x1000576,
  1296. 0x0547 : 0x1000547,
  1297. 0x0577 : 0x1000577,
  1298. 0x0548 : 0x1000548,
  1299. 0x0578 : 0x1000578,
  1300. 0x0549 : 0x1000549,
  1301. 0x0579 : 0x1000579,
  1302. 0x054A : 0x100054a,
  1303. 0x057A : 0x100057a,
  1304. 0x054B : 0x100054b,
  1305. 0x057B : 0x100057b,
  1306. 0x054C : 0x100054c,
  1307. 0x057C : 0x100057c,
  1308. 0x054D : 0x100054d,
  1309. 0x057D : 0x100057d,
  1310. 0x054E : 0x100054e,
  1311. 0x057E : 0x100057e,
  1312. 0x054F : 0x100054f,
  1313. 0x057F : 0x100057f,
  1314. 0x0550 : 0x1000550,
  1315. 0x0580 : 0x1000580,
  1316. 0x0551 : 0x1000551,
  1317. 0x0581 : 0x1000581,
  1318. 0x0552 : 0x1000552,
  1319. 0x0582 : 0x1000582,
  1320. 0x0553 : 0x1000553,
  1321. 0x0583 : 0x1000583,
  1322. 0x0554 : 0x1000554,
  1323. 0x0584 : 0x1000584,
  1324. 0x0555 : 0x1000555,
  1325. 0x0585 : 0x1000585,
  1326. 0x0556 : 0x1000556,
  1327. 0x0586 : 0x1000586,
  1328. 0x055A : 0x100055a,
  1329. 0x10D0 : 0x10010d0,
  1330. 0x10D1 : 0x10010d1,
  1331. 0x10D2 : 0x10010d2,
  1332. 0x10D3 : 0x10010d3,
  1333. 0x10D4 : 0x10010d4,
  1334. 0x10D5 : 0x10010d5,
  1335. 0x10D6 : 0x10010d6,
  1336. 0x10D7 : 0x10010d7,
  1337. 0x10D8 : 0x10010d8,
  1338. 0x10D9 : 0x10010d9,
  1339. 0x10DA : 0x10010da,
  1340. 0x10DB : 0x10010db,
  1341. 0x10DC : 0x10010dc,
  1342. 0x10DD : 0x10010dd,
  1343. 0x10DE : 0x10010de,
  1344. 0x10DF : 0x10010df,
  1345. 0x10E0 : 0x10010e0,
  1346. 0x10E1 : 0x10010e1,
  1347. 0x10E2 : 0x10010e2,
  1348. 0x10E3 : 0x10010e3,
  1349. 0x10E4 : 0x10010e4,
  1350. 0x10E5 : 0x10010e5,
  1351. 0x10E6 : 0x10010e6,
  1352. 0x10E7 : 0x10010e7,
  1353. 0x10E8 : 0x10010e8,
  1354. 0x10E9 : 0x10010e9,
  1355. 0x10EA : 0x10010ea,
  1356. 0x10EB : 0x10010eb,
  1357. 0x10EC : 0x10010ec,
  1358. 0x10ED : 0x10010ed,
  1359. 0x10EE : 0x10010ee,
  1360. 0x10EF : 0x10010ef,
  1361. 0x10F0 : 0x10010f0,
  1362. 0x10F1 : 0x10010f1,
  1363. 0x10F2 : 0x10010f2,
  1364. 0x10F3 : 0x10010f3,
  1365. 0x10F4 : 0x10010f4,
  1366. 0x10F5 : 0x10010f5,
  1367. 0x10F6 : 0x10010f6,
  1368. 0x1E8A : 0x1001e8a,
  1369. 0x012C : 0x100012c,
  1370. 0x01B5 : 0x10001b5,
  1371. 0x01E6 : 0x10001e6,
  1372. 0x01D2 : 0x10001d1,
  1373. 0x019F : 0x100019f,
  1374. 0x1E8B : 0x1001e8b,
  1375. 0x012D : 0x100012d,
  1376. 0x01B6 : 0x10001b6,
  1377. 0x01E7 : 0x10001e7,
  1378. 0x01D2 : 0x10001d2,
  1379. 0x0275 : 0x1000275,
  1380. 0x018F : 0x100018f,
  1381. 0x0259 : 0x1000259,
  1382. 0x1E36 : 0x1001e36,
  1383. 0x1E37 : 0x1001e37,
  1384. 0x1EA0 : 0x1001ea0,
  1385. 0x1EA1 : 0x1001ea1,
  1386. 0x1EA2 : 0x1001ea2,
  1387. 0x1EA3 : 0x1001ea3,
  1388. 0x1EA4 : 0x1001ea4,
  1389. 0x1EA5 : 0x1001ea5,
  1390. 0x1EA6 : 0x1001ea6,
  1391. 0x1EA7 : 0x1001ea7,
  1392. 0x1EA8 : 0x1001ea8,
  1393. 0x1EA9 : 0x1001ea9,
  1394. 0x1EAA : 0x1001eaa,
  1395. 0x1EAB : 0x1001eab,
  1396. 0x1EAC : 0x1001eac,
  1397. 0x1EAD : 0x1001ead,
  1398. 0x1EAE : 0x1001eae,
  1399. 0x1EAF : 0x1001eaf,
  1400. 0x1EB0 : 0x1001eb0,
  1401. 0x1EB1 : 0x1001eb1,
  1402. 0x1EB2 : 0x1001eb2,
  1403. 0x1EB3 : 0x1001eb3,
  1404. 0x1EB4 : 0x1001eb4,
  1405. 0x1EB5 : 0x1001eb5,
  1406. 0x1EB6 : 0x1001eb6,
  1407. 0x1EB7 : 0x1001eb7,
  1408. 0x1EB8 : 0x1001eb8,
  1409. 0x1EB9 : 0x1001eb9,
  1410. 0x1EBA : 0x1001eba,
  1411. 0x1EBB : 0x1001ebb,
  1412. 0x1EBC : 0x1001ebc,
  1413. 0x1EBD : 0x1001ebd,
  1414. 0x1EBE : 0x1001ebe,
  1415. 0x1EBF : 0x1001ebf,
  1416. 0x1EC0 : 0x1001ec0,
  1417. 0x1EC1 : 0x1001ec1,
  1418. 0x1EC2 : 0x1001ec2,
  1419. 0x1EC3 : 0x1001ec3,
  1420. 0x1EC4 : 0x1001ec4,
  1421. 0x1EC5 : 0x1001ec5,
  1422. 0x1EC6 : 0x1001ec6,
  1423. 0x1EC7 : 0x1001ec7,
  1424. 0x1EC8 : 0x1001ec8,
  1425. 0x1EC9 : 0x1001ec9,
  1426. 0x1ECA : 0x1001eca,
  1427. 0x1ECB : 0x1001ecb,
  1428. 0x1ECC : 0x1001ecc,
  1429. 0x1ECD : 0x1001ecd,
  1430. 0x1ECE : 0x1001ece,
  1431. 0x1ECF : 0x1001ecf,
  1432. 0x1ED0 : 0x1001ed0,
  1433. 0x1ED1 : 0x1001ed1,
  1434. 0x1ED2 : 0x1001ed2,
  1435. 0x1ED3 : 0x1001ed3,
  1436. 0x1ED4 : 0x1001ed4,
  1437. 0x1ED5 : 0x1001ed5,
  1438. 0x1ED6 : 0x1001ed6,
  1439. 0x1ED7 : 0x1001ed7,
  1440. 0x1ED8 : 0x1001ed8,
  1441. 0x1ED9 : 0x1001ed9,
  1442. 0x1EDA : 0x1001eda,
  1443. 0x1EDB : 0x1001edb,
  1444. 0x1EDC : 0x1001edc,
  1445. 0x1EDD : 0x1001edd,
  1446. 0x1EDE : 0x1001ede,
  1447. 0x1EDF : 0x1001edf,
  1448. 0x1EE0 : 0x1001ee0,
  1449. 0x1EE1 : 0x1001ee1,
  1450. 0x1EE2 : 0x1001ee2,
  1451. 0x1EE3 : 0x1001ee3,
  1452. 0x1EE4 : 0x1001ee4,
  1453. 0x1EE5 : 0x1001ee5,
  1454. 0x1EE6 : 0x1001ee6,
  1455. 0x1EE7 : 0x1001ee7,
  1456. 0x1EE8 : 0x1001ee8,
  1457. 0x1EE9 : 0x1001ee9,
  1458. 0x1EEA : 0x1001eea,
  1459. 0x1EEB : 0x1001eeb,
  1460. 0x1EEC : 0x1001eec,
  1461. 0x1EED : 0x1001eed,
  1462. 0x1EEE : 0x1001eee,
  1463. 0x1EEF : 0x1001eef,
  1464. 0x1EF0 : 0x1001ef0,
  1465. 0x1EF1 : 0x1001ef1,
  1466. 0x1EF4 : 0x1001ef4,
  1467. 0x1EF5 : 0x1001ef5,
  1468. 0x1EF6 : 0x1001ef6,
  1469. 0x1EF7 : 0x1001ef7,
  1470. 0x1EF8 : 0x1001ef8,
  1471. 0x1EF9 : 0x1001ef9,
  1472. 0x01A0 : 0x10001a0,
  1473. 0x01A1 : 0x10001a1,
  1474. 0x01AF : 0x10001af,
  1475. 0x01B0 : 0x10001b0,
  1476. 0x20A0 : 0x10020a0,
  1477. 0x20A1 : 0x10020a1,
  1478. 0x20A2 : 0x10020a2,
  1479. 0x20A3 : 0x10020a3,
  1480. 0x20A4 : 0x10020a4,
  1481. 0x20A5 : 0x10020a5,
  1482. 0x20A6 : 0x10020a6,
  1483. 0x20A7 : 0x10020a7,
  1484. 0x20A8 : 0x10020a8,
  1485. 0x20A9 : 0x10020a9,
  1486. 0x20AA : 0x10020aa,
  1487. 0x20AB : 0x10020ab,
  1488. 0x20AC : 0x20ac,
  1489. 0x2070 : 0x1002070,
  1490. 0x2074 : 0x1002074,
  1491. 0x2075 : 0x1002075,
  1492. 0x2076 : 0x1002076,
  1493. 0x2077 : 0x1002077,
  1494. 0x2078 : 0x1002078,
  1495. 0x2079 : 0x1002079,
  1496. 0x2080 : 0x1002080,
  1497. 0x2081 : 0x1002081,
  1498. 0x2082 : 0x1002082,
  1499. 0x2083 : 0x1002083,
  1500. 0x2084 : 0x1002084,
  1501. 0x2085 : 0x1002085,
  1502. 0x2086 : 0x1002086,
  1503. 0x2087 : 0x1002087,
  1504. 0x2088 : 0x1002088,
  1505. 0x2089 : 0x1002089,
  1506. 0x2202 : 0x1002202,
  1507. 0x2205 : 0x1002205,
  1508. 0x2208 : 0x1002208,
  1509. 0x2209 : 0x1002209,
  1510. 0x220B : 0x100220B,
  1511. 0x221A : 0x100221A,
  1512. 0x221B : 0x100221B,
  1513. 0x221C : 0x100221C,
  1514. 0x222C : 0x100222C,
  1515. 0x222D : 0x100222D,
  1516. 0x2235 : 0x1002235,
  1517. 0x2245 : 0x1002248,
  1518. 0x2247 : 0x1002247,
  1519. 0x2262 : 0x1002262,
  1520. 0x2263 : 0x1002263,
  1521. 0x2800 : 0x1002800,
  1522. 0x2801 : 0x1002801,
  1523. 0x2802 : 0x1002802,
  1524. 0x2803 : 0x1002803,
  1525. 0x2804 : 0x1002804,
  1526. 0x2805 : 0x1002805,
  1527. 0x2806 : 0x1002806,
  1528. 0x2807 : 0x1002807,
  1529. 0x2808 : 0x1002808,
  1530. 0x2809 : 0x1002809,
  1531. 0x280a : 0x100280a,
  1532. 0x280b : 0x100280b,
  1533. 0x280c : 0x100280c,
  1534. 0x280d : 0x100280d,
  1535. 0x280e : 0x100280e,
  1536. 0x280f : 0x100280f,
  1537. 0x2810 : 0x1002810,
  1538. 0x2811 : 0x1002811,
  1539. 0x2812 : 0x1002812,
  1540. 0x2813 : 0x1002813,
  1541. 0x2814 : 0x1002814,
  1542. 0x2815 : 0x1002815,
  1543. 0x2816 : 0x1002816,
  1544. 0x2817 : 0x1002817,
  1545. 0x2818 : 0x1002818,
  1546. 0x2819 : 0x1002819,
  1547. 0x281a : 0x100281a,
  1548. 0x281b : 0x100281b,
  1549. 0x281c : 0x100281c,
  1550. 0x281d : 0x100281d,
  1551. 0x281e : 0x100281e,
  1552. 0x281f : 0x100281f,
  1553. 0x2820 : 0x1002820,
  1554. 0x2821 : 0x1002821,
  1555. 0x2822 : 0x1002822,
  1556. 0x2823 : 0x1002823,
  1557. 0x2824 : 0x1002824,
  1558. 0x2825 : 0x1002825,
  1559. 0x2826 : 0x1002826,
  1560. 0x2827 : 0x1002827,
  1561. 0x2828 : 0x1002828,
  1562. 0x2829 : 0x1002829,
  1563. 0x282a : 0x100282a,
  1564. 0x282b : 0x100282b,
  1565. 0x282c : 0x100282c,
  1566. 0x282d : 0x100282d,
  1567. 0x282e : 0x100282e,
  1568. 0x282f : 0x100282f,
  1569. 0x2830 : 0x1002830,
  1570. 0x2831 : 0x1002831,
  1571. 0x2832 : 0x1002832,
  1572. 0x2833 : 0x1002833,
  1573. 0x2834 : 0x1002834,
  1574. 0x2835 : 0x1002835,
  1575. 0x2836 : 0x1002836,
  1576. 0x2837 : 0x1002837,
  1577. 0x2838 : 0x1002838,
  1578. 0x2839 : 0x1002839,
  1579. 0x283a : 0x100283a,
  1580. 0x283b : 0x100283b,
  1581. 0x283c : 0x100283c,
  1582. 0x283d : 0x100283d,
  1583. 0x283e : 0x100283e,
  1584. 0x283f : 0x100283f,
  1585. 0x2840 : 0x1002840,
  1586. 0x2841 : 0x1002841,
  1587. 0x2842 : 0x1002842,
  1588. 0x2843 : 0x1002843,
  1589. 0x2844 : 0x1002844,
  1590. 0x2845 : 0x1002845,
  1591. 0x2846 : 0x1002846,
  1592. 0x2847 : 0x1002847,
  1593. 0x2848 : 0x1002848,
  1594. 0x2849 : 0x1002849,
  1595. 0x284a : 0x100284a,
  1596. 0x284b : 0x100284b,
  1597. 0x284c : 0x100284c,
  1598. 0x284d : 0x100284d,
  1599. 0x284e : 0x100284e,
  1600. 0x284f : 0x100284f,
  1601. 0x2850 : 0x1002850,
  1602. 0x2851 : 0x1002851,
  1603. 0x2852 : 0x1002852,
  1604. 0x2853 : 0x1002853,
  1605. 0x2854 : 0x1002854,
  1606. 0x2855 : 0x1002855,
  1607. 0x2856 : 0x1002856,
  1608. 0x2857 : 0x1002857,
  1609. 0x2858 : 0x1002858,
  1610. 0x2859 : 0x1002859,
  1611. 0x285a : 0x100285a,
  1612. 0x285b : 0x100285b,
  1613. 0x285c : 0x100285c,
  1614. 0x285d : 0x100285d,
  1615. 0x285e : 0x100285e,
  1616. 0x285f : 0x100285f,
  1617. 0x2860 : 0x1002860,
  1618. 0x2861 : 0x1002861,
  1619. 0x2862 : 0x1002862,
  1620. 0x2863 : 0x1002863,
  1621. 0x2864 : 0x1002864,
  1622. 0x2865 : 0x1002865,
  1623. 0x2866 : 0x1002866,
  1624. 0x2867 : 0x1002867,
  1625. 0x2868 : 0x1002868,
  1626. 0x2869 : 0x1002869,
  1627. 0x286a : 0x100286a,
  1628. 0x286b : 0x100286b,
  1629. 0x286c : 0x100286c,
  1630. 0x286d : 0x100286d,
  1631. 0x286e : 0x100286e,
  1632. 0x286f : 0x100286f,
  1633. 0x2870 : 0x1002870,
  1634. 0x2871 : 0x1002871,
  1635. 0x2872 : 0x1002872,
  1636. 0x2873 : 0x1002873,
  1637. 0x2874 : 0x1002874,
  1638. 0x2875 : 0x1002875,
  1639. 0x2876 : 0x1002876,
  1640. 0x2877 : 0x1002877,
  1641. 0x2878 : 0x1002878,
  1642. 0x2879 : 0x1002879,
  1643. 0x287a : 0x100287a,
  1644. 0x287b : 0x100287b,
  1645. 0x287c : 0x100287c,
  1646. 0x287d : 0x100287d,
  1647. 0x287e : 0x100287e,
  1648. 0x287f : 0x100287f,
  1649. 0x2880 : 0x1002880,
  1650. 0x2881 : 0x1002881,
  1651. 0x2882 : 0x1002882,
  1652. 0x2883 : 0x1002883,
  1653. 0x2884 : 0x1002884,
  1654. 0x2885 : 0x1002885,
  1655. 0x2886 : 0x1002886,
  1656. 0x2887 : 0x1002887,
  1657. 0x2888 : 0x1002888,
  1658. 0x2889 : 0x1002889,
  1659. 0x288a : 0x100288a,
  1660. 0x288b : 0x100288b,
  1661. 0x288c : 0x100288c,
  1662. 0x288d : 0x100288d,
  1663. 0x288e : 0x100288e,
  1664. 0x288f : 0x100288f,
  1665. 0x2890 : 0x1002890,
  1666. 0x2891 : 0x1002891,
  1667. 0x2892 : 0x1002892,
  1668. 0x2893 : 0x1002893,
  1669. 0x2894 : 0x1002894,
  1670. 0x2895 : 0x1002895,
  1671. 0x2896 : 0x1002896,
  1672. 0x2897 : 0x1002897,
  1673. 0x2898 : 0x1002898,
  1674. 0x2899 : 0x1002899,
  1675. 0x289a : 0x100289a,
  1676. 0x289b : 0x100289b,
  1677. 0x289c : 0x100289c,
  1678. 0x289d : 0x100289d,
  1679. 0x289e : 0x100289e,
  1680. 0x289f : 0x100289f,
  1681. 0x28a0 : 0x10028a0,
  1682. 0x28a1 : 0x10028a1,
  1683. 0x28a2 : 0x10028a2,
  1684. 0x28a3 : 0x10028a3,
  1685. 0x28a4 : 0x10028a4,
  1686. 0x28a5 : 0x10028a5,
  1687. 0x28a6 : 0x10028a6,
  1688. 0x28a7 : 0x10028a7,
  1689. 0x28a8 : 0x10028a8,
  1690. 0x28a9 : 0x10028a9,
  1691. 0x28aa : 0x10028aa,
  1692. 0x28ab : 0x10028ab,
  1693. 0x28ac : 0x10028ac,
  1694. 0x28ad : 0x10028ad,
  1695. 0x28ae : 0x10028ae,
  1696. 0x28af : 0x10028af,
  1697. 0x28b0 : 0x10028b0,
  1698. 0x28b1 : 0x10028b1,
  1699. 0x28b2 : 0x10028b2,
  1700. 0x28b3 : 0x10028b3,
  1701. 0x28b4 : 0x10028b4,
  1702. 0x28b5 : 0x10028b5,
  1703. 0x28b6 : 0x10028b6,
  1704. 0x28b7 : 0x10028b7,
  1705. 0x28b8 : 0x10028b8,
  1706. 0x28b9 : 0x10028b9,
  1707. 0x28ba : 0x10028ba,
  1708. 0x28bb : 0x10028bb,
  1709. 0x28bc : 0x10028bc,
  1710. 0x28bd : 0x10028bd,
  1711. 0x28be : 0x10028be,
  1712. 0x28bf : 0x10028bf,
  1713. 0x28c0 : 0x10028c0,
  1714. 0x28c1 : 0x10028c1,
  1715. 0x28c2 : 0x10028c2,
  1716. 0x28c3 : 0x10028c3,
  1717. 0x28c4 : 0x10028c4,
  1718. 0x28c5 : 0x10028c5,
  1719. 0x28c6 : 0x10028c6,
  1720. 0x28c7 : 0x10028c7,
  1721. 0x28c8 : 0x10028c8,
  1722. 0x28c9 : 0x10028c9,
  1723. 0x28ca : 0x10028ca,
  1724. 0x28cb : 0x10028cb,
  1725. 0x28cc : 0x10028cc,
  1726. 0x28cd : 0x10028cd,
  1727. 0x28ce : 0x10028ce,
  1728. 0x28cf : 0x10028cf,
  1729. 0x28d0 : 0x10028d0,
  1730. 0x28d1 : 0x10028d1,
  1731. 0x28d2 : 0x10028d2,
  1732. 0x28d3 : 0x10028d3,
  1733. 0x28d4 : 0x10028d4,
  1734. 0x28d5 : 0x10028d5,
  1735. 0x28d6 : 0x10028d6,
  1736. 0x28d7 : 0x10028d7,
  1737. 0x28d8 : 0x10028d8,
  1738. 0x28d9 : 0x10028d9,
  1739. 0x28da : 0x10028da,
  1740. 0x28db : 0x10028db,
  1741. 0x28dc : 0x10028dc,
  1742. 0x28dd : 0x10028dd,
  1743. 0x28de : 0x10028de,
  1744. 0x28df : 0x10028df,
  1745. 0x28e0 : 0x10028e0,
  1746. 0x28e1 : 0x10028e1,
  1747. 0x28e2 : 0x10028e2,
  1748. 0x28e3 : 0x10028e3,
  1749. 0x28e4 : 0x10028e4,
  1750. 0x28e5 : 0x10028e5,
  1751. 0x28e6 : 0x10028e6,
  1752. 0x28e7 : 0x10028e7,
  1753. 0x28e8 : 0x10028e8,
  1754. 0x28e9 : 0x10028e9,
  1755. 0x28ea : 0x10028ea,
  1756. 0x28eb : 0x10028eb,
  1757. 0x28ec : 0x10028ec,
  1758. 0x28ed : 0x10028ed,
  1759. 0x28ee : 0x10028ee,
  1760. 0x28ef : 0x10028ef,
  1761. 0x28f0 : 0x10028f0,
  1762. 0x28f1 : 0x10028f1,
  1763. 0x28f2 : 0x10028f2,
  1764. 0x28f3 : 0x10028f3,
  1765. 0x28f4 : 0x10028f4,
  1766. 0x28f5 : 0x10028f5,
  1767. 0x28f6 : 0x10028f6,
  1768. 0x28f7 : 0x10028f7,
  1769. 0x28f8 : 0x10028f8,
  1770. 0x28f9 : 0x10028f9,
  1771. 0x28fa : 0x10028fa,
  1772. 0x28fb : 0x10028fb,
  1773. 0x28fc : 0x10028fc,
  1774. 0x28fd : 0x10028fd,
  1775. 0x28fe : 0x10028fe,
  1776. 0x28ff : 0x10028ff,
  1777. };