TableKeyMap constructor

TableKeyMap({
  1. KeyBinding? lineUp,
  2. KeyBinding? lineDown,
  3. KeyBinding? pageUp,
  4. KeyBinding? pageDown,
  5. KeyBinding? halfPageUp,
  6. KeyBinding? halfPageDown,
  7. KeyBinding? gotoTop,
  8. KeyBinding? gotoBottom,
})

Creates a table key map with default bindings.

Implementation

TableKeyMap({
  KeyBinding? lineUp,
  KeyBinding? lineDown,
  KeyBinding? pageUp,
  KeyBinding? pageDown,
  KeyBinding? halfPageUp,
  KeyBinding? halfPageDown,
  KeyBinding? gotoTop,
  KeyBinding? gotoBottom,
}) : lineUp =
         lineUp ??
         KeyBinding(
           keys: ['up', 'k'],
           help: Help(key: '↑/k', desc: 'up'),
         ),
     lineDown =
         lineDown ??
         KeyBinding(
           keys: ['down', 'j'],
           help: Help(key: '↓/j', desc: 'down'),
         ),
     pageUp =
         pageUp ??
         KeyBinding(
           keys: ['b', 'pgup'],
           help: Help(key: 'b/pgup', desc: 'page up'),
         ),
     pageDown =
         pageDown ??
         KeyBinding(
           keys: ['f', 'pgdown', ' '],
           help: Help(key: 'f/pgdn', desc: 'page down'),
         ),
     halfPageUp =
         halfPageUp ??
         KeyBinding(
           keys: ['u', 'ctrl+u'],
           help: Help(key: 'u', desc: '½ page up'),
         ),
     halfPageDown =
         halfPageDown ??
         KeyBinding(
           keys: ['d', 'ctrl+d'],
           help: Help(key: 'd', desc: '½ page down'),
         ),
     gotoTop =
         gotoTop ??
         KeyBinding(
           keys: ['home', 'g'],
           help: Help(key: 'g/home', desc: 'go to start'),
         ),
     gotoBottom =
         gotoBottom ??
         KeyBinding(
           keys: ['end', 'G'],
           help: Help(key: 'G/end', desc: 'go to end'),
         );