fix: Ctrl+R flip also matches the physical R key (v1.6.1)
On some keymaps the R key resolves to a different logical key (observed on a Turkish remote-desktop setup: the R key arrives as logical T), so the Ctrl+R shortcut never fired even though the key events reached the app. The shortcut now matches PhysicalKeyboardKey.keyR as well; a regression test covers the wrong-layout case.
This commit is contained in:
1 parent
bad48167c8
commit
6e13892ed1
14 files changed
+98
-35
No files matched your search
@@ -190,6 +190,8 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
||||
);
|
||||
}
|
||||
|
||||
void _flipHorizontal() => _canvasKey.currentState?.toggleFlipH();
|
||||
|
||||
Future<void> _cropSave() async {
|
||||
final path = ImageManager.instance.currentImagePath;
|
||||
final state = _canvasKey.currentState;
|
||||
@@ -237,6 +239,7 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
||||
Widget build(BuildContext context) {
|
||||
return AppShortcuts(
|
||||
onCropSave: _hasImages ? _cropSave : null,
|
||||
onFlipH: _hasImages ? _flipHorizontal : null,
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: WindowResizeZones(
|
||||
|
||||
Reference in new issue
Block a user