Feature Request: Navigate menu using h/j/k/l (mostly j/k)
Closed this issue · 4 comments
I would like to propose a feature to navigate the menu using j/k directional keys (vim keys)
Less moving the hands from home row the better.
Thanks.
Hi, i'm afraid that the --menu option of the Dialog not support this keys. By default it maps the first letter of the tag as a hot-key, and i did't find any options how to switch that off.
From dialog's man:
KEY BINDINGS
You can override or add to key bindings in dialog by adding to the configuration file. Dialog's bindkey command maps single keys to
its internal coding.
bindkey widget curses_key dialog_key
The widget name can be "" (all widgets), or specific widgets such as textbox. Specific widget bindings override the "" bindings.
User-defined bindings override the built-in bindings.
The curses_key can be any of the names derived from curses.h, e.g., "HELP" from "KEY_HELP". Dialog also recognizes ANSI control char‐
acters such as "^A", "^?", as well as C1-controls such as "A" and "?". Finally, it allows any single character to be escaped with a
backslash.
Dialog's internal keycode names correspond to the DLG_KEYS_ENUM type in dlg_keys.h, e.g., "HELP" from "DLGK_HELP".
Widget Names
Some widgets (such as the formbox) have an area where fields can be edited. Those are managed in a subwindow of the widget, and may
have separate keybindings from the main widget because the subwindows are registered using a different name.
Widget Window name Subwindow Name
───────────────────────────────────────────
calendar calendar
checklist checklist
editbox editbox editbox2
form formbox formfield
fselect fselect fselect2
inputbox inputbox inputbox2
menu menubox menu
msgbox msgbox
pause pause
progressbox progressbox
radiolist radiolist
tailbox tailbox
textbox textbox searchbox
timebox timebox
yesno yesno
───────────────────────────────────────────
Some widgets are actually other widgets, using internal settings to modify the behavior. Those use the same widget name as the actual
widget:
Widget Actual Widget
─────────────────────────────
dselect fselect
infobox msgbox
inputmenu menu
mixedform form
passwordbox inputbox
passwordform form
prgbox progressbox
programbox progressbox
tailboxbg tailbox
─────────────────────────────
Built-in Bindings
This manual page does not list the key bindings for each widget, because that detailed information can be obtained by running dialog.
If you have set the --trace option, dialog writes the key-binding information for each widget as it is registered.
Example
Normally dialog uses different keys for navigating between the buttons and editing part of a dialog versus navigating within the edit‐
ing part. That is, tab (and back-tab) traverse buttons (or between buttons and the editing part), while arrow keys traverse fields
within the editing part. Tabs are also recognized as a special case for traversing between widgets, e.g., when using multiple tail‐
boxbg widgets.
Some users may wish to use the same key for traversing within the editing part as for traversing between buttons. The form widget is
written to support this sort of redefinition of the keys, by adding a special group in dlgk_keys.h for "form" (left/right/next/prev).
Here is an example binding demonstrating how to do this:
bindkey formfield TAB form_NEXT
bindkey formbox TAB form_NEXT
bindkey formfield BTAB form_prev
bindkey formbox BTAB form_prev
That type of redefinition would not be useful in other widgets, e.g., calendar, due to the potentially large number of fields to tra‐
verse.
Another feature request:
add new entries right from the app?
Another feature request:
add new entries right from the app?
Hi, text editors are better for this.
But I've added two helpful commands: ShowConf and EditConf to 'RUN COMMAND' section.
ShowConf - will show full conf for selected entry
EditConf - will open a confile with selected entry in nano(or other editor set in EDITOR var), this is very handy when you got(i do) a lot of ssh confiles.