Accessibility note. <em> tags in the output represent character differences per lines compared.
Execution time: 0.071 seconds
Number of differences: 34 differences.
Original vs. Modified | ||
---|---|---|
... | ... | |
548 | 548 | chr = "\n"; |
549 | 549 | break; |
550 | 550 | default: |
551 | chr = lang[key][mode]; | |
551 | chr = lang[key][mode&(~VK_CAPS)]; // Ignore CapsLock | |
552 | 552 | break; |
553 | 553 | } |
554 | 554 | if (chr) { |
... | ... | |
635 | 635 | * it's global event handler. do not process event, if keyboard is closed |
636 | 636 | */ |
637 | 637 | if (!self.isOpen()) return; |
638 | // Only process keys if CapsLock is down. We still have to watch for the CapsLock key itself | |
639 | if (!(mode&VK_CAPS) && (e.getKeyCode() != 20)) return; | |
638 | 640 | /* |
639 | 641 | * record new keyboard mode |
640 | 642 | */ |
... | ... | |
842 | 844 | var key = el.id.substring(idPrefix.length); |
843 | 845 | switch (key) { |
844 | 846 | case "caps": |
845 | newMode = newMode ^ VK_CAPS; | |
847 | // Ignore button clicks; only respond to the physical CapsLock | |
846 | 848 | break; |
847 | 849 | case "shift_left": |
848 | 850 | case "shift_right": |
... | ... | |
1281 | 1283 | if (icc>-1 && cc[i-icc]) { |
1282 | 1284 | char_caps = cc[i-icc]; |
1283 | 1285 | } |
1284 | if (char_caps) { | |
1286 | chr[VK_CAPS] = char_normal; // ignore CapsLock key | |
1285 | chr[VK_CAPS] = char_caps; | |
1286 | } else if (char_shift && char_shift.toUpperCase() != char_shift.toLowerCase()) { | |
1287 | chr[VK_CAPS] = char_shift; | |
1288 | } else if (char_normal) { | |
1289 | chr[VK_CAPS] = char_normal.toUpperCase(); | |
1290 | } | |
1291 | 1287 | |
1292 | 1288 | if (shift_caps.hasOwnProperty(i)) { |
1293 | 1289 | csc = __doParse(shift_caps[i]); |
... | ... | |
1355 | 1351 | ca[VK_SHIFT] = cssClasses.modeShift; |
1356 | 1352 | ca[VK_ALT_CTRL] = cssClasses.modeAlt; |
1357 | 1353 | ca[VK_SHIFT_ALT_CTRL] = cssClasses.modeShiftAlt; |
1358 | ca[VK_CAPS] = cssClasses.modeCaps; | |
1354 | ca[VK_CAPS] = cssClasses.modeNormal; | |
1359 | ca[VK_SHIFT_CAPS] = cssClasses.modeShiftCaps; | |
1355 | ca[VK_SHIFT_CAPS] = cssClasses.modeShift; | |
1360 | 1356 | // these ones are the subject to change |
1361 | 1357 | ca[VK_ALT] = cssClasses.modeNormal; |
1362 | 1358 | ca[VK_CTRL] = cssClasses.modeNormal; |
1363 | 1359 | ca[VK_ALT_SHIFT] = cssClasses.modeShift; |
1364 | 1360 | ca[VK_CTRL_SHIFT] = cssClasses.modeShift; |
1365 | ca[VK_ALT_CAPS] = cssClasses.modeCaps; | |
1361 | ca[VK_ALT_CAPS] = cssClasses.modeNormal; | |
1366 | ca[VK_CTRL_CAPS] = cssClasses.modeCaps; | |
1362 | ca[VK_CTRL_CAPS] = cssClasses.modeNormal; | |
1367 | 1363 | // below ones are not used and should |
1368 | 1364 | ca[VK_ALT_CTRL_CAPS] = cssClasses.modeShiftAltCaps; |
1369 | 1365 | ca[VK_ALL] = cssClasses.modeShiftAltCaps; |
1370 | 1366 | |
1371 | DOM.CSS(nodes.desk).removeClass(ca).addClass(ca[mode]); | |
1367 | DOM.CSS(nodes.desk).removeClass(ca).addClass(ca[mode&(~VK_CAPS)]); // ignore CapsLock | |
1372 | 1368 | } |
1373 | 1369 | /** |
1374 | 1370 | * Sets specified state on dual keys (like Alt, Ctrl) |
... | ... | |
Original diff view created as DOM objects by jsdifflib. Diff view recreated as a JavaScript array by Austin Cheney. |