Improve keyboard shortcuts:

- Remove CTRL+W on Linux
- Add support for Copy key for copying Oath codes, etc.
This commit is contained in:
Dain Nilsson 2023-08-16 14:57:24 +02:00
parent 1f4428b6a7
commit 10d81f511f
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -149,18 +149,24 @@ Widget registerGlobalShortcuts(
child: Shortcuts(
shortcuts: {
ctrlOrCmd(LogicalKeyboardKey.keyC): const CopyIntent(),
ctrlOrCmd(LogicalKeyboardKey.keyW): const HideIntent(),
const SingleActivator(LogicalKeyboardKey.copy): const CopyIntent(),
ctrlOrCmd(LogicalKeyboardKey.keyF): const SearchIntent(),
if (isDesktop) ...{
const SingleActivator(LogicalKeyboardKey.tab, control: true):
const NextDeviceIntent(),
},
if (Platform.isMacOS) ...{
const SingleActivator(LogicalKeyboardKey.keyW, meta: true):
const HideIntent(),
const SingleActivator(LogicalKeyboardKey.keyQ, meta: true):
const CloseIntent(),
const SingleActivator(LogicalKeyboardKey.comma, meta: true):
const SettingsIntent(),
},
if (Platform.isWindows) ...{
const SingleActivator(LogicalKeyboardKey.keyW, control: true):
const HideIntent(),
},
if (Platform.isLinux) ...{
const SingleActivator(LogicalKeyboardKey.keyQ, control: true):
const CloseIntent(),