mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
feat: Customizable shortcuts/hotkeys (#439)
This implements the logic for allowing hotkeys with modifiers. Implemented globalhotkeys and videocontrol hotkeys Also implements saving the forward backwards seconds to the user. Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
23385d8e62
commit
fa30e634b4
29 changed files with 1360 additions and 162 deletions
|
|
@ -46,6 +46,14 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
|
|||
usePosterForLibrary: json['usePosterForLibrary'] as bool? ?? false,
|
||||
lastViewedUpdate: json['lastViewedUpdate'] as String?,
|
||||
libraryPageSize: (json['libraryPageSize'] as num?)?.toInt(),
|
||||
shortcuts: (json['shortcuts'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(
|
||||
$enumDecode(_$GlobalHotKeysEnumMap, k),
|
||||
e == null
|
||||
? null
|
||||
: KeyCombination.fromJson(e as Map<String, dynamic>)),
|
||||
) ??
|
||||
const {},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ClientSettingsModelImplToJson(
|
||||
|
|
@ -75,6 +83,8 @@ Map<String, dynamic> _$$ClientSettingsModelImplToJson(
|
|||
'usePosterForLibrary': instance.usePosterForLibrary,
|
||||
'lastViewedUpdate': instance.lastViewedUpdate,
|
||||
'libraryPageSize': instance.libraryPageSize,
|
||||
'shortcuts': instance.shortcuts
|
||||
.map((k, e) => MapEntry(_$GlobalHotKeysEnumMap[k]!, e)),
|
||||
};
|
||||
|
||||
const _$ThemeModeEnumMap = {
|
||||
|
|
@ -112,3 +122,8 @@ const _$DynamicSchemeVariantEnumMap = {
|
|||
DynamicSchemeVariant.rainbow: 'rainbow',
|
||||
DynamicSchemeVariant.fruitSalad: 'fruitSalad',
|
||||
};
|
||||
|
||||
const _$GlobalHotKeysEnumMap = {
|
||||
GlobalHotKeys.search: 'search',
|
||||
GlobalHotKeys.exit: 'exit',
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue