[xmonad] [dons@galois.com: Re: More than 5 mouse buttons in Graphics.X11?]

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Mon Feb 4 14:30:52 EST 2008

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  

>> 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 at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the xmonad mailing list