Catching Back mouse button events

I have a Back and Forward mouse buttons on my mouse that act like the Back and Forward buttons in the browser where it's applicable.
I would like to be able to bind events to those buttons in a wx program.

The buttons seem to generate a WM_XBUTTONDOWN under Windows 2000/XP, but looking in the wxWidgets code I didn't find a reference to them.

Has anyone ever done this? Would I need to hack on wxWidgets to get it done?

Hi all. Recently, a thread was started by the developers of Twisted to remove the wxreactor and threadedselectreactor from the Twisted code base as of the 2.6 release. These reactors are an essential element of the Twisted networking framework used by wxpython developers for our gui platform.

The bottom line is that if as a community of wxpython developers, we are not stepping up to support these tools, support for our platform will disappear. This is disconcerting and I have volunteered to assist but others are needed to help supply fixes to automated unit tests that are failing, deprecation warnings and to commit patches. Assistance is also needed to maintain a buildbot that will help keep these reactors available to the community (and tested on mulitiple platforms).

I am hoping that the Chandler project can identify a person also since twisted integration is fundamental to their wxpython app.

Please folks, if there are others to help with this effort, now is the time to step up. Either we do something about it now or lose it. Please see the recent posts at:

http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Please show your support for this excellent networking platform by stepping up and identifying you willingness to assist with the maintenance of these fundamental python networking tools for our gui platform.

On a second note, there may be issues with Twisted and soon to be released wxpython 2.7 from this post:

http://twistedmatrix.com/pipermail/twisted-python/2006-September/014073.html

I have not yet installed 2.7 to verify this for certain but if anyone is aware of the errors it would be good to have some discussion and potential fixes for these issues before 2.7 is released.

Many thanks,
David

Eli Golovinsky wrote:

I have a Back and Forward mouse buttons on my mouse that act like the Back and Forward buttons in the browser where it's applicable.
I would like to be able to bind events to those buttons in a wx program.

The buttons seem to generate a WM_XBUTTONDOWN under Windows 2000/XP, but looking in the wxWidgets code I didn't find a reference to them.

Has anyone ever done this? Would I need to hack on wxWidgets to get it done?

It would be nice to have support for additional mouse buttons in wx, but if you don't feel like doing that much work you can probably do it just by using PyWin32 and hooking the WndProc.

http://wiki.wxpython.org/index.cgi/HookingTheWndProc

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

David Pratt wrote:

On a second note, there may be issues with Twisted and soon to be released wxpython 2.7 from this post:

[Twisted-Python] removing unsupported reactors in twisted 2.6: qt,

I have not yet installed 2.7 to verify this for certain but if anyone is aware of the errors it would be good to have some discussion and potential fixes for these issues before 2.7 is released.

It looks like twisted.internet.wxreactor is still using the wxPython.wx namespace, and it does have errors on importing in the current 2.7 previews. If somebody who is using the wxreactor module in a real app (and can use it for testing this change) would submit a patch to them that changes it over to the wx namespace then I expect that it will then work fine in 2.7 even before we get the current wxPython.wx errors cleared up. It looks like it would take only a few changes.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi Robin. Thanks for this. The more critical issue for twisted and wxpython is the ongoing support for Twisted in python in general. Robin, is there anyone at OSAF willing to assist with support of wxreactor and threadedselect reactor. Anyone on this list using this combination that is willing to commit some time to helping to maintain this useful code?

Regards,
David

Robin Dunn wrote:

···

David Pratt wrote:

On a second note, there may be issues with Twisted and soon to be released wxpython 2.7 from this post:

[Twisted-Python] removing unsupported reactors in twisted 2.6: qt,

I have not yet installed 2.7 to verify this for certain but if anyone is aware of the errors it would be good to have some discussion and potential fixes for these issues before 2.7 is released.

It looks like twisted.internet.wxreactor is still using the wxPython.wx namespace, and it does have errors on importing in the current 2.7 previews. If somebody who is using the wxreactor module in a real app (and can use it for testing this change) would submit a patch to them that changes it over to the wx namespace then I expect that it will then work fine in 2.7 even before we get the current wxPython.wx errors cleared up. It looks like it would take only a few changes.

Robin Dunn wrote:

David Pratt wrote:

On a second note, there may be issues with Twisted and soon to be released wxpython 2.7 from this post:

[Twisted-Python] removing unsupported reactors in twisted 2.6: qt,

I have not yet installed 2.7 to verify this for certain but if anyone is aware of the errors it would be good to have some discussion and potential fixes for these issues before 2.7 is released.

It looks like twisted.internet.wxreactor is still using the wxPython.wx namespace, and it does have errors on importing in the current 2.7 previews.

Yes, it's

If somebody who is using the wxreactor module in a real app (and can use it for testing this change) would submit a patch to them that changes it over to the wx namespace then I expect that it will then work fine in 2.7 even before we get the current wxPython.wx errors cleared up. It looks like it would take only a few changes.

With this little patch, it work well also with 2.7!

michele:/usr/lib/python2.4/site-packages/twisted/internet# diff wxreactor.py wxreactor_ok.py
37c37
< import wx

···

---
> from wxPython.wx import wxApp, wxCallAfter, wxEventLoop, wxFrame, NULL
40c40
< class DummyApp(wx.App):
---
> class DummyApp(wxApp):
84c84
< self.interleave(wx.CallAfter)
---
> self.interleave(wxCallAfter)
92,93c92,93
< ev = wx.EventLoop()
< wx.EventLoop.SetActive(ev)
---
> ev = wxEventLoop()
> wxEventLoop.SetActive(ev)

Michele

Sorry, read my post and obviously I am referring to ongoing support for Twisted in wxpython in general (not python in general).

Regards,
David

David Pratt wrote:

···

Hi Robin. Thanks for this. The more critical issue for twisted and wxpython is the ongoing support for Twisted in python in general. Robin, is there anyone at OSAF willing to assist with support of wxreactor and threadedselect reactor. Anyone on this list using this combination that is willing to commit some time to helping to maintain this useful code?

Regards,
David

Robin Dunn wrote:

David Pratt wrote:

On a second note, there may be issues with Twisted and soon to be released wxpython 2.7 from this post:

[Twisted-Python] removing unsupported reactors in twisted 2.6: qt,

I have not yet installed 2.7 to verify this for certain but if anyone is aware of the errors it would be good to have some discussion and potential fixes for these issues before 2.7 is released.

It looks like twisted.internet.wxreactor is still using the wxPython.wx namespace, and it does have errors on importing in the current 2.7 previews. If somebody who is using the wxreactor module in a real app (and can use it for testing this change) would submit a patch to them that changes it over to the wx namespace then I expect that it will then work fine in 2.7 even before we get the current wxPython.wx errors cleared up. It looks like it would take only a few changes.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

David Pratt wrote:

Hi Robin. Thanks for this. The more critical issue for twisted and wxpython is the ongoing support for Twisted in python in general. Robin, is there anyone at OSAF willing to assist with support of wxreactor and threadedselect reactor.

I checked and OSAF is not using either in Chandler. (They are just running one of the the regular reactors in an alternate thread themselves, or something like that.) So there isn't anybody there with a vested interest in keeping it running and useful.

Anyone on this list using this combination that is willing to commit some time to helping to maintain this useful code?

I suppose that if it does get pulled from Twisted that we can put it in wx.lib, but we'll still need somebody who is actively using it to maintain it there and supply me with patches.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Michele Petrazzo wrote:

Robin Dunn wrote:

If somebody who is using the wxreactor module in a real app (and can use it for testing this change) would submit a patch to them that changes it over to the wx namespace then I expect that it will then work fine in 2.7 even before we get the current wxPython.wx errors cleared up. It looks like it would take only a few changes.

With this little patch, it work well also with 2.7!

michele:/usr/lib/python2.4/site-packages/twisted/internet# diff wxreactor.py wxreactor_ok.py
37c37
< import wx
---
> from wxPython.wx import wxApp, wxCallAfter, wxEventLoop, wxFrame, NULL
40c40
< class DummyApp(wx.App):
---
> class DummyApp(wxApp):
84c84
< self.interleave(wx.CallAfter)
---
> self.interleave(wxCallAfter)
92,93c92,93
< ev = wx.EventLoop()
< wx.EventLoop.SetActive(ev)
---
> ev = wxEventLoop()
> wxEventLoop.SetActive(ev)

Please send this patch to the Twisted folks if you haven't already done so.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!