Handles keydown events on the THEAD element.

@method _onTheadKeydown
@param e {HTMLEvent} The key event.
@param oSelf {YAHOO.wiget.DataTable} DataTable instance.
@private
345193
function(e, oSelf) {
    var elTarget = Ev.getTarget(e);
    var elTag = elTarget.nodeName.toLowerCase();
    var bKeepBubbling = true;
    while(elTarget && (elTag != "table")) {
        switch(elTag) {
            case "body":
                return;
            case "input":
            case "textarea":
                // TODO: implement textareaKeyEvent
                break;
            case "thead":
                bKeepBubbling = oSelf.fireEvent("theadKeyEvent",{target:elTarget,event:e});
                break;
            default:
                break;
        }
        if(bKeepBubbling === false) {
            return;
        }
        else {
            elTarget = elTarget.parentNode;
            if(elTarget) {
                elTag = elTarget.nodeName.toLowerCase();
            }
        }
    }
    oSelf.fireEvent("tableKeyEvent",{target:(elTarget || oSelf._elContainer),event:e});
}
1192038
function handleKeyboard(e) {
            if (e.originalEvent) e = e.originalEvent; //jquery fix
            var kc = e.keyCode || e.charCode;
            // Directions locks
            if (!s.params.allowSwipeToNext && (s.isHorizontal() && kc === 39 || !s.isHorizontal() && kc === 40)) {
                return false;
            }
            if (!s.params.allowSwipeToPrev && (s.isHorizontal() && kc === 37 || !s.isHorizontal() && kc === 38)) {
                return false;
            }
            if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
                return;
            }
            if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
                return;
            }
            if (kc === 37 || kc === 39 || kc === 38 || kc === 40) {
                var inView = false;
                //Check that swiper should be inside of visible area of window
                if (s.container.parents('.' + s.params.slideClass).length > 0 && s.container.parents('.' + s.params.slideActiveClass).length === 0) {
                    return;
                }
                var windowScroll = {
                    left: window.pageXOffset,
                    top: window.pageYOffset
                };
                var windowWidth = window.innerWidth;
                var windowHeight = window.innerHeight;
                var swiperOffset = s.container.offset();
                if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft;
                var swiperCoord = [
                    [swiperOffset.left, swiperOffset.top],
                    [swiperOffset.left + s.width, swiperOffset.top],
                    [swiperOffset.left, swiperOffset.top + s.height],
                    [swiperOffset.left + s.width, swiperOffset.top + s.height]
                ];
                for (var i = 0; i < swiperCoord.length; i++) {
                    var point = swiperCoord[i];
                    if (
                        point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth &&
                        point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight
                    ) {
                        inView = true;
                    }
        
                }
                if (!inView) return;
            }
            if (s.isHorizontal()) {
                if (kc === 37 || kc === 39) {
                    if (e.preventDefault) e.preventDefault();
                    else e.returnValue = false;
                }
                if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext();
                if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev();
            }
            else {
                if (kc === 38 || kc === 40) {
                    if (e.preventDefault) e.preventDefault();
                    else e.returnValue = false;
                }
                if (kc === 40) s.slideNext();
                if (kc === 38) s.slidePrev();
            }
            s.emit('onKeyPress', s, kc);
        }
116842
function(e, oSelf) {
    var elTarget = Ev.getTarget(e);
    oSelf.fireEvent("dropdownChangeEvent", {event:e, target:elTarget});
}
424984
function(event) {
      if (event.ctrlKey) {
        return;
      }
      event.preventDefault();
      var elem = $(this);
      var data = window.kelmu.data[id];
      data.selectedElementNumber = parseInt(elem.attr('data-annotation'), 10);
      updateView(false, true);
    }
1090649
function handleItemKeydown(e) {
    eventUtils.handleActionKeydown(e, () => {
        this.handleItemClick(e);
    });

    eventUtils.handleEscapeKeydown(e, () => {
        this.buttonEl.focus();
        this.setState('expanded', false);
    });
}
1300693
public void keyReleased(KeyEvent e) {
        char ch = e.getKeyChar();
        if (ch == KeyEvent.CHAR_UNDEFINED || Character.isISOControl(ch))
            return;
        int pos = editor.getCaretPosition();
        String str = editor.getText();
        if (str.length() == 0)
            return;

        boolean matchFound = false;
        for (int k = 0; k < comboBox.getItemCount(); k++) {
            String item = comboBox.getItemAt(k).toString();
            if (startsWithIgnoreCase(item, str)) {
                comboBox.setSelectedIndex(k);
                editor.setText(item);
                editor.setCaretPosition(item.length());
                editor.moveCaretPosition(pos);

                // show popup when the user types
                if (comboBox.isDisplayable())
                    comboBox.setPopupVisible(true);

                matchFound = true;
                break;
            }
        }
        if (!matchFound) {
            // hide popup when there is no match
            comboBox.setPopupVisible(false);
        }
    }
1049406
function onKeydown(event)
{
  // Gets the keycode, then stores it
  var keyCode = event.which;

  // Checks which action matches with the current keycode
  switch (keyCode)
  {
    case 65: keyA();
    break;

    case 66: keyB();
    break;

    case 67: keyC();
    break;

    case 68: keyD();
    break;

    case 69: keyE();
    break;

    case 70: keyF();
    break;

    case 71: keyG();
    break;

    case 72: keyH();
    break;

    case 73: keyI();
    break;

    case 74: keyJ();
    break;

    case 75: keyK();
    break;

    case 76: keyL();
    break;

    case 77: keyM();
    break;

    case 78: keyN();
    break;

    case 79: keyO();
    break;

    case 80: keyP();
    break;

    case 81: keyQ();
    break;

    case 82: keyR();
    break;

    case 83: keyS();
    break;

    case 84: keyT();
    break;

    case 85: keyU();
    break;

    case 86: keyV();
    break;

    case 87: keyW();
    break;

    case 88: keyX();
    break;

    case 89: keyY();
    break;

    case 90: keyZ();
    break;

    case 96: key0();
    break;

    case 97: key1();
    break;

    case 98: key2();
    break;

    case 99: key3();
    break;

    case 100: key4();
    break;

    case 101: key5();
    break;

    case 102: key6();
    break;

    case 103: key7();
    break;

    case 104: key8();
    break;

    case 105: key9();
    break;

    // Gets the jim help element to toggle the none class
    default:
    document.getElementById('jim-help').classList.toggle('none');
  }
}
421233
function onDown(e) {

        // Prevent interaction offset calculations happening while
        // the user is dragging the map.
        //
        // Store this event so that we can compare it to the
        // up event
        _downLock = true;
        var _e = (e.type !== "MSPointerDown" && e.type !== "pointerdown" ? e : e.originalEvent); 
        _d = wax.u.eventoffset(_e);
        if (e.type === 'mousedown') {
            bean.add(document.body, 'click', onUp);
            // track mouse up to remove lockDown when the drags end
            bean.add(document.body, 'mouseup', dragEnd);

        // Only track single-touches. Double-touches will not affect this
        // control
        } else if (e.type === 'touchstart' && e.touches.length === 1) {
            //GMaps fix: Because it's triggering always mousedown and click, we've to remove it
            bean.remove(document.body, 'click', onUp); //GMaps fix

            //When we finish dragging, then the click will be 
            bean.add(document.body, 'click', onUp);
            bean.add(document.body, 'touchEnd', dragEnd);
        } else if (e.originalEvent.type === "MSPointerDown" && e.originalEvent.touches && e.originalEvent.touches.length === 1) {
          // Don't make the user click close if they hit another tooltip
            bean.fire(interaction, 'off');
            // Touch moves invalidate touches
            bean.add(parent(), mspointerEnds);
        } else if (e.type === "pointerdown" && e.originalEvent.touches && e.originalEvent.touches.length === 1) {
            // Don't make the user click close if they hit another tooltip
            bean.fire(interaction, 'off');
            // Touch moves invalidate touches
            bean.add(parent(), pointerEnds);
        } else {
            // Fix layer interaction in IE10/11 (CDBjs #139)
            // Reason: Internet Explorer is triggering pointerdown when you click on the marker, and other browsers don't.
            // Because of that, _downLock was active and it believed that you're dragging the map, instead of dragging the marker
            _downLock = false;
        }

    }
1052823
function (event) {
            var domEvent = aria.DomEvent;
            if (event.keyCode === domEvent.KC_ENTER) {
                this._updateValue(false);
            }
            this.$DropDownInput._dom_onkeypress.call(this, event);
        }
474634
function handleHeadingKeydown(e) {
    eventUtils.handleLeftRightArrowsKeydown(e, () => {
        e.preventDefault();
        let index = getElementIndex(getHeadingEl(e, this.state.fake));
        const maxIndex = this.headingsEl.children.length - 1;
        const keyCode = e.charCode || e.keyCode;
        if (keyCode === 37) index = index === 0 ? maxIndex : index - 1;
        if (keyCode === 39) index = index === maxIndex ? 0 : index + 1;

        this.headingsEl.children[index].focus();
        if (this.state.activation === 'auto') this.processStateChange(index);
    });
    eventUtils.handleActionKeydown(e, () => {
        e.preventDefault();
        this.handleHeadingClick(e);
    });
}
643114
function handleEvent(dom, handler, e) {
  var ptag = this.__.parent,
    item = this.__.item;

  if (!item)
    { while (ptag && !item) {
      item = ptag.__.item;
      ptag = ptag.__.parent;
    } }

  // override the event properties
  /* istanbul ignore next */
  if (isWritable(e, 'currentTarget')) { e.currentTarget = dom; }
  /* istanbul ignore next */
  if (isWritable(e, 'target')) { e.target = e.srcElement; }
  /* istanbul ignore next */
  if (isWritable(e, 'which')) { e.which = e.charCode || e.keyCode; }

  e.item = item;

  handler.call(this, e);

  // avoid auto updates
  if (!settings$1.autoUpdate) { return }

  if (!e.preventUpdate) {
    var p = getImmediateCustomParentTag(this);
    // fixes #2083
    if (p.isMounted) { p.update(); }
  }
}
156428
@UiHandler("m_okButton")
    protected void onClickOk(ClickEvent e) {

        final boolean undoMove = m_undoMoveCheckbox.getFormValue().booleanValue();
        m_popup.hide();
        CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

            @Override
            public void execute() {

                start(200, true);
                I_CmsVfsServiceAsync service = CmsCoreProvider.getVfsService();
                service.undoChanges(m_restoreInfo.getStructureId(), undoMove, this);
            }

            @Override
            protected void onResponse(Void result) {

                stop(false);
                if (m_afterRestoreAction != null) {
                    m_afterRestoreAction.run();
                }
            }

        };
        action.execute();

    }
958821
function (e) {
					elementStartX = parseInt(container.css('left'), 10) || 0;
					elementStartY = parseInt(container.css('top'), 10) || 0;
					pageStartX = e.pageX;
					pageStartY = e.pageY;
					// bind events to document to move window - we will unbind these on mouseup
					$(document).on('mousemove', documentMouseMove).on('mouseup', documentMouseUp);
					e.preventDefault(); // prevent attempted dragging of the column
				}
1166071
function(e) {
      var redirectedEvent = document.createEvent('MouseEvents');
      redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,
          e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,
          e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
      this.dialog_.dispatchEvent(redirectedEvent);
      e.stopPropagation();
    }
1117713
function( e, phase )
        {
            // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
            // http://stackoverflow.com/questions/1444477/keycode-and-charcode
            // http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion
            // http://unixpapa.com/js/key.html
            var key = e.which || e.keyCode,
                character = String.fromCharCode(key || e.charCode),
                shiftKey = e.shiftKey || false,
                altKey = e.altKey || false,
                ctrlKey = e.ctrlKey || false,
                metaKey = e.metaKey || false;
            if( phase == 1 )
            {
                // Callback
                if( onKeyDown && onKeyDown(key, character, shiftKey, altKey, ctrlKey, metaKey) === false )
                    cancelEvent( e ); // dismiss key
            }
            else if( phase == 2 )
            {
                // Callback
                if( onKeyPress && onKeyPress(key, character, shiftKey, altKey, ctrlKey, metaKey) === false )
                    cancelEvent( e ); // dismiss key
            }
            //else if( phase == 3 )
            //{
            //    // Callback
            //    if( onKeyUp && onKeyUp(key, character, shiftKey, altKey, ctrlKey, metaKey) === false )
            //        cancelEvent( e ); // dismiss key
            //}

            // Keys can change the selection
            if( popup_saved_selection )
                popup_saved_selection = saveSelection( node_contenteditable );
            if( phase == 2 || phase == 3 )
            {
                if( debounced_handleSelection )
                    debounced_handleSelection( null, null, false );
            }
            // Most keys can cause text-changes
            if( phase == 2 && debounced_syncTextarea )
            {
                switch( key )
                {
                    case 33: // pageUp
                    case 34: // pageDown
                    case 35: // end
                    case 36: // home
                    case 37: // left
                    case 38: // up
                    case 39: // right
                    case 40: // down
                        // cursors do not
                        break;
                    default:
                        // call change handler
                        debounced_syncTextarea();
                        break;
                }
            }
        }
1248523
function handleItemKeypress(e) {
    const itemIndex = NodeListUtils.findNodeWithFirstChar(this.itemEls, e.key);

    if (itemIndex !== -1) {
        this.rovingTabindex.index = itemIndex;
    }
}
560020
function(e, oSelf) {
    var elTarget = Ev.getTarget(e);
    var elTag = elTarget.nodeName.toLowerCase();

    if(!Dom.isAncestor(oSelf._elContainer, elTarget)) {
        oSelf.fireEvent("tableBlurEvent");

        // Fires editorBlurEvent when click is not within the TABLE.
        // For cases when click is within the TABLE, due to timing issues,
        // the editorBlurEvent needs to get fired by the lower-level DOM click
        // handlers below rather than by the TABLE click handler directly.
        if(oSelf._oCellEditor) {
            if(oSelf._oCellEditor.getContainerEl) {
                var elContainer = oSelf._oCellEditor.getContainerEl();
                // Only if the click was not within the CellEditor container
                if(!Dom.isAncestor(elContainer, elTarget) &&
                        (elContainer.id !== elTarget.id)) {
                    oSelf._oCellEditor.fireEvent("blurEvent", {editor: oSelf._oCellEditor});
                }
            }
            // Backward Compatibility
            else if(oSelf._oCellEditor.isActive) {
                // Only if the click was not within the Cell Editor container
                if(!Dom.isAncestor(oSelf._oCellEditor.container, elTarget) &&
                        (oSelf._oCellEditor.container.id !== elTarget.id)) {
                    oSelf.fireEvent("editorBlurEvent", {editor:oSelf._oCellEditor});
                }
            }
        }
    }
}