lanucher support CTRL-N and CTRL-P to move up and down
Signed-off-by: Ye Sijun <junnplus@gmail.com>
This commit is contained in:
1 parent
756a9789c8
commit
3ca45cf269
1 file changed
+13
-1
@@ -22,7 +22,7 @@ use mux::Mux;
|
||||
use std::collections::BTreeMap;
|
||||
use termwiz::cell::{AttributeChange, CellAttributes};
|
||||
use termwiz::color::ColorAttribute;
|
||||
use termwiz::input::{InputEvent, KeyCode, KeyEvent, MouseButtons, MouseEvent};
|
||||
use termwiz::input::{InputEvent, KeyCode, KeyEvent, Modifiers, MouseButtons, MouseEvent};
|
||||
use termwiz::surface::{Change, Position};
|
||||
use termwiz::terminal::Terminal;
|
||||
use window::WindowOps;
|
||||
@@ -474,6 +474,18 @@ impl LauncherState {
|
||||
}) if !self.filtering => {
|
||||
self.move_up();
|
||||
}
|
||||
InputEvent::Key(KeyEvent {
|
||||
key: KeyCode::Char('P'),
|
||||
modifiers: Modifiers::CTRL,
|
||||
}) => {
|
||||
self.move_up();
|
||||
}
|
||||
InputEvent::Key(KeyEvent {
|
||||
key: KeyCode::Char('N'),
|
||||
modifiers: Modifiers::CTRL,
|
||||
}) => {
|
||||
self.move_down();
|
||||
}
|
||||
InputEvent::Key(KeyEvent {
|
||||
key: KeyCode::Char('/'),
|
||||
..
|
||||
|
||||
Reference in new issue
Block a user