KeyMap class abstract
A collection of key bindings forming a key map.
Implement this interface to provide key bindings for help views.
Example
class MyKeyMap implements KeyMap {
final up = KeyBinding.withHelp(['up', 'k'], '↑/k', 'move up');
final down = KeyBinding.withHelp(['down', 'j'], '↓/j', 'move down');
final quit = KeyBinding.withHelp(['q', 'ctrl+c'], 'q', 'quit');
@override
List<KeyBinding> shortHelp() => [up, down, quit];
@override
List<List<KeyBinding>> fullHelp() => [
[up, down],
[quit],
];
}
Constructors
- KeyMap()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fullHelp(
) → List< List< KeyBinding> > - Returns bindings for the full help view, grouped by columns.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shortHelp(
) → List< KeyBinding> - Returns bindings for the short help view.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited