From c9d15aa96aab1537890f5fe2011da998663b42fd Mon Sep 17 00:00:00 2001 From: goosedb Date: Fri, 12 Jun 2026 12:27:53 +0300 Subject: [PATCH] Support horizontal scrolling: add left/right mouse scroll parsing --- src/Graphics/Vty/Platform/Windows/Input/Mouse.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Graphics/Vty/Platform/Windows/Input/Mouse.hs b/src/Graphics/Vty/Platform/Windows/Input/Mouse.hs index bfa07b9..4123623 100644 --- a/src/Graphics/Vty/Platform/Windows/Input/Mouse.hs +++ b/src/Graphics/Vty/Platform/Windows/Input/Mouse.hs @@ -86,6 +86,12 @@ scrollUp = 64 scrollDown :: Int scrollDown = 65 +scrollLeft :: Int +scrollLeft = 66 + +scrollRight :: Int +scrollRight = 67 + hasBitSet :: Int -> Int -> Bool hasBitSet val bit = val .&. bit > 0 @@ -110,6 +116,8 @@ getSGRButton mods = , (rightButton, BRight) , (scrollUp, BScrollUp) , (scrollDown, BScrollDown) + , (scrollLeft, BScrollLeft) + , (scrollRight, BScrollRight) ] in case lookup (mods .&. buttonMask) buttonMap of Nothing -> failParse