Menu

3Dconnexion and pymol

Help
Joachim
2007-11-27
2013-04-23
  • Joachim

    Joachim - 2007-11-27

    Hallo

    I've got a nice 3D "mouse"
    this is a 3Dconnexion SpaceNavigator
    I can see it in gizmod, change it to be recognized beein a mouse.
    But how to map the events. I get
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x1 Val: 0x3
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x0 Val: -0xc
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x1 Val: 0x6
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x2 Val: 0x5
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x0 Val: -0xa
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x1 Val: 0xa
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x2 Val: 0x5
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x5 Val: -0x1
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x0 Val: -0x7
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x1 Val: 0xc
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x2 Val: 0x3
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x0 Val: -0x3
    onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x1 Val: 0xc

    And I want to remap these events as beein mouse events, some with <SHIFT> or <CTRL> pressed.

     
    • Tim Burrell

      Tim Burrell - 2007-11-28

      Hey Joachim,

      No problem!  First try checking out the docs: http://gizmod.wiki.sourceforge.net/  specifically http://gizmod.wiki.sourceforge.net/How+Gizmod+Works

      That should give you a good overview of where to get started.  Then take a look at at the ATI-X10 scripts, especially the 499-ATIX10-Default.py one.  You can see it detects the Event.Code == GizmoKey.BTN_RIGHT and translates it into a mouse event.  You just need to do something similar for the space navigator.  Just detect the commands it's spitting out and convert them into matching mouse events.

      I'm usually a little more verbose, but I'm getting married soon so life is full of wedding planning stuff at the moment.  If you're still having trouble when all of this craziness is over for me (mid-December), I'll gladly assist in any way I can!

      Thanks,

      Tim.

       
    • Joachim

      Joachim - 2007-11-28

      Thanx, Tim and good luck with your wife!

      this would be of higher priority to me too!

      I try my best now, to get it working.

      First of all, I check for naming conventions and so on.
      I tested evrouter too, but it misses a whole set of events.
      evrouter is a lot simpler for me, as there are only two small C files to use.
      Now I'm on python back again...

       
      • Tim Burrell

        Tim Burrell - 2007-11-29

        Thanks!  And yeah evrouter is definitely simpler.  It was actually my motivation for writing Gizmod.  It works for simple cases but it just wasn't flexible enough for me.

        If there's anything you're struggling with or are having trouble getting to work, don't hesitate to post about it.  I might not answer until the wedding stuff is done with, but I'll get back to you eventually :).

        Thanks,

        Tim.

         

Log in to post a comment.