help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to global-set-key combine "f1-<down-mouse-2>" and "f1-<mouse-2>"?


From: Van Ly
Subject: How to global-set-key combine "f1-<down-mouse-2>" and "f1-<mouse-2>"?
Date: Mon, 7 Aug 2023 08:34:15 GMT

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]