TreeKeyMap constructor

TreeKeyMap({
  1. KeyBinding? up,
  2. KeyBinding? down,
  3. KeyBinding? left,
  4. KeyBinding? right,
  5. KeyBinding? toggle,
  6. KeyBinding? activate,
  7. KeyBinding? home,
  8. KeyBinding? end,
  9. KeyBinding? pageUp,
  10. KeyBinding? pageDown,
  11. KeyBinding? panLeft,
  12. KeyBinding? panRight,
})

Implementation

TreeKeyMap({
  KeyBinding? up,
  KeyBinding? down,
  KeyBinding? left,
  KeyBinding? right,
  KeyBinding? toggle,
  KeyBinding? activate,
  KeyBinding? home,
  KeyBinding? end,
  KeyBinding? pageUp,
  KeyBinding? pageDown,
  KeyBinding? panLeft,
  KeyBinding? panRight,
}) : up =
         up ??
         KeyBinding(
           keys: const ['up', 'k'],
           help: const Help(key: '↑/k', desc: 'up'),
         ),
     down =
         down ??
         KeyBinding(
           keys: const ['down', 'j'],
           help: const Help(key: '↓/j', desc: 'down'),
         ),
     left =
         left ??
         KeyBinding(
           keys: const ['left', 'h'],
           help: const Help(key: '←/h', desc: 'collapse'),
         ),
     right =
         right ??
         KeyBinding(
           keys: const ['right', 'l'],
           help: const Help(key: '→/l', desc: 'expand'),
         ),
     toggle =
         toggle ??
         KeyBinding(
           keys: const ['space'],
           help: const Help(key: 'space', desc: 'toggle'),
         ),
     activate =
         activate ??
         KeyBinding(
           keys: const ['enter'],
           help: const Help(key: 'enter', desc: 'open'),
         ),
     home =
         home ??
         KeyBinding(
           keys: const ['home', 'g'],
           help: const Help(key: 'home', desc: 'first'),
         ),
     end =
         end ??
         KeyBinding(
           keys: const ['end', 'G'],
           help: const Help(key: 'end', desc: 'last'),
         ),
     pageUp =
         pageUp ??
         KeyBinding(
           keys: const ['pgup', 'ctrl+u'],
           help: const Help(key: 'pgup', desc: 'page up'),
         ),
     pageDown =
         pageDown ??
         KeyBinding(
           keys: const ['pgdown', 'ctrl+d'],
           help: const Help(key: 'pgdn', desc: 'page down'),
         ),
     panLeft =
         panLeft ??
         KeyBinding(
           keys: const ['shift+left', 'H'],
           help: const Help(key: 'H', desc: 'pan left'),
         ),
     panRight =
         panRight ??
         KeyBinding(
           keys: const ['shift+right', 'L'],
           help: const Help(key: 'L', desc: 'pan right'),
         ) {
  shortHelp = [this.up, this.down, this.toggle, this.activate];
  fullHelp = [
    [this.up, this.down, this.left, this.right],
    [this.home, this.end, this.pageUp, this.pageDown],
    [this.panLeft, this.panRight, this.toggle, this.activate],
  ];
}