ConfirmKeyMap constructor
ConfirmKeyMap({
- KeyBinding? yes,
- KeyBinding? no,
- KeyBinding? confirm,
- KeyBinding? cancel,
- KeyBinding? toggleLeft,
- KeyBinding? toggleRight,
Implementation
ConfirmKeyMap({
KeyBinding? yes,
KeyBinding? no,
KeyBinding? confirm,
KeyBinding? cancel,
KeyBinding? toggleLeft,
KeyBinding? toggleRight,
}) : yes =
yes ??
KeyBinding(
keys: ['y', 'Y'],
help: Help(key: 'y', desc: 'yes'),
),
no =
no ??
KeyBinding(
keys: ['n', 'N'],
help: Help(key: 'n', desc: 'no'),
),
confirm =
confirm ??
KeyBinding(
keys: ['enter'],
help: Help(key: '↵', desc: 'confirm'),
),
cancel =
cancel ??
KeyBinding(
keys: ['esc', 'ctrl+c'],
help: Help(key: 'esc', desc: 'cancel'),
),
toggleLeft =
toggleLeft ??
KeyBinding(
keys: ['left', 'h'],
help: Help(key: '←', desc: 'yes'),
),
toggleRight =
toggleRight ??
KeyBinding(
keys: ['right', 'l'],
help: Help(key: '→', desc: 'no'),
);