未验证 提交 b8101e69 编写于 作者: A Alex Dima

Fixes #106581: Do not react to Win/Super key for mouse wheel zoom on Linux

上级 7951e1f9
......@@ -110,7 +110,12 @@ export class MouseHandler extends ViewEventHandler {
return;
}
const e = new StandardWheelEvent(browserEvent);
if (e.browserEvent!.ctrlKey || e.browserEvent!.metaKey) {
const doMouseWheelZoom = (
platform.isMacintosh
? (browserEvent.metaKey && !browserEvent.ctrlKey && !browserEvent.shiftKey && !browserEvent.altKey)
: (browserEvent.ctrlKey && !browserEvent.metaKey && !browserEvent.shiftKey && !browserEvent.altKey)
);
if (doMouseWheelZoom) {
const zoomLevel: number = EditorZoom.getZoomLevel();
const delta = e.deltaY > 0 ? 1 : -1;
EditorZoom.setZoomLevel(zoomLevel + delta);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册