ui: Switch j and k keys to match vi -- j means down, k means up
This commit is contained in:
parent
5fb0410eee
commit
85dc2f0707
1 changed files with 2 additions and 2 deletions
|
|
@ -383,7 +383,7 @@ impl UI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeyEvent { code: KeyCode::Up, .. }
|
KeyEvent { code: KeyCode::Up, .. }
|
||||||
| KeyEvent { code: KeyCode::Char('j'), .. } => {
|
| KeyEvent { code: KeyCode::Char('k'), .. } => {
|
||||||
let index = match self.selection.selected() {
|
let index = match self.selection.selected() {
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
|
|
@ -397,7 +397,7 @@ impl UI {
|
||||||
self.selection.select(Some(index));
|
self.selection.select(Some(index));
|
||||||
}
|
}
|
||||||
KeyEvent { code: KeyCode::Down, .. }
|
KeyEvent { code: KeyCode::Down, .. }
|
||||||
| KeyEvent { code: KeyCode::Char('k'), .. } => {
|
| KeyEvent { code: KeyCode::Char('j'), .. } => {
|
||||||
let index = match self.selection.selected() {
|
let index = match self.selection.selected() {
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
assert!(self.ports.len() > 0, "We must have ports because we have a selection.");
|
assert!(self.ports.len() > 0, "We must have ports because we have a selection.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue