Ticket #2384 (closed defect: fixed)

Opened 14 years ago

Last modified 12 years ago

MC doesn't rebind F1-F10 keys

Reported by: Dmitry Owned by: andrew_b
Priority: major Milestone: 4.8.3
Component: mc-core Version: 4.7.4
Keywords: Cc: zaytsev
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master committed-stable

Description (last modified by slavazanko) (diff)

Hi. I want to rebind F1-F10 keys. I want to make keybinding like in vim. d - will be delete, e - edit, and so on. I change keys in mc.keys but it doesn't work - when I press 'd' or 'e' - it make nothing, and F4, F5 doesn't work too. Can you fix it?

Change History

comment:1 Changed 14 years ago by zaytsev

  • Cc zaytsev added

I don't think you can bind to "h", since it will be printed in subshell. I am not sure, whether there is a solution for this.

comment:2 Changed 14 years ago by Dmitry

What do you mean when you say "h"? I already rebinded some keys like 'j','k','g'. But if I try to rebind functional keys, like F1-F10 it's not working. I'm saying only about functional keys.

comment:3 follow-up: ↓ 6 Changed 14 years ago by andrew_b

MC doesn't have command and normal modes. If you wand use 'd' to delete files, how are you going to enter 'd' letter into command line? The same question about e, v, c letters.

comment:4 Changed 14 years ago by zaytsev

Show your keymap. I don't understand how you could have successfully re-binded j,k,g.

comment:5 Changed 14 years ago by Dmitry

[panel]
PanelMarkFile? = space; insert; ctrl-t
PanelMoveDown? = j; down; ctrl-n
PanelMoveUp? = k; up; ctrl-p
PanelMoveLeft? = h; left
PanelMoveRight? = l; right
PanelPrevPage? = pgup; alt-v
PanelNextPage? = pgdn; ctrl-v
PanelDoEnter? = enter
PanelChdirOtherPanel? = alt-o
PanelChdirToReadlink? = alt-l
PanelViewSimple? = F13
PanelEditNew? = F14
PanelCopyLocal? = F15
PanelRenameLocal? = F16
PanelDeleteLocal? = F18
PanelReverseSelection? = alt-asterisk
PanelSelect? = m; alt-plus
PanelUnselect? = shift-m; alt-minus
PanelCtrlNextPage? = ctrl-pgdn
PanelCtrlPrevPage? = ctrl-pgup
PanelDirectoryHistoryList? = alt-shift-h
PanelDirectoryHistoryNext? = alt-u
PanelDirectoryHistoryPrev? = alt-y
PanelGotoBottomFile? = alt-j
PanelGotoMiddleFile? = alt-r
PanelSyncOtherPanel? = alt-i
PanelGotoTopFile? = alt-g
PanelSetPanelEncoding? = alt-e
PanelMoveHome? = g; alt-lt; home
PanelMoveEnd? = G; alt-gt; end
PanelSelectSortOrder? = s
PanelToggleSortOrderPrev?=
PanelToggleSortOrderNext?=
PanelReverseSort?=
PanelSortOrderByName?=
PanelSortOrderByExt?=
PanelSortOrderBySize?=
PanelSortOrderByMTime=

This is part of .mc/mc.keymap.
j,k,g,G work successfully.

And this part not work.
[main]
CmdHelp? = f1
CmdUserMenu? = f2; m
CmdView? = f3
CmdViewFile? = f13
CmdEdit? = f4; e
CmdCopy? = f5; c
CmdRename? = f6
CmdMkdir? = f7
CmdDelete? = f8
CmdMenu? = f9
CmdQuit? = f10
CmdMenuLastSelected? = f19
CmdQuietQuit? = f20
CmdFind? = alt-question
CmdQuickCd? = alt-c
CmdQuickChdir? = ctrl-backslash
CmdReread? = ctrl-r
CmdSingleDirsize? = ctrl-space
CmdSuspend? = ctrl-z
CmdSwapPanel? = ctrl-u
CmdHistory? = alt-h
CmdToggleListing? = alt-t
CmdToggleShowHidden? = alt-dot
ShowCommandLine? = ctrl-o
CmdCopyCurrentPathname? = alt-a
CmdCopyOtherPathname? = alt-shift-a
CmdFilteredView? = alt-exclamation
CmdSelect? = kpplus
CmdUnselect? = kpminus
CmdReverseSelection? = kpasterisk
ExtMap1 = ctrl-x

comment:6 in reply to: ↑ 3 Changed 14 years ago by Dmitry

Replying to andrew_b:

MC doesn't have command and normal modes. If you wand use 'd' to delete files, how are you going to enter 'd' letter into command line? The same question about e, v, c letters.

I don't need command line in MC, I'm using ^Z, and then typing in bash =).
Do you plan to do modes in MC like modes in vim? No?

Last edited 12 years ago by andrew_b (previous) (diff)

comment:7 Changed 14 years ago by angel_il

  • Milestone changed from 4.7 to Future Releases

comment:8 Changed 13 years ago by angel_il

  • Owner set to angel_il
  • Status changed from new to accepted
  • Branch state set to no branch

comment:9 Changed 12 years ago by andrew_b

  • Owner changed from angel_il to andrew_b

comment:10 Changed 12 years ago by andrew_b

  • Keywords stable-candidate added; key, keybinding removed
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.3

Branch: 2384_rebind_fx_keys (parent: master).
changeset:71be15df60d2357b720738e672d134591d5efbc0

comment:11 Changed 12 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:12 Changed 12 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • Branch state changed from on review to approved

comment:13 Changed 12 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko angel_il to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:14 Changed 12 years ago by slavazanko

  • Status changed from testing to closed
  • Keywords stable-candidate removed
  • Votes for changeset changed from committed-master to committed-master committed-stable
  • Description modified (diff)

Cherry-picked to stable:

git log --pretty=oneline b7eb59e...ae61b72
Note: See TracTickets for help on using tickets.