ソースを参照

WebContent: Switch scroll direction on shift modifier

Dmitry Petrov 3 年 前
コミット
2616b61eee
1 ファイル変更3 行追加0 行削除
  1. 3 0
      Userland/Libraries/LibWeb/Page/EventHandler.cpp

+ 3 - 0
Userland/Libraries/LibWeb/Page/EventHandler.cpp

@@ -117,6 +117,9 @@ bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int
     if (!layout_root())
     if (!layout_root())
         return false;
         return false;
 
 
+    if (modifiers & KeyModifier::Mod_Shift)
+        swap(wheel_delta_x, wheel_delta_y);
+
     // FIXME: Support wheel events in subframes.
     // FIXME: Support wheel events in subframes.
 
 
     auto result = layout_root()->hit_test(position, Layout::HitTestType::Exact);
     auto result = layout_root()->hit_test(position, Layout::HitTestType::Exact);