Add hotkey ctrl-shift-w to close tabs.
This commit is contained in:
parent
80b84633f9
commit
1f7b17e4d1
1 changed files with 10 additions and 0 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -1296,6 +1296,16 @@ impl Application for App {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Event::Keyboard(KeyEvent::KeyPressed {
|
||||||
|
key_code: KeyCode::W,
|
||||||
|
modifiers,
|
||||||
|
}) => {
|
||||||
|
if modifiers == Modifiers::CTRL | Modifiers::SHIFT {
|
||||||
|
Some(Message::TabClose(None))
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
Event::Keyboard(KeyEvent::KeyPressed {
|
Event::Keyboard(KeyEvent::KeyPressed {
|
||||||
key_code: KeyCode::V,
|
key_code: KeyCode::V,
|
||||||
modifiers,
|
modifiers,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue