Allow toggle_help (default ?) remapping
parent
53e924eb33
commit
629997397f
|
@ -456,6 +456,10 @@ exit_thread = 'i'
|
||||||
.Pp
|
.Pp
|
||||||
.Em general
|
.Em general
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
|
.It Ic toggle_help
|
||||||
|
Toggle help and shortcuts view.
|
||||||
|
.\" default value
|
||||||
|
.Pq Em \&?
|
||||||
.It Ic enter_command_mode
|
.It Ic enter_command_mode
|
||||||
Enter
|
Enter
|
||||||
.Em COMMAND
|
.Em COMMAND
|
||||||
|
|
|
@ -1653,7 +1653,7 @@ impl Component for Tabbed {
|
||||||
self.set_dirty(true);
|
self.set_dirty(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
UIEvent::Input(Key::Char('?')) => {
|
UIEvent::Input(ref key) if shortcut!(key == shortcuts["general"]["toggle_help"]) => {
|
||||||
if self.show_shortcuts {
|
if self.show_shortcuts {
|
||||||
/* children below the shortcut overlay must be redrawn */
|
/* children below the shortcut overlay must be redrawn */
|
||||||
self.set_dirty(true);
|
self.set_dirty(true);
|
||||||
|
|
|
@ -211,6 +211,7 @@ shortcut_key_values! { "pager",
|
||||||
|
|
||||||
shortcut_key_values! { "general",
|
shortcut_key_values! { "general",
|
||||||
pub struct GeneralShortcuts {
|
pub struct GeneralShortcuts {
|
||||||
|
toggle_help |> "Toggle help and shortcuts view." |> Key::Char('?'),
|
||||||
enter_command_mode |> "Enter COMMAND mode." |> Key::Char(' '),
|
enter_command_mode |> "Enter COMMAND mode." |> Key::Char(' '),
|
||||||
go_to_tab |> "Go to the nth tab" |> Key::Alt('n'),
|
go_to_tab |> "Go to the nth tab" |> Key::Alt('n'),
|
||||||
next_tab |> "Next tab." |> Key::Char('T'),
|
next_tab |> "Next tab." |> Key::Char('T'),
|
||||||
|
|
Loading…
Reference in New Issue