fix: Ctrl+R flip also matches the physical R key (v1.6.1)
Build & Release / build-linux (push) Has been cancelled
Build & Release / build-windows (push) Has been cancelled
Build & Release / create-release (push) Has been cancelled

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:
Alhan committed 2026-10-14 03:33:16 +03:00
1 parent bad48167c8
commit 6e13892ed1
14 files changed
+98 -35

No files matched your search

+2 -9
View File
@@ -166,13 +166,6 @@ class ImageCanvasState extends State<ImageCanvas> {
bool _onHardwareKey(KeyEvent event) {
final key = event.logicalKey;
if (event is KeyDownEvent) {
if (key == LogicalKeyboardKey.keyR &&
!HardwareKeyboard.instance.isControlPressed &&
!HardwareKeyboard.instance.isShiftPressed &&
!HardwareKeyboard.instance.isAltPressed) {
_toggleFlipH();
return true;
}
if (key == LogicalKeyboardKey.controlLeft ||
key == LogicalKeyboardKey.controlRight) {
_ctrlPressed = true;
@@ -224,8 +217,8 @@ class ImageCanvasState extends State<ImageCanvas> {
_markRenderDirty();
}
/// R: sağ çift tık gibi efektleri sıfırlar ve yatay aynalar; tekrar basınca geri alır.
void _toggleFlipH() {
/// Ctrl+R: sağ çift tık gibi efektleri sıfırlar ve yatay aynalar; tekrar basınca geri alır.
void toggleFlipH() {
_flipH = !_flipH;
_angle = 0; _contrast = 1.0; _saturation = 1.0; _brightness = 0;
_interactionMode = 'none';