[dons@galois.com: Re: More than 5 mouse buttons in Graphics.X11?]
Hi! I'd really like to be able to ,((0, button6), withFocused W.swapMaster) (with EZConfig and additionalMouseBindings) See forwarded mail. -- Friedrich Delgado Friedrichs <friedel@nomaden.org> Laziness led to the invention of the most useful tools.
On Feb 4, 2008, at 13:13 , Friedrich Delgado Friedrichs wrote:
What I tried was simply to add Button6 and Button7 to the Lists in the code and recompile, but apparently they must be declared elsewhere first. I get a few errors such as this one.
Types.hsc:1329:0: error: `Button6' undeclared (first use in this function)
Button1 .. Button5 came from the X11 master header (X11/X.h) as exposed by the X11 Haskell package. The button event definition only has room for 5 buttons (it is a bitmap, and all available bits are used).
Somebody on #xmonad claimed that it might be necessary to use the XInput library to add support for mice with more than 5 buttons in xmonad (or any other haskell program).
That was me; see above for the reason. The XInput extension provides access to unlimited mouse buttons, as opposed to the standard XEvent API which is limited to 5 buttons. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
Am Montag, 4. Februar 2008 schrieb Brandon S. Allbery KF8NH:
On Feb 4, 2008, at 13:13 , Friedrich Delgado Friedrichs wrote:
Somebody on #xmonad claimed that it might be necessary to use the XInput library to add support for mice with more than 5 buttons in xmonad (or any other haskell program).
That was me; see above for the reason. The XInput extension provides access to unlimited mouse buttons, as opposed to the standard XEvent API which is limited to 5 buttons.
I don't know how this stuff works but my xmonad.hs simply uses 8 and 9 instead of button8 and button9, respectively; it seems to work fine. Lukas
Hey! :) Lukas Mai schrieb:
I don't know how this stuff works but my xmonad.hs simply uses 8 and 9 instead of button8 and button9, respectively; it seems to work fine.
Works here, too... specifically: ,((0, 6), (\w -> focus w >> windows W.swapMaster)) Apparently this is because /usr/include/X11/X.h happens to contain the following (at least on this system): #define Button1 1 #define Button2 2 #define Button3 3 #define Button4 4 #define Button5 5 Makes me feel a bit silly, but I'd never have guessed that it could be that simple... Thanks for solving at least the practical problem :) Friedel -- Friedrich Delgado Friedrichs <friedel@nomaden.org>
friedel:
Hey! :)
Lukas Mai schrieb:
I don't know how this stuff works but my xmonad.hs simply uses 8 and 9 instead of button8 and button9, respectively; it seems to work fine.
Works here, too... specifically:
,((0, 6), (\w -> focus w >> windows W.swapMaster))
Apparently this is because /usr/include/X11/X.h happens to contain the following (at least on this system):
#define Button1 1 #define Button2 2 #define Button3 3 #define Button4 4 #define Button5 5
Makes me feel a bit silly, but I'd never have guessed that it could be that simple...
Could you summarise the problem and solution on the wiki please? http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions or maybe http://haskell.org/haskellwiki/Xmonad/General_xmonad.hs_config_tips
Don Stewart schrieb:
Could you summarise the problem and solution on the wiki please?
http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions
or maybe
http://haskell.org/haskellwiki/Xmonad/General_xmonad.hs_config_tips
I've done so on the second page. I hope it helps the next user who stumbles over this. -- Friedrich Delgado Friedrichs <friedel@nomaden.org>
participants (4)
-
Brandon S. Allbery KF8NH -
Don Stewart -
Friedrich Delgado Friedrichs -
Lukas Mai