Function: hkey-operate

hkey-operate is an interactive and byte-compiled function defined in hmouse-drv.el.

Signature

(hkey-operate &optional ARG)

Documentation

Use the keyboard to emulate Smart Mouse Key drag actions.

Each invocation alternates between starting a drag and ending it. Optional prefix ARG non-nil means emulate Assist Key rather than the Action Key.

Only works when running under a window system, not from a dumb terminal.

If a non-Hyperbole minor mode, e.g. ivy, has a different binding for the key to which this command is bound, then defer to that binding.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-drv.el
(defun hkey-operate (&optional arg)
  "Use the keyboard to emulate Smart Mouse Key drag actions.
Each invocation alternates between starting a drag and ending it.
Optional prefix ARG non-nil means emulate Assist Key rather than the
Action Key.

Only works when running under a window system, not from a dumb terminal.

If a non-Hyperbole minor mode, e.g. ivy, has a different binding for the
key to which this command is bound, then defer to that binding."
  (interactive "P")
  (catch 'other-binding
    ;; If a non-Hyperbole minor mode has a different binding for the
    ;; key to which this command is bound, then defer to that binding
    (let* ((hyperbole-mode)
	   (key (car (where-is-internal #'hkey-operate (list hyperbole-mode-map))))
	   (binding (when key (cdar (minor-mode-key-binding key)))))
      (when binding
	(throw 'other-binding (call-interactively binding))))

    (unless (hyperb:window-system)
      (hypb:error "(hkey-operate): Drag actions require mouse support"))

    ;; Otherwise, handle the drag command
    (if arg
	(if assist-key-depressed-flag
	    (progn (assist-mouse-key)
		   (when (called-interactively-p 'interactive)
		     (message "Assist Key released.")))
	  (assist-key-depress)
	  (when (called-interactively-p 'interactive)
	    (message
	     "Assist Key depressed; go to release point and press {%s %s}."
	     (substitute-command-keys "\\[universal-argument]")
	     (substitute-command-keys "\\[hkey-operate]"))))
      (if action-key-depressed-flag
	  (progn (action-mouse-key)
		 (when (called-interactively-p 'interactive)
		   (message "Action Key released.")))
	(action-key-depress)
	(when (called-interactively-p 'interactive)
	  (message "Action Key depressed; go to release point and press {%s}."
		   (substitute-command-keys "\\[hkey-operate]")))))))