From a6213356bc44d42b9d5fd54c078b2445e858ba0f Mon Sep 17 00:00:00 2001 From: John Scipione Date: Fri, 7 Mar 2014 18:18:13 -0500 Subject: [PATCH] BView: scroll horizontally when holding control ... instead of vertically. This actually swaps horizontal and vertical so if you have a mouse with a fancy 2-axis scroll ball it will swap the x and y coordinates. (untested) --- src/kits/interface/View.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index 9cfe1bda05..45261743a2 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -12,6 +12,7 @@ #include +#include #include #include @@ -4417,6 +4418,9 @@ BView::MessageReceived(BMessage* message) if (deltaX == 0.0f && deltaY == 0.0f) break; + if ((modifiers() & B_CONTROL_KEY) != 0) + std::swap(horizontal, vertical); + if (horizontal != NULL && deltaX != 0.0f) ScrollWithMouseWheelDelta(horizontal, deltaX);