all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to global-set-key combine "f1-<down-mouse-2>" and "f1-<mouse-2>"?
@ 2023-08-07  8:34 Van Ly via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; only message in thread
From: Van Ly via Users list for the GNU Emacs text editor @ 2023-08-07  8:34 UTC (permalink / raw)
  To: help-gnu-emacs


I have the following configuration that works in view-mode

 1 (defun hnxb/quail-show-key-define-char ()
 2   "Show input sequence and character definition in message buffer."
 3   (interactive)
 4   (progn (hnxb/quail-show-key) (hnx/define-char)))
 5
 6 (add-hook 'view-mode-hook
 7   (lambda ()
 8     (define-key view-mode-map (kbd "S-<down-mouse-2>") 'mouse-set-point)
 9     (define-key view-mode-map (kbd "S-<mouse-2>") 'hnxb/quail-show-key-define-char)))

I would like to have something like the following outside of view-mode

 (global-set-key (kbd "f1-<down-mouse-2> f1-<mouse-2>") 'hnxb/mouse-move-quail-show-key-define-char)

that implicitly repositions the cursor to where the mouse points as
done by line 8 to be followed by line 9 in the above block quote.

What happens is "f1-<down-mouse-2>" repositions the cursor but
"<mouse-2>" button event is yanking from the clipboard where
"f1-<mouse-2>" is intended.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-07  8:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07  8:34 How to global-set-key combine "f1-<down-mouse-2>" and "f1-<mouse-2>"? Van Ly via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.