Skip to content

Commit b955714

Browse files
committed
Add space to open
1 parent 81db3b8 commit b955714

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Keys | Description
6363
<kbd>←</kbd> / <kbd>h</kbd>, <kbd>↓</kbd> / <kbd>j</kbd>, <kbd>↑</kbd> / <kbd>k</kbd>, <kbd>→</kbd> / <kbd>l</kbd> | Navigate left, down, up, right
6464
<kbd>~</kbd> | Go to home directory
6565
<kbd>←</kbd> / <kbd>b</kbd> / <kbd>Backspace</kbd> | Go to parent directory
66-
<kbd>→</kbd> / <kbd>f</kbd> / <kbd>l</kbd> / <kbd>Enter</kbd> | Open the selected file using the default application configured in your environment, or navigate to the selected directory
66+
<kbd>→</kbd> / <kbd>f</kbd> / <kbd>l</kbd> / <kbd>Enter</kbd> / <kbd>Space</kbd> | Open the selected file using the default application configured in your environment, or navigate to the selected directory
6767
<kbd>o</kbd> | Open the selected file using the program configured by: `templates.open_selected_file`
6868
<kbd>Home</kbd> / <kbd>g</kbd> / <kbd>^</kbd> | Select first row
6969
<kbd>End</kbd> / <kbd>G</kbd> / <kbd>$</kbd> | Select last row

src/views/help.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ const MIN_HEIGHT: u16 = 4;
1818

1919
const DEFAULT_KEYBOARD_SHORTCUTS: [(&str, &str); 19] = [
2020
("Quit: ", "q"),
21-
("Navigate: ", "↓/j, ↑/k, ←/h, →/l"),
21+
("Navigate: ", "←/h, ↓/j, ↑/k, →/l"),
2222
("Go to home dir: ", "~"),
2323
("Go to parent dir: ", "←/b/Backspace"),
24-
("Open: ", "→/f/l/Enter"),
24+
("Open: ", "→/f/l/Enter/Space"),
2525
("Select first row: ", "Home/g/^"),
2626
("Select last row: ", "End/G/$"),
2727
("Select middle of visible rows: ", "z"),

src/views/table/handler.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ impl CommandHandler for TableView {
3535
| (KeyCode::PageDown, KeyModifiers::NONE) => self.next_page(),
3636
(_, KeyModifiers::NONE) => match code {
3737
KeyCode::Delete => self.delete(),
38-
KeyCode::Enter | KeyCode::Right | KeyCode::Char('f') | KeyCode::Char('l') => {
39-
self.open_selected()
40-
}
38+
KeyCode::Enter
39+
| KeyCode::Right
40+
| KeyCode::Char('f')
41+
| KeyCode::Char('l')
42+
| KeyCode::Char(' ') => self.open_selected(),
4143
KeyCode::Esc => Command::SetFilter("".into()).into(),
4244
KeyCode::Char('~') => self.navigate_to_home_directory(),
4345
KeyCode::Char('o') => self.open_selected_in_custom_program(),

0 commit comments

Comments
 (0)