Allow clicking on commands in the command palette

This commit is contained in:
Conrad Irwin 2023-11-13 21:42:27 -07:00
parent 4ef95f05e8
commit ad017a5df5
5 changed files with 104 additions and 25 deletions

View file

@ -32,6 +32,7 @@ impl KeyBinding {
div()
.flex()
.gap_1()
.when(keystroke.modifiers.function, |el| el.child(Key::new("fn")))
.when(keystroke.modifiers.control, |el| el.child(Key::new("^")))
.when(keystroke.modifiers.alt, |el| el.child(Key::new("")))
.when(keystroke.modifiers.command, |el| el.child(Key::new("")))
@ -136,6 +137,7 @@ mod stories {
.child(KeyBinding::new(binding("a z")))
.child(Story::label(cx, "Chord with Modifier"))
.child(KeyBinding::new(binding("ctrl-a shift-z")))
.child(KeyBinding::new(binding("fn-s")))
}
}
}