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

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

Re: Remapping keys and creating my own keymap \\ too complicated\\


From: Stephen Berman
Subject: Re: Remapping keys and creating my own keymap \\ too complicated\\
Date: Mon, 09 Dec 2024 00:07:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

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 via email to

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