define
fun define(name: String, text: String, keyCombination: KeyCombination? = null, tooltip: String? = null): Command
Adds a single Command to the map (commands).
name is never shown to the end user, and is only used internally. If you name your icons, then buttons, menuItems etc. will automatically use that icon.
text is the text within the Button, MenuItem etc.
keyCombination can be created using helper functions. e.g.
Key.S.noMods() // Just the S key.
Key.S.control() // Ctrl+S
Key.S.control().shift() // Ctrl+Shift().S
Content copied to clipboard
tooltip isn't implemented yet (Glok doesn't support tooltips yet).