emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggested experimental test


From: Dmitry Gutov
Subject: Re: Suggested experimental test
Date: Thu, 25 Mar 2021 15:20:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 25.03.2021 08:12, Yuri Khan wrote:
On Thu, 25 Mar 2021 at 06:41, Dmitry Gutov <dgutov@yandex.ru> wrote:

we should have a bulletproof way to move things off
C-x and C-c.

I think there are basically two directions:

- Find two other C-<char> prefix key combinations to move the main
prefix keymaps to. C-d and C-e come to mind (basically all other keys
that are situated closer to Ctrl or Caps on a qwerty keyboard are all
taken up by popular bindings such as C-a "select all" or C-s "save file").

What, being close to (left) Ctrl on a QWERTY is/was a consideration
when choosing C-x and C-c? This makes sense, as much as it does for
Undo/Cut/Copy/Paste.

It surely needs to be comfortable to press with one hand.

- Go all the way to VS Code/Atom/Notepad/etc approach and depopulate
these prefix maps. And then use two modifiers at a time for the
important commands/prefix maps which we still need to have bindings. For
example, that would move 'C-x v' to 'C-M-g' and 'C-x C-i' to 'C-M-o', or
similar.

In my personal bindings, I do prefer C-M-, C-S- and M-S- combinations
to sequences. (Also function keys and their C- and S- combinations.)

Not my preference, but that seems to reflect the bindings I see "out there". So you could be a good person to gauge to alternative bindings theme.

But, while I can (mostly) rebind something to ctl-x-map, in order to
move things off C-c, I’d have to basically copy every mode’s map into
my configuration and replace C-c with <menu>. Alternatively, I could
use some key translation mechanism to pretend <menu> produces C-c and
C-c produces <XF86Copy> or some such, but I’m not sure if that would
also affect sequences where C-c is not the first key (and I’d probably
like it not to).

Yeah, C-x seems easier, because at least built-in code uses ctl-x-map (which you can move wholesale) and 3rd party packages can be asked to.

But C-c doesn't have a dedicated keymap, so solving this seems like the first step. What could we do?

  (kbd (format "%s C-l" ctl-c-key-sequence) 'some-command)

?

Or maybe create a bogus ctrl-c keymap and then make sure to refer to its binding with something like

  (kbd "[C-c] C-l" 'some-command)

...I'm not sure, ideas welcome. Something backward-compatible would be ideal.



reply via email to

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