| 2 | "use strict"; |
| 3 | |
| 4 | function substituteCodepoint(cp) { |
| 5 | // Any Unicode code points which do not have corresponding keysym entries |
| 6 | // can be swapped out for another code point by adding them to this table |
| 7 | var substitutions = { |
| 8 | // {S,s} with comma below -> {S,s} with cedilla |
| 9 | 0x218 : 0x15e, |
| 10 | 0x219 : 0x15f, |
| 11 | // {T,t} with comma below -> {T,t} with cedilla |
| 12 | 0x21a : 0x162, |
| 13 | 0x21b : 0x163 |
| 14 | }; |
| 15 | |
| 16 | var sub = substitutions[cp]; |
| 17 | return sub ? sub : cp; |
| 18 | } |
| 19 | |
| 20 | function isMac() { |
| 21 | return navigator && !!(/mac/i).exec(navigator.platform); |