all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Van Ly via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: How to global-set-key combine "f1-<down-mouse-2>" and "f1-<mouse-2>"?
Date: Mon, 7 Aug 2023 08:34:15 GMT	[thread overview]
Message-ID: <202308070834.3778YFcA006972@sdf.org> (raw)


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	other threads:[~2023-08-07  8:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202308070834.3778YFcA006972@sdf.org \
    --to=help-gnu-emacs@gnu.org \
    --cc=van.ly@sdf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.