wip: shortcut listener widget.

This commit is contained in:
2021-11-10 18:40:51 +08:00
parent 4eb7bc256c
commit 930fd5ddf7
7 changed files with 131 additions and 106 deletions
+2
View File
@@ -22,6 +22,8 @@ const double defaultButtonHeight = 36;
const List<String> builtInCommands = [
'ShowWorkspace',
'Handle4Or5FingersSwipeUp',
'Handle4Or5FingersSwipeDown',
'ToggleMaximize',
'Minimize',
'ShowWindow',
+11
View File
@@ -0,0 +1,11 @@
import 'package:flutter/services.dart';
/// https://github.com/linuxdeepin/dde-daemon/blob/76be73fbf019cee73983292e1edf47611ed9a219/gesture/manager.go#L386
final Map<LogicalKeyboardKey, String> keyMapper = {
LogicalKeyboardKey.control: 'ctrl',
LogicalKeyboardKey.controlLeft: 'ctrl',
LogicalKeyboardKey.controlRight: 'ctrl',
LogicalKeyboardKey.shift: 'shift',
LogicalKeyboardKey.shiftLeft: 'shift',
LogicalKeyboardKey.shiftRight: 'shift',
};