disable win single alt key event

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-11-07 23:29:19 +08:00
parent 58791e3e91
commit c4c6a2243e
2 changed files with 10 additions and 4 deletions

View File

@@ -576,16 +576,16 @@ class _MouseInteractiveViewerState extends State<MouseInteractiveViewer>
final Offset global = event.position;
if (_gestureIsSupported(_GestureType.scale)) {
late final shift = HardwareKeyboard.instance.isShiftPressed;
if (HardwareKeyboard.instance.isControlPressed) {
_handleMouseWheelScale(event, local, global);
return;
} else if (shift || HardwareKeyboard.instance.isAltPressed) {
}
final shift = HardwareKeyboard.instance.isShiftPressed;
if (shift || HardwareKeyboard.instance.isAltPressed) {
_handleMouseWheelPanAsScale(event, local, global, shift);
return;
} else {
widget.pointerSignalFallback?.call(event);
}
widget.pointerSignalFallback?.call(event);
}
widget.onInteractionUpdate?.call(
ScaleUpdateDetails(

View File

@@ -179,6 +179,12 @@ Win32Window::MessageHandler(HWND hwnd,
WPARAM const wparam,
LPARAM const lparam) noexcept {
switch (message) {
case WM_SYSCOMMAND:
if (wparam == SC_KEYMENU && (lparam >> 16) <= 0) {
return 0;
}
break;
case WM_DESTROY:
window_handle_ = nullptr;
Destroy();