unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Tatsu Takamaro <tatsu.takamaro@gmail.com>
Cc: Robert Pluim <rpluim@gmail.com>,  Jean Louis <bugs@gnu.support>,
	help-gnu-emacs@gnu.org
Subject: Re: Remapping keys and creating my own keymap \\ too complicated\\
Date: Mon, 09 Dec 2024 00:07:12 +0100	[thread overview]
Message-ID: <87ttbdydsv.fsf@gmx.net> (raw)
In-Reply-To: <17dad089-c11c-9494-b740-e47039c1927a@gmail.com> (Tatsu Takamaro's message of "Sun, 8 Dec 2024 19:16:02 +0300")

On Sun, 8 Dec 2024 19:16:02 +0300 Tatsu Takamaro <tatsu.takamaro@gmail.com> wrote:

> I did as you said and just added some commands to an .emacs file. And
> everything worked untill I tried to change the C-x binding. Here is my exact
> code:
>
> (keymap-global-unset "C-x")
> (keymap-global-set "C-x" #'kill-region)
> (keymap-set global-map "<apps>" 'ctl-x-map)
>
> It seems logical, but it doesn't work properly. The Ctrl + x works just fine
> and cuts the selected fragment. Pressing Ctrl + x also doesn't have an effect
> as a C-x prefix (for example, keys C-x-s don't work to save). But then there
> is an unexpected behaviour. Pressing the Menu button (<apps>) doesn't act as
> C-x, and I can't use it to run commands that start with C-x. For example, I
> can't do save-buffer by pressing <apps>-s. Why is it so? What am I missing?

`ctl-x-map' is a variable whose value is a keymap, and you want to bind
that value, so don't quote the name:

(keymap-set global-map "<apps>" ctl-x-map)

Steve Berman



  reply	other threads:[~2024-12-08 23:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 16:59 Remapping keys and creating my own keymap \\ too complicated\\ Tatsu Takamaro
2024-12-04  7:43 ` Jean Louis
2024-12-04 15:49   ` Tatsu Takamaro
2024-12-04 15:55   ` Tatsu Takamaro
2024-12-04 16:06     ` Robert Pluim
2024-12-04 16:37       ` Tatsu Takamaro
2024-12-04 16:40         ` Robert Pluim
2024-12-04 17:05           ` Tatsu Takamaro
2024-12-05 10:25             ` Robert Pluim
2024-12-05 18:08               ` Tatsu Takamaro
2024-12-06  9:57                 ` Robert Pluim
2024-12-06 10:38                   ` Jean Louis
2024-12-06 13:18                     ` Robert Pluim
2024-12-08 16:16                       ` Tatsu Takamaro
2024-12-08 23:07                         ` Stephen Berman [this message]
2024-12-09 22:34                           ` Tatsu Takamaro
2024-12-04 16:25 ` Jean Louis
2024-12-04 16:57   ` Tatsu Takamaro

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=87ttbdydsv.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rpluim@gmail.com \
    --cc=tatsu.takamaro@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.
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).