setShortcut

abstract fun setShortcut(numericChar: Char, alphaChar: Char, numericModifiers: Int, alphaModifiers: Int): MenuItem(source)

Change both the numeric and alphabetic shortcut associated with this item. Note that the shortcut will be triggered when the key that generates the given character is pressed along with the corresponding modifier key. Also note that case is not significant and that alphabetic shortcut characters will be handled in lower case.

See Menu for the menu types that support shortcuts.

Return

This Item so additional setters can be called.

Parameters

numericChar

The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard.

numericModifiers

The numeric modifier associated with the shortcut. It should be a combination of META_META_ON, META_CTRL_ON, META_ALT_ON, META_SHIFT_ON, META_SYM_ON, META_FUNCTION_ON.

alphaChar

The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys.

alphaModifiers

The alphabetic modifier associated with the shortcut. It should be a combination of META_META_ON, META_CTRL_ON, META_ALT_ON, META_SHIFT_ON, META_SYM_ON, META_FUNCTION_ON.