Listens for any kind of cursor activity on CodeMirror.
- For tracking cursor activity in insert mode.
- Should only be active in insert mode.
8863
function onCursorActivity() {
      var macroModeState = vimGlobalState.macroModeState;
      var lastChange = macroModeState.lastInsertModeChanges;
      if (lastChange.expectCursorActivityForChange) {
        lastChange.expectCursorActivityForChange = false;
      } else {
        // Cursor moved outside the context of an edit. Reset the change.
        lastChange.changes = [];
      }
    }
1221514
def eventFilter(self, watchedObject, event):
        
        if event.type() == QtCore.QEvent.KeyPress:
            key = event.key()
            if key in (Qt.Key_Tab, Qt.Key_Backtab):
                self.commitAndClose()
                return True
            else:
                return False

        return super(AbstractCtiEditor, self).eventFilter(watchedObject, event)
804941
def on_mouse_motion(self, widget, event):
        
        path = self.view.get_path_at_pos(int(event.x), int(event.y))
        if path is not None:
            self.view.select_path(path)
        else:
            self.view.unselect_all()
43829
def on_cursor_shape_changed(self, combo):
        
        index = combo.get_active()
        self.settings.style.set_int('cursor-shape', index)
1283639
private void checkBeginSelection(Cursor cursor, SelectorModel model)
    {
        final boolean canClick = !model.getClickableArea().contains(cursor.getScreenX(), cursor.getScreenY());
        if (!model.isSelecting() && !canClick)
        {
            model.setSelecting(true);
            startX = cursor.getX();
            startY = cursor.getY();

            for (final SelectorListener listener : listeners)
            {
                listener.notifySelectionStarted(Geom.createArea(startX, startY, 0, 0));
            }
        }
    }
873591
def prev_cursor_location(self):
        
        self._verify_entrypoint_selected()
        self.current_trace_frame_index = max(self.current_trace_frame_index - 1, 0)
        self.trace()
214840
function watchFocus() {
  var _blurred = false;
  window.addEventListener('focus', function() {
    if (_blurred) {
      _blurred = false;
      // startAnimating();
      // controls.freeze = false;
    }
  });
  window.addEventListener('blur', function() {
    // stopAnimating();
    _blurred = true;
    controls.freeze = true;
  });
}
488223
def show_wait_cursor(object):
    

    @functools.wraps(object)
    def show_wait_cursorWrapper(*args, **kwargs):
        """
        Shows a wait cursor while processing.

        :param \*args: Arguments.
        :type \*args: \*
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        :return: Object.
        :rtype: object
        """

        QApplication.setOverrideCursor(Qt.WaitCursor)
        value = None
        try:
            value = object(*args, **kwargs)
        finally:
            QApplication.restoreOverrideCursor()
            return value

    return show_wait_cursorWrapper
198383
function () {
            // this._cfg can be null due to the following execution chain: native focus -> native blur -> AutoComplete
            // bound value update in the data model -> bindRefreshTo section refresh
            if (this._firstFocus && this._cfg && this._cfg.autoselect) {
                // this allow to click again and put the cursor at a given position
                this._firstFocus = false;
                var field = this.getTextInputField();
                var start = 0;
                var end = (field.value.length) ? field.value.length : 0;
                if (end) {
                    this.setCaretPosition(start, end);
                }
            }
        }
378703
def OnMouseMotion(self, event):
        """"""

        grid = self.grid

        pos_x, pos_y = grid.CalcUnscrolledPosition(event.GetPosition())

        row = grid.YToRow(pos_y)
        col = grid.XToCol(pos_x)
        tab = grid.current_table

        key = row, col, tab

        merge_area = self.grid.code_array.cell_attributes[key]["merge_area"]
        if merge_area is not None:
            top, left, bottom, right = merge_area
            row, col = top, left

        grid.actions.on_mouse_over((row, col, tab))

        event.Skip()
130704
@UiHandler("m_fadePanel")
    void onFadeClick(ClickEvent event) {

        m_textbox.setFocus(true);
        m_textbox.setCursorPos(m_textbox.getText().length());
    }
901228
def _on_click(self, event):
        """"""
        x = event.x
        self.coords('cursor', x, 0, x, self.winfo_height())
        self._variable.set(round2((360. * x) / self.winfo_width()))
879820
def set_cursor_enter_callback(window, cbfun):
    
    window_addr = ctypes.cast(ctypes.pointer(window),
                              ctypes.POINTER(ctypes.c_long)).contents.value
    if window_addr in _cursor_enter_callback_repository:
        previous_callback = _cursor_enter_callback_repository[window_addr]
    else:
        previous_callback = None
    if cbfun is None:
        cbfun = 0
    c_cbfun = _GLFWcursorenterfun(cbfun)
    _cursor_enter_callback_repository[window_addr] = (cbfun, c_cbfun)
    cbfun = c_cbfun
    _glfw.glfwSetCursorEnterCallback(window, cbfun)
    if previous_callback is not None and previous_callback[0] != 0:
        return previous_callback[0]
524650
def on_mouse_click(self, widget, event):
        
        import rafcon.gui.helpers.state_machine as gui_helper_state_machine
        if self.view.get_path_at_pos(int(event.x), int(event.y)) is not None \
                and len(self.view.get_selected_items()) > 0:
            return gui_helper_state_machine.insert_state_into_selected_state(self._get_state(), False)
894844
function(self, callback) {
  if (self.cursorState.dead && self.cursorState.killed) {
    handleCallback(callback, new MongoError('cursor is dead'));
    return true;
  }

  return false;
}
846020
function cursorInit() {
	scrolled = bw.ns4 || bw.ns5 ? "window.pageYOffset" : "document.body.scrollTop"
	if (bw.ns4) document.captureEvents(Event.MOUSEMOVE)
}
1351074
function() {  
      Event.addListener(this.formattedContainer, "click", this.openEditor, this, true);
            
      // For color animation (if specified)
      if (this.options.animColors) {
         Event.addListener(this.formattedContainer, 'mouseover', this.onVisuMouseOver, this, true);
         Event.addListener(this.formattedContainer, 'mouseout', this.onVisuMouseOut, this, true);
      }
      
      if(this.editorField.el) {
         // Register some listeners
         Event.addListener(this.editorField.el, "keyup", this.onKeyUp, this, true);
         Event.addListener(this.editorField.el, "keydown", this.onKeyDown, this, true);
      }
   }