feat: add key + as zoom-in key (#5628)

This commit is contained in:
Lucas.Xu 2024-06-26 13:27:13 +08:00 committed by GitHub
parent e4132ed217
commit 7d96c2dfd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -136,14 +136,19 @@ class _HomeHotKeysState extends State<HomeHotKeys> {
), ),
// Scale up/down the app // Scale up/down the app
HotKeyItem( // In some keyboards, the system returns equal as + keycode, while others may return add as + keycode, so add them both as zoom in key.
...[KeyCode.equal, KeyCode.add].map(
(keycode) => HotKeyItem(
hotKey: HotKey( hotKey: HotKey(
KeyCode.equal, keycode,
modifiers: [Platform.isMacOS ? KeyModifier.meta : KeyModifier.control], modifiers: [
Platform.isMacOS ? KeyModifier.meta : KeyModifier.control,
],
scope: HotKeyScope.inapp, scope: HotKeyScope.inapp,
), ),
keyDownHandler: (_) => _scaleWithStep(0.1), keyDownHandler: (_) => _scaleWithStep(0.1),
), ),
),
HotKeyItem( HotKeyItem(
hotKey: HotKey( hotKey: HotKey(