unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: Yoichi Nakayama <yoichi.nakayama@gmail.com>, 74619@debbugs.gnu.org
Subject: bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw
Date: Mon, 02 Dec 2024 15:49:18 +0100	[thread overview]
Message-ID: <m2ed2q2l8x.fsf@gmail.com> (raw)
In-Reply-To: <87bjxufa7d.fsf@gmail.com> (Robert Pluim's message of "Mon, 02 Dec 2024 15:09:26 +0100")

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Sat, 30 Nov 2024 16:40:53 +0900, Yoichi Nakayama <yoichi.nakayama@gmail.com> said:
>
>     Yoichi> I found that bug#55940 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55940)
>     Yoichi> has not been fixed on Emacs started by "emacs -nw"
>
>     Yoichi> (substitute-command-keys "\\[customize]")
>     Yoichi> #("<ns-show-prefs>" 0 15 (font-lock-face help-key-binding face
>     Yoichi> help-key-binding))
>
>     Yoichi> I think this is because make-non-key-event for ns-* is not called
>     Yoichi> in this situation.
>
> Right, but OTOH typical terminal setups donʼt allow you to use super
> as a modifier anyway (unless Gerd has a magic recipe). I guess it
> couldnʼt do too much harm to call the ns-specific portion of
> `x-setup-function-keys' even when not in a graphical frame, but Iʼm
> not sure where we could hook that into.
>
> Robert

I think I have even 2 magic recipes :-).

1. Use a terminal like iTerm that supports the Kitty Keyboard Protocol,
and use kkp.el in Emacs. Example from my Emacs C-h k Command-M g ives

  s-m runs the command magit-file-dispatch (found in global-map), which
  is an autoloaded interactive native-comp-function in ‘magit-files.el’.

That requires some fiddling with iTerm key settings so that iTerm itself
doesn't use the Command keys one wants to define.

  https://sw.kovidgoyal.net/kitty/keyboard-protocol/
  https://github.com/benjaminor/kkp


2. Use something like Devil

  https://github.com/susam/devil/blob/main/devil.el

In short, that can map input like `. x' to `s-x'. I think there is at
least one other similar package named God, but I haven't tried that.





      reply	other threads:[~2024-12-02 14:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-30  7:40 bug#74619: macOS: <ns-show-prefs> displayed as keybinding for \\[customize] on emacs -nw Yoichi Nakayama
2024-12-02 14:09 ` Robert Pluim
2024-12-02 14:49   ` Gerd Möllmann [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m2ed2q2l8x.fsf@gmail.com \
    --to=gerd.moellmann@gmail.com \
    --cc=74619@debbugs.gnu.org \
    --cc=rpluim@gmail.com \
    --cc=yoichi.nakayama@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).