(e)
| 575 | |
| 576 | var lastStoppedKey = null, maybeTransition; |
| 577 | function onKeyDown(e) { |
| 578 | if (!focused) onFocus(); |
| 579 | if (ie && e.keyCode == 27) { e.returnValue = false; } |
| 580 | if (pollingFast) { if (readInput()) pollingFast = false; } |
| 581 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; |
| 582 | var code = e_prop(e, "keyCode"); |
| 583 | // IE does strange things with escape. |
| 584 | setShift(code == 16 || e_prop(e, "shiftKey")); |
| 585 | // First give onKeyEvent option a chance to handle this. |
| 586 | var handled = handleKeyBinding(e); |
| 587 | if (window.opera) { |
| 588 | lastStoppedKey = handled ? code : null; |
| 589 | // Opera has no cut event... we try to at least catch the key combo |
| 590 | if (!handled && code == 88 && e_prop(e, mac ? "metaKey" : "ctrlKey")) |
| 591 | replaceSelection(""); |
| 592 | } |
| 593 | } |
| 594 | function onKeyPress(e) { |
| 595 | if (pollingFast) readInput(); |
| 596 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; |
nothing calls this directly
no test coverage detected