Introduce keyboard navigation in context menus
This commit is contained in:
parent
991eb742b0
commit
5b2d6e41f3
20 changed files with 121 additions and 34 deletions
16
crates/menu/src/menu.rs
Normal file
16
crates/menu/src/menu.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
#[derive(Clone)]
|
||||
pub struct SelectIndex(pub usize);
|
||||
|
||||
gpui::actions!(
|
||||
menu,
|
||||
[
|
||||
Cancel,
|
||||
Confirm,
|
||||
SelectPrev,
|
||||
SelectNext,
|
||||
SelectFirst,
|
||||
SelectLast
|
||||
]
|
||||
);
|
||||
|
||||
gpui::impl_internal_actions!(menu, [SelectIndex]);
|
Loading…
Add table
Add a link
Reference in a new issue