Keys
This object offers expressive access to predefined Shortcuts and ModifierShortcuts taken from the specification extended with Space as symbol for simple space.
This enables a beautiful definition of shortcuts:
// define a commonly used combination
val searchKey = Keys.Shift + Keys.Alt + "F"
// react only to a set of Keys e.g. to enable keyboard navigation of some component
div {
keydowns.filter { setOf(Keys.Space, Keys.Enter).contains(shortcutOf(it)) }.map { } handledBy selectItem
}Content copied to clipboard
In some cases, you need to check, whether an event contains a named-key as key property. There is a Set with all named-keys ready for this: NamedKeys