mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
global escape
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -264,8 +264,7 @@ class MyApp extends StatelessWidget {
|
||||
child: child!,
|
||||
);
|
||||
if (Utils.isDesktop) {
|
||||
return MouseBackDetector(
|
||||
onTapDown: () {
|
||||
void onBack() {
|
||||
if (SmartDialog.checkExist()) {
|
||||
SmartDialog.dismiss();
|
||||
return;
|
||||
@@ -294,8 +293,17 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
Get.back();
|
||||
}
|
||||
|
||||
return Shortcuts(
|
||||
shortcuts: {
|
||||
LogicalKeySet(LogicalKeyboardKey.escape):
|
||||
VoidCallbackIntent(onBack),
|
||||
},
|
||||
child: MouseBackDetector(
|
||||
onTapDown: onBack,
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
}
|
||||
return child;
|
||||
|
||||
@@ -163,18 +163,6 @@ class PlayerFocus extends StatelessWidget {
|
||||
..controlsLock.value = false;
|
||||
return true;
|
||||
|
||||
case LogicalKeyboardKey.escape:
|
||||
if (plPlayerController.controlsLock.value) {
|
||||
plPlayerController.onLockControl(false);
|
||||
} else if (plPlayerController.isDesktopPip) {
|
||||
plPlayerController.exitDesktopPip();
|
||||
} else if (isFullScreen) {
|
||||
plPlayerController.triggerFullScreen(status: false);
|
||||
} else {
|
||||
Get.back();
|
||||
}
|
||||
return true;
|
||||
|
||||
case LogicalKeyboardKey.keyD:
|
||||
if (plPlayerController.isLive) {
|
||||
final newVal = !plPlayerController.enableShowLiveDanmaku.value;
|
||||
|
||||
Reference in New Issue
Block a user