mouse buttons "button8" and "button9" don't wok

Hi, I'm using mouse bindings and want to add my "forward" and "back" buttons, but get an "not in scope" error when I do so. Here is my config peace: myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $ [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster)) -- set the window to floating mode and move by dragging , ((modMask, button2), (\w -> focus w >> windows W.shiftMaster)) -- raise the window to the top of the stack -- , ((modMask, button9), (toggleWS)) -- switch to next workspace ] kind regards, Stefan

According to the /usr/include/X11/X.h installed here, only buttons 1-5
exist. You can try just using the value 9, but there's no guarantees.
What does xev say when you press the button?
~d
Quoting Stefan Gojan
Hi,
I'm using mouse bindings and want to add my "forward" and "back" buttons, but get an "not in scope" error when I do so. Here is my config peace:
myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $ [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster)) -- set the window to floating mode and move by dragging , ((modMask, button2), (\w -> focus w >> windows W.shiftMaster)) -- raise the window to the top of the stack -- , ((modMask, button9), (toggleWS)) -- switch to next workspace ]
kind regards, Stefan _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

You can try but no guarantees.
I've been using buttons > 5 since forever and have never had problems. Just check xev to tell what button has what number. (My X11/X.h goes only up to 5. Who cares.) For inspiration, a snippet from my xmonad.hs. My laptop's touchpad allows scrolling left/right as well as up/down. -- Mod + vertical scrolling = move focus, with Alt it moves windows. -- Mod + horizontal scrolling = resize the master pane, with Alt it changes number of windows in master. -- -- So is that cool or what? ;-) let leftclick = 1 middleclick = 2 rightclick = 3 wheelup = 4 wheeldown = 5 wheelleft = 6 wheelright = 7 in withMask modm -- Set the window to floating mode and move by dragging [ (leftclick , \w -> focus w >> mouseMoveWindow w) -- Raise the window to the top of the stack , (middleclick, \w -> focus w >> windows W.swapMaster) -- Set the window to floating mode and resize by dragging , (rightclick, \w -> focus w >> mouseResizeWindow w) , (wheelup , \_ -> windows W.focusUp) , (wheeldown , \_ -> windows W.focusDown) , (wheelleft , \_ -> sendMessage Shrink) , (wheelright, \_ -> sendMessage Expand) ++ withMask (modm .|. alt) [ (wheelup , \_ -> windows W.swapUp) , (wheeldown , \_ -> windows W.swapDown) , (wheelleft , \_ -> sendMessage $ IncMasterN 1) , (wheelright, \_ -> sendMessage $ IncMasterN (-1)) ] -- Not very important. Tiny function the above code relies on. withMask m = map (\(sym, action) -> ((m, sym), action)) Cheers, Hendrik -- "1 + 1 = 3, for large values of 1."

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 7/2/10 08:58 , wagnerdm@seas.upenn.edu wrote:
According to the /usr/include/X11/X.h installed here, only buttons 1-5 exist. You can try just using the value 9, but there's no guarantees. What does xev say when you press the button?
Buttons above the original 5 in the X11 core are handled via the XInput extension (see include/X11/extensions/XInput.h). Looking offhand I don't see it in Haskell's X11 package. - -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwuBv8ACgkQIn7hlCsL25W4wACfcoYVl20h3ZhKU87cJRgn8zq1 JT8AoL0/FPT5FJWyjT2B/cABa/mww3GZ =KM/b -----END PGP SIGNATURE-----
participants (4)
-
Brandon S Allbery KF8NH
-
Hendrik Krauß
-
Stefan Gojan
-
wagnerdm@seas.upenn.edu