fix: Ctrl+Shift+Q onKeyEvent ile, pkill dogru calisiyor
Some checks failed
Build Windows / build-windows (push) Has been cancelled

This commit is contained in:
Alhan
2026-07-22 05:55:56 +03:00
parent f9831875ba
commit d622d0ec04
4 changed files with 9 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -16,6 +16,15 @@ class AppShortcuts extends StatelessWidget {
autofocus: true,
onKeyEvent: (node, event) {
if (event is KeyDownEvent) {
final ctrl = HardwareKeyboard.instance.isControlPressed;
final shift = HardwareKeyboard.instance.isShiftPressed;
// Ctrl+Shift+Q: tüm pencereleri kapat
if (ctrl && shift && event.logicalKey == LogicalKeyboardKey.keyQ) {
Process.runSync('pkill', ['imajviewer']);
return KeyEventResult.handled;
}
switch (event.logicalKey) {
case LogicalKeyboardKey.arrowLeft:
ImageManager.instance.previousImage();
@@ -50,14 +59,6 @@ class AppShortcuts extends StatelessWidget {
): () {
windowManager.close();
},
// Tüm imajviewer pencerelerini kapat
const SingleActivator(
LogicalKeyboardKey.keyQ,
control: true,
shift: true,
): () {
Process.run('pkill', ['imajviewer']);
},
},
child: child,
),

Binary file not shown.