all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "T.V Raman" <raman@google.com>
Cc: emacs-devel@gnu.org
Subject: Re: Howto: Bind Windows key as a prefix?
Date: Tue, 05 Jul 2022 16:09:52 -0400	[thread overview]
Message-ID: <jwvh73viasc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <25284.32832.471566.596874@google.com> (T. V. Raman's message of "Tue, 5 Jul 2022 11:17:36 -0700")

> s-<c> is undefined for any <c>.
>
> M-x global-set-key RET
> windows+<c> RET
> command RET
> binds windows-<c>
> and asking where is <command> shows it as being on s-<c>.
>
> However calling global-set-key with "s-<c>" bombs with key-sequence
> "s-<c>" starts with  non-prefix s"

`s-<c>` is the syntax generated by `key-description` and understood by
`kbd` (and the new set of functions like` key-valid-p` and
`define-keymap`) but it is not understood by `define-key`,
`global-set-key`, and friends, for which you need to use the lower-level
vector syntax:

    (global-set-key [?\s-c] 'my-command)
    (global-set-key [s-tab] 'my-other-command)
    ...


-- Stefan




  parent reply	other threads:[~2022-07-05 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 18:17 Howto: Bind Windows key as a prefix? T.V Raman
2022-07-05 18:35 ` T.V Raman
2022-07-05 18:37 ` Akib Azmain Turja
2022-07-05 18:40   ` Akib Azmain Turja
2022-07-05 20:09 ` Stefan Monnier [this message]
2022-07-06  0:05   ` T.V Raman

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=jwvh73viasc.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.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 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.