mirror of https://github.com/zulip/zulip.git
settings_panel: Bind vim keys to SettingsPanelMenu.
Added a commit to bind vim keys with the SettingsPanelMenu, allowing users to control the settings and organization tabs using 'h','j','k' and 'l' keys. vim_left('h') -> Switch between tab by shifting focus to the left. vim_right('l') -> Switch between tab by shifting focus to the right. vim_up('k') -> Move up. vim_down('j') -> Move down.
This commit is contained in:
parent
67cd385cec
commit
9f9259683c
|
@ -8,6 +8,10 @@ const keys = {
|
|||
38: "up_arrow",
|
||||
39: "right_arrow",
|
||||
40: "down_arrow",
|
||||
72: "vim_left",
|
||||
74: "vim_down",
|
||||
75: "vim_up",
|
||||
76: "vim_right",
|
||||
};
|
||||
|
||||
export function handle(opts) {
|
||||
|
|
|
@ -70,6 +70,12 @@ export class SettingsPanelMenu {
|
|||
enter_key: () => this.enter_panel(),
|
||||
up_arrow: () => this.prev(),
|
||||
down_arrow: () => this.next(),
|
||||
|
||||
// Binding vim keys as well
|
||||
vim_left: toggler.maybe_go_left,
|
||||
vim_right: toggler.maybe_go_right,
|
||||
vim_up: () => this.prev(),
|
||||
vim_down: () => this.next(),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue