micro icon indicating copy to clipboard operation
micro copied to clipboard

Enhance Keybinding Display

Open Bison-3 opened this issue 9 months ago • 3 comments

Dynamically display keybindings using a configurable string of actions: image

Might be a good idea to also document this in the help page somewhere

Bison-3 avatar Mar 26 '25 00:03 Bison-3

Specifying key combinations rather than actions feels backwards – the user cares about how to do an action (eg. Quit = Ctrl-q), not necessarily what a specific key combination is bound to (Ctrl-q = Quit). (Although I realize doing it that way would be much trickier to implement.)

Andriamanitra avatar Mar 26 '25 00:03 Andriamanitra

This would fix https://github.com/zyedidia/micro/issues/3063 and https://github.com/zyedidia/micro/issues/3702. @JoeKar any opinion on this?

cutelisp avatar Jun 22 '25 17:06 cutelisp

Might be a good idea to also document this in the help page somewhere

Yep, currently helpactions is not mentioned in the documentation yet. When we introduce a new option, then we should document it there. I assume, that we should link to the bindable actions, because they are the values to be used in helpactions.

@JoeKar any opinion on this?

We should add a validator for this option, which checks for bindable actions, right? Then we can be sure to work with valid entries and can inform the user about invalid ones. But here we can run into the same trouble we already had with the colorschemes and more important, the config package can't/shouldn't access the action package. ~~I assume we'd need to move the defaults_other.go & defaults_darwin.go from action to config to prevent circle dependency and to realize this validator.~~

Edit: Realized that the defaults do not reflect all available actions. :man_facepalming: The validator would become quite hard without any list to check against.

JoeKar avatar Sep 08 '25 19:09 JoeKar