ListKeyMap constructor
ListKeyMap({
- KeyBinding? cursorUp,
- KeyBinding? cursorDown,
- KeyBinding? nextPage,
- KeyBinding? prevPage,
- KeyBinding? goToStart,
- KeyBinding? goToEnd,
- KeyBinding? filter,
- KeyBinding? clearFilter,
- KeyBinding? acceptWhileFiltering,
- KeyBinding? cancelWhileFiltering,
- KeyBinding? quit,
- KeyBinding? forceQuit,
- KeyBinding? showFullHelp,
- KeyBinding? closeFullHelp,
Creates a list key map with default bindings.
Implementation
ListKeyMap({
KeyBinding? cursorUp,
KeyBinding? cursorDown,
KeyBinding? nextPage,
KeyBinding? prevPage,
KeyBinding? goToStart,
KeyBinding? goToEnd,
KeyBinding? filter,
KeyBinding? clearFilter,
KeyBinding? acceptWhileFiltering,
KeyBinding? cancelWhileFiltering,
KeyBinding? quit,
KeyBinding? forceQuit,
KeyBinding? showFullHelp,
KeyBinding? closeFullHelp,
}) : cursorUp =
cursorUp ??
KeyBinding(
keys: ['up', 'k'],
help: Help(key: '↑/k', desc: 'up'),
),
cursorDown =
cursorDown ??
KeyBinding(
keys: ['down', 'j'],
help: Help(key: '↓/j', desc: 'down'),
),
nextPage =
nextPage ??
KeyBinding(
keys: ['right', 'l', 'pgdown'],
help: Help(key: '→/l', desc: 'next page'),
),
prevPage =
prevPage ??
KeyBinding(
keys: ['left', 'h', 'pgup'],
help: Help(key: '←/h', desc: 'prev page'),
),
goToStart =
goToStart ??
KeyBinding(
keys: ['home', 'g'],
help: Help(key: 'g', desc: 'go to start'),
),
goToEnd =
goToEnd ??
KeyBinding(
keys: ['end', 'G'],
help: Help(key: 'G', desc: 'go to end'),
),
filter =
filter ??
KeyBinding(
keys: ['/'],
help: Help(key: '/', desc: 'filter'),
),
clearFilter =
clearFilter ??
KeyBinding(
keys: ['esc'],
help: Help(key: 'esc', desc: 'clear filter'),
),
acceptWhileFiltering =
acceptWhileFiltering ??
KeyBinding(
keys: ['enter'],
help: Help(key: 'enter', desc: 'apply filter'),
),
cancelWhileFiltering =
cancelWhileFiltering ??
KeyBinding(
keys: ['esc'],
help: Help(key: 'esc', desc: 'cancel'),
),
quit =
quit ??
KeyBinding(
keys: ['q'],
help: Help(key: 'q', desc: 'quit'),
),
forceQuit = forceQuit ?? KeyBinding(keys: ['ctrl+c']),
showFullHelp =
showFullHelp ??
KeyBinding(
keys: ['?'],
help: Help(key: '?', desc: 'more'),
),
closeFullHelp =
closeFullHelp ??
KeyBinding(
keys: ['?'],
help: Help(key: '?', desc: 'less'),
);