Bubbles::Key::Binding
Binding describes a set of keybindings and, optionally, their associated help text.
Constructors
new(keys : Nil | Array(String) = nil, help : Bubbles::Key::Help = Help.new, disabled : Bool = false)
SourceInstance methods
disabled?
Sourceenabled
Enabled returns whether or not the keybinding is enabled. Kept for Go parity with key.Binding.Enabled.
enabled?
Enabled returns whether or not the keybinding is enabled. Disabled keybindings won't be activated and won't show up in help. Keybindings are enabled by default.
help=(help : Help)
Sourceset_keys
SetKeys sets the keys for the keybinding. No-arg case: creates an empty (non-nil) key list to keep binding enabled (Go parity).
unbind
Unbind removes the keys and help from this binding, effectively nullifying it. This is a step beyond disabling it, since applications can enable or disable key bindings based on application state.