Ticket #212 (closed defect: fixed)

Opened 15 years ago

Last modified 4 years ago

User defined Hotkeys like a VIM

Reported by: angel_il Owned by: andrew_b
Priority: major Milestone: 4.8.23
Component: mc-core Version: 4.7.3
Keywords: hotkeys shortcuts Cc: egmont, xaoxx@…
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description (last modified by angel_il) (diff)

I've started with rework hotkeys engine.
Target: do this like in a VIM :), with user define hotkeys.

Attachments

first_step_to_user_hotkeys.diff (8.1 KB) - added by angel_il 15 years ago.
0001-add-user-defined-hotkeys-support-in-panel-too.patch (4.3 KB) - added by angel_il 15 years ago.
0001-Added-keycode-checking-in-quicksearch-mode.patch (2.3 KB) - added by ierton 15 years ago.
allows user to type binded chars in quicksearch mode

Change History

comment:1 Changed 15 years ago by angel_il

  • Owner set to angel_il
  • Status changed from new to assigned

Changed 15 years ago by angel_il

comment:2 Changed 15 years ago by winnie

  • Blocking 195 added

(In #195) Please have a look on #212. This is about configurable shortcuts in general.

comment:3 Changed 15 years ago by iNode

  • Blocking 21 added

(In #21) Double for #195. Also blocked by #212.

comment:4 Changed 15 years ago by iNode

  • Blocking 21 removed

(In #21) I checked it in my environment.

All work in mc builded with ncursesw, so it's slang bug.

Please, write bugreport to slang developers or your distro maintainers.

comment:5 Changed 15 years ago by angel_il

  • Version changed from 4.6.1 to master
  • severity set to no branch
  • Milestone changed from 4.7 to 4.7.0-pre2

comment:6 follow-up: ↓ 8 Changed 15 years ago by angel_il

branch: 212_redefine_hotkeys

for test only

for redefine hotkeys
put in

/usr/share/mc/mc.keymap

[editor]
XStore = ctrl g
XPaste = ctrl v
XCut = ctrl x
Delete-Line = ctrl y

[main]
FindCmd = alt f7
ViewOtherCmd = ctrl o

[panel]
PanelStartSearch = ctrl s
PanelMoveDown = down
PanelMoveUp = up
PanelMoveLeft = left
PanelMoveRight = right
PanelPrevPage = pgup
PanelNextPage = pgdn
PanelDoEnter = enter

comment:7 follow-up: ↓ 9 Changed 15 years ago by angel_il

  • severity changed from no branch to on review

changeset: a4adb6a08adef20c2734ea64c0e35783576e20a7

Wow it worked!!! :)
Welcome review :)

comment:8 in reply to: ↑ 6 ; follow-up: ↓ 10 Changed 15 years ago by iNode

Replying to angel_il:

branch: 212_redefine_hotkeys

for test only

for redefine hotkeys
put in

/usr/share/mc/mc.keymap

path should be etc/mc/mc.keymap

comment:9 in reply to: ↑ 7 Changed 15 years ago by iNode

  • severity changed from on review to on rework

Replying to angel_il:

changeset: a4adb6a08adef20c2734ea64c0e35783576e20a7

Wow it worked!!! :)
Welcome review :)

Yes. Good work, it's work for me too!

But most of users/testers want working keybindings.

I think we should not break current keybindings and
default mc.keymap (at least as example, if without
mc.keymap we has default bindings, but it seems not)
should be also added in context of this ticket.

comment:10 in reply to: ↑ 8 Changed 15 years ago by iNode

Replying to iNode:

path should be etc/mc/mc.keymap

ok, mc search it in the order ~/.mc, /etc/mc/, $PREFIX/share/mc,
and I has some mc.keymap. So, angel_il, you are right.

comment:11 Changed 15 years ago by angel_il

  • Milestone changed from 4.7.0-pre2 to 4.7.0-pre3

comment:12 Changed 15 years ago by slavazanko

  • Blocking 244 added

comment:13 Changed 15 years ago by slavazanko

  • Blocking 195 removed

Changed 15 years ago by ierton

allows user to type binded chars in quicksearch mode

comment:14 Changed 15 years ago by ierton

Hi! i am searching for a way to add vim-bindings to mc. i've made some testing of your branch with profile like this:

[panel]
PanelStartSearch=/
PanelMoveDown=j
PanelMoveUp=k
PanelMoveLeft=h
PanelMoveRight=l

and here is the problem:
in qick-search mode (when i type '/') it is impossible to type binded letters (in my case - 'j' 'k' 'h' 'l'). I've attached patch to solve the problem. Check it please! Thank you.

comment:15 Changed 15 years ago by angel_il

  • severity changed from on rework to on review

comment:16 Changed 15 years ago by iNode

Please don't forget to provide link to branch on review.

comment:17 Changed 15 years ago by slavazanko

  • Blocking 1390 added

(In #1390) Just await for complete of #212

I hope, this help to you.

comment:18 Changed 14 years ago by slavazanko

  • Blocking 397 added

(In #397) > It's a semi-solution. In addition to mouse, the shortcut should be provided.

In this case this branch wil continue to develop after megre #212 into master.

comment:19 Changed 14 years ago by angel_il

  • Description modified (diff)
  • Summary changed from User defined Hotkeys like a FAR to User defined Hotkeys like a VIM

comment:20 Changed 14 years ago by slavazanko

  • severity changed from on review to on rework

in 212_redefine_hotkeys branch I added some commits for restore default hotkeys:

Newly added hotkeys don't work. :(

comment:21 Changed 14 years ago by angel_il

  • severity changed from on rework to on review

comment:22 Changed 14 years ago by slavazanko

  • Votes for changeset set to slavazanko

Looks good.

comment:23 Changed 14 years ago by angel_il

comment:24 Changed 14 years ago by andrew_b

  • Keywords shortcuts added
  • Votes for changeset changed from slavazanko to slavazanko andrew_b
  • severity changed from on review to approved

comment:25 Changed 14 years ago by angel_il

  • Status changed from assigned to testing
  • Votes for changeset changed from slavazanko andrew_b to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:26 Changed 14 years ago by angel_il

  • Status changed from testing to closed

comment:27 Changed 14 years ago by slavazanko

  • Blocking 1390 removed

(In #1390) angel_il: Need to give mire info :)

To ticketstarter: now feel to free change ${prefix}/etc/mc/mc.keymap file.
For example, like this:

[panel]
...
PanelSetPanelEncoding = ctrl-u

instread of

PanelSetPanelEncoding = ctrl-t

Enjoy. :)

comment:28 Changed 14 years ago by slavazanko

  • Blocking 397 removed

(In #397) See changeset:45c0931f997eeddb327a7defe9a8ffa48ae2c59e

Added function and key binding for toggle sort types.

For review, you may change mc.keymap:

[panel]
...
-PanelToggleSortOrder =
+PanelToggleSortOrder = <some-hotkey>

Review, please.

comment:29 Changed 14 years ago by slavazanko

  • Status changed from closed to reopened
  • Votes for changeset commited-master deleted
  • Resolution fixed deleted
  • severity changed from merged to no branch
  • Blocking 244 removed

Need to restore editor key bindings.

comment:30 Changed 14 years ago by slavazanko

  • Status changed from reopened to assigned

comment:31 Changed 14 years ago by angel_il

branch: 212_fix (patent: master)
chengeset: 7910f97f3c4939c58a190b0958f78bf3dccf87ad

comment:32 Changed 14 years ago by angel_il

  • severity changed from no branch to on review

comment:33 Changed 14 years ago by angel_il

Please review. ("compleate" fixed)

comment:34 Changed 14 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:35 Changed 14 years ago by iNode

  • Votes for changeset changed from slavazanko to slavazanko INode
  • severity changed from on review to approved

comment:36 Changed 14 years ago by iNode

  • Votes for changeset changed from slavazanko INode to slavazanko iNode

comment:37 Changed 14 years ago by angel_il

  • Status changed from assigned to testing
  • Votes for changeset changed from slavazanko iNode to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:38 Changed 14 years ago by angel_il

  • Status changed from testing to closed

comment:39 Changed 14 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset commited-master deleted
  • severity changed from merged to no branch
  • Resolution fixed deleted
  • Priority changed from minor to major
  • Version changed from master to 4.7.0-pre4
  • Milestone changed from 4.7.0-pre3 to 4.7
  • Type changed from enhancement to defect

The button bar uses callbacks for button actions. Therefore F1..F10 keys cannot be overbinded in keymap file. WButtonBar widget must be reimplemented to use keybinding engine.

Created branch 212_buttonbar_commands. Parent branch: master.
inital changeset:07f4bc4a15957a7fbd72c8a80d37cb82a953adda

comment:40 Changed 14 years ago by andrew_b

  • Owner changed from angel_il to andrew_b
  • Status changed from reopened to accepted

comment:41 Changed 14 years ago by andrew_b

  • Blocking 1802 added

(In #1802) Already fixed in 212_buttonbar_commands branch.

comment:42 Changed 14 years ago by andrew_b

  • severity changed from no branch to on review
  • Milestone changed from 4.7 to 4.7.0

Rebased to current master.
Initial changeset:484b796fa3445e129cb3e7ed034f8d5a786209c7
Please review.

comment:43 Changed 14 years ago by angel_il

  • Votes for changeset set to angel_il

comment:44 Changed 14 years ago by andrew_b

  • Blocking 1764 added

(In #1764) Replying to gotar:

And I've found similar things in editor:
File/New? C-x k instead C-n
Edit/Beginning? M-< instead C-PgUp?
Edit/End? M-> instead C-PgDn?
Search/Search? again S-F6 instead S-F7

Fixed in 212_buttonbar_commands branch.

comment:45 Changed 14 years ago by slavazanko

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

comment:46 Changed 14 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from angel_il slavazanko to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged
  • Blocking 1764, 1802 removed

Merged to master.

git log --pretty=oneline 9531266..6f3b00c

comment:47 Changed 14 years ago by andrew_b

  • Status changed from testing to closed

comment:48 Changed 14 years ago by angel_il

need remove hardcoded keys from:

  • achown.c
  • dialog.c
  • menu.c
  • hotlist.c
  • main.c
  • widget.c
  • something else...

comment:49 Changed 14 years ago by angel_il

  • severity changed from merged to on review

branch: 212_dialog_hardcoded_hotkeys
changeset: 9b5c360b8355d30e6d8eb3d5bca05edf0be37d37

comment:50 Changed 14 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset changed from committed-master to andrew_b
  • Version changed from 4.7.0-pre4 to 4.7.1
  • Resolution fixed deleted
  • Milestone changed from 4.7.0 to 4.7.2

comment:51 Changed 14 years ago by angel_il

212_dialog_hardcoded_hotkeys (forced update)
changeset: ef53bb570746137dd6eea15913483e6dc86fada4

comment:52 Changed 14 years ago by angel_il

212_dialog_hardcoded_hotkeys (forced update)
changeset: e9f30aebaee9b35ebc0e4aa8f71e980031c11351

comment:53 Changed 14 years ago by slavazanko

  • Votes for changeset changed from andrew_b to andrew_b slavazanko
  • severity changed from on review to approved

comment:54 Changed 14 years ago by angel_il

  • Status changed from reopened to closed
  • Votes for changeset changed from andrew_b slavazanko to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:55 Changed 14 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset committed-master deleted
  • severity changed from merged to no branch
  • Version changed from 4.7.1 to 4.7.3
  • Milestone changed from 4.7.2 to 4.7
  • Resolution fixed deleted

Created 212_listbox_hotkeys branch for implementation of WListbox keybindings.

comment:56 Changed 14 years ago by andrew_b

  • severity changed from no branch to on review

Initial changeset:7a9920c5c1ed743acf67ba91279b9066bde40621

Please review and vote.

comment:57 Changed 14 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:58 Changed 14 years ago by angel_il

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

comment:59 Changed 14 years ago by andrew_b

  • Status changed from reopened to closed
  • Votes for changeset changed from slavazanko angel_il to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:60 Changed 14 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset committed-master deleted
  • Resolution fixed deleted
  • severity changed from merged to on review
  • Milestone changed from 4.7 to 4.7.4

Some hardcoded keys are still used in viewer and in interactive help engine. The 212_viewer_help_hardcoded_keys branch replaces hardcoded keys in these units with keybindings.

212_viewer_help_hardcoded_keys branch. Parent branch is master.
Initial changeset:6b4914b46efcf98c9e388710539bb5a8a59ab649

comment:61 Changed 14 years ago by angel_il

  • Votes for changeset set to angel_il

comment:62 Changed 14 years ago by slavazanko

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

comment:63 Changed 14 years ago by andrew_b

  • Status changed from reopened to closed
  • Votes for changeset changed from angel_il slavazanko to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged

Merged to master.
changeset:9f5b88e49578c6edeea42c8c2eb54ff9afbcf8b1

git log --pretty=oneline a1dce46..9f5b88e

comment:64 Changed 5 years ago by andrew_b

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Branch state set to no branch
  • Milestone changed from 4.7.4 to 4.8.23

The keybind for menu is implemented!

Branch:212_menu_keybind
Initial changeset:ad842d0c6b36adcfdf7107f0ac507cddad289342

Please review.

comment:65 Changed 5 years ago by andrew_b

  • Votes for changeset commited-master deleted

comment:66 Changed 5 years ago by andrew_b

  • Branch state changed from no branch to on review

comment:67 Changed 5 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:68 Changed 5 years ago by andrew_b

  • Status changed from reopened to closed
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed

Merged to master: [934a2d9314b621f0a72ba0fe83f18ad2983cd6d6].

git log --pretty=oneline 71c0f7640..934a2d931

comment:69 Changed 5 years ago by andrew_b

  • Branch state changed from approved to merged

comment:70 follow-up: ↓ 71 Changed 5 years ago by egmont

  • Cc egmont added

Unfortunately these changes broke the hotkeys in the F9 menu.

comment:71 in reply to: ↑ 70 Changed 5 years ago by andrew_b

Replying to egmont:

Unfortunately these changes broke the hotkeys in the F9 menu.

Fixed in [7eaa51c79bb74e6e650935e23895c62073ff46c5].

comment:72 Changed 5 years ago by zaytsev

  • Status changed from closed to reopened
  • Votes for changeset committed-master deleted
  • Cc xaoxx@… added
  • Version changed from 4.7.3 to 4.8.23
  • Branch state changed from merged to no branch
  • Milestone changed from 4.8.23 to 4.8.24
  • Resolution fixed deleted

In the pulldown menues the <enter> key doesn't work as expected. Menu
items can only be accessed with the letter keys. Instead, enter be-
haves exactly like down-arrow. This is valid for mc and mcedit.

comment:73 Changed 5 years ago by andrew_b

Currently I'm using recent mc and menu works fine for me.
I cannot reproduce the described behaviour.

comment:74 Changed 5 years ago by andrew_b

  • Status changed from reopened to closed
  • Votes for changeset set to committed-master
  • Version changed from 4.8.23 to 4.7.3
  • Branch state changed from no branch to merged
  • Milestone changed from 4.8.24 to 4.8.23
  • Resolution set to fixed

See #4006.

Previous ticket properties restored.

comment:75 Changed 4 years ago by andrew_b

Key bindings for radiobuttons: [946e8d4888619167502075efd6cb5bc456c03ea9].

Note: See TracTickets for help on using tickets.