Subject: Re: More than 5 mouse buttons in Graphics.X11?
From: Don Stewart <[email-masked]>
To: Friedrich Delgado Friedrichs <[email-masked]>
Date: Sat, 2 Feb 2008 16:50:15 -0800

friedel:
> Don Stewart:
> > friedel:
> > > Would it be possible to support more than 5 mouse buttons in the X11
> > > package for haskell?
> > > 
> > > I have a 7 Button mouse and I'd like to use it in xmonad bindings.
> > 
> > I'm not sure. What changes to X11 would be required?
> 
> I probably can't really help you with that. I'm just using xmonad
> since a few days and I use it as a motivation to learn more Haskell. I
> only know Miranda from my freshman course at the university, so the
> more advanced features of Haskell (like monads and typeclasses) still
> escape me.
> 
> It appears that most of those features are needed for doing
> "real-life" tasks such as X11 Programming though.
> 
> 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)
> 
> Since I couldn't find any other declarations of Button5 in the
> package, I assume that maybe some system header file defines them...
> 
> But I probably misunderstood something, since I'm totally clueless
> about how to interface Haskell with c-libraries.
> 
> 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).
> 
> Kind regards
>      Friedel

How about we take this to the [email-masked] list, and try to get a
sense of what is required, and what the problems are?