handleDefaults static method
Implementation
static bool handleDefaults(FrameworkModel? framework) {
// initialize default shortcuts
if (defaultShortcuts.isEmpty) {
defaultShortcuts.add(ShortcutModel(System(), "1", key: "CTRL-ALT-R"));
defaultShortcuts.add(ShortcutModel(System(), "2", key: "CTRL-ALT-L"));
defaultShortcuts.add(ShortcutModel(System(), "3", key: "CTRL-ALT-T"));
defaultShortcuts.add(ShortcutModel(System(), "4", key: "CTRL-ALT-X"));
}
// find shortcut from keysPressed
var shortcut = findMatching(defaultShortcuts);
if (shortcut != null) {
switch (shortcut.id) {
// refresh
case "1":
NavigationManager().refresh();
break;
// export log
case "2":
Log().export();
break;
// show template
case "3":
framework?.showTemplate();
break;
// show template
case "4":
System.clearBranding();
break;
}
}
return shortcut != null;
}