ValidatedKeybind

constructor()

A validated FzzyKeybind, which can be used for any user context input (not just keybinds, but it was a convenient name for this validation). Constructing this validation does not automatically register a context type. If you want to use this in built-int context handling, be sure to use ContextType.create. This validation itself implements Relevant, so can be used in context type registration directly.

Shorthand constructor for automatic validation. Will start with an unbound keybind.

Author

fzzyhmstrs

Since

0.6.5


constructor(keyCode: Int, type: ContextInput)

A validated FzzyKeybind, which can be used for any user context input (not just keybinds, but it was a convenient name for this validation). Constructing this validation does not automatically register a context type. If you want to use this in built-int context handling, be sure to use ContextType.create. This validation itself implements Relevant, so can be used in context type registration directly.

Author

fzzyhmstrs

Since

0.6.5

Parameters

keyCode

Int keycode for the keybind, with no modifiers. using GLFW for selection of keys is recommended.

type

ContextInput type for this keybind, mouse or keyboard


constructor(keyCode: Int, type: ContextInput, ctrl: Boolean, shift: Boolean, alt: Boolean)

A validated FzzyKeybind, which can be used for any user context input (not just keybinds, but it was a convenient name for this validation). Constructing this validation does not automatically register a context type. If you want to use this in built-int context handling, be sure to use ContextType.create. This validation itself implements Relevant, so can be used in context type registration directly.

Author

fzzyhmstrs

Since

0.6.5

Parameters

keyCode

Int keycode for the keybind, with no modifiers. using GLFW for selection of keys is recommended.

type

ContextInput type for this keybind, mouse or keyboard

ctrl

Whether the control/super key needs to be held down or not.

shift

Whether the shift key needs to be held down or not.

alt

Whether the alt key needs to be held down or not.


constructor(operator: UnaryOperator<FzzyKeybind.Builder>)

A validated FzzyKeybind, which can be used for any user context input (not just keybinds, but it was a convenient name for this validation). Constructing this validation does not automatically register a context type. If you want to use this in built-int context handling, be sure to use ContextType.create. This validation itself implements Relevant, so can be used in context type registration directly.

This constructor builds a keybind from the FzzyKeybind builder itself, letting you easily make compound key inputs.

Author

fzzyhmstrs

Since

0.6.5

Parameters

operator

UnaryOperator<FzzyKeybind.Builder> - operator to apply keys to the provided empty builder. If you pass the builder back unchanged, the validation will be set with an unbound key.


constructor(defaultValue: FzzyKeybind)

Parameters

defaultValue

FzzyKeybind used as the default for this keybind