feat(player): add screenshot shortcut

close #1055
This commit is contained in:
edde746
2026-05-16 23:50:08 +02:00
parent cfd4aa307d
commit 6bad454830
37 changed files with 266 additions and 77 deletions
+13
View File
@@ -1,4 +1,6 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:plezy/models/hotkey_model.dart';
import 'package:plezy/services/settings_service.dart';
import 'package:plezy/services/trackers/tracker_constants.dart';
@@ -61,6 +63,17 @@ void main() {
});
});
group('SettingsService keyboard shortcut defaults', () {
test('includes Ctrl+S screenshot shortcut', () {
expect(SettingsService.defaultKeyboardShortcuts()['screenshot'], 'Ctrl+S');
final hotkey = SettingsService.defaultKeyboardHotkeys()['screenshot'];
expect(hotkey, isNotNull);
expect(hotkey!.key, PhysicalKeyboardKey.keyS);
expect(hotkey.modifiers, [HotKeyModifier.control]);
});
});
group('SettingsService listenables', () {
test('refreshListenables updates active prefs outside the resettable surface', () async {
final settings = await SettingsService.getInstance();