Ticket #3755 (accepted enhancement)

Opened 6 weeks ago

Last modified 6 weeks ago

Fix emacs keymap

Reported by: Bad_ptr Owned by: zaytsev
Priority: trivial Milestone: 4.8.19
Component: mc-key-bindings Version: master
Keywords: keymap Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

It will be more consistent with emacs if the ctrl-w was mapped to cut(currently it is mapped to remove for mc dialogs).

Change History

comment:1 follow-up: ↓ 5 Changed 6 weeks ago by Bad_ptr

comment:2 follow-up: ↓ 4 Changed 6 weeks ago by zaytsev

I agree that Ctrl+W should be Cut rather than Remove in the Emacs keymap, but as far as I know Ctrl-D is "delete one character from the right", so shouldn't it rather be mapped to Delete as in the main keymap, if at all? Also, I think that Ctrl-H should be added to Backspace while we are at it.

comment:3 Changed 6 weeks ago by zaytsev

  • Owner set to zaytsev
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.19

comment:4 in reply to: ↑ 2 Changed 6 weeks ago by Bad_ptr

Replying to zaytsev:

as far as I know Ctrl-D is "delete one character from the right"

Yes, you are right. I mapped it to ctrl-d because I just don't understand how keymaps works in mc.
At first I tried to comment out the Remove = ctrl-w entry and add a Cut = ctrl-w, but it didn't help(why?), then I remapped Remove to ctrl-d and it worked. Now I realized that I can unmap Remove using Remove=.
The same thing in the [editor] section with Paste = ctrl-y and DeleteLine = ctrl-y.

shouldn't it rather be mapped to Delete

It seems like Delete is already doing deletion, however looking at the C code there is a difference between Remove and Delete, but I do not understand what is that difference.)

Also, I think that Ctrl-H should be added to Backspace while we are at it.

In emacs the C-h is for help, but I'm not against it as it will be consistent with the readline. (and looks like C-h is already doing backspace)

Last edited 6 weeks ago by Bad_ptr (previous) (diff)
Note: See TracTickets for help on using tickets.