Menu

Mouse wheel scrolling

Help
ch
2007-07-17
2013-04-23
  • ch

    ch - 2007-07-17

    I have just installed Gizmod on Ubuntu Feisty Fawn and everything appears to be working great.  Thanks for the great software!

    Here comes the but... but, I am having trouble with scripts that detect the scrolling of a mouse (for instance in the default Firefox script).

    If I push the powermate down and turn the powermate, it scrolls as it should do (in larger jumps) as it simulates the PgUp/PgDn buttons.

    The default Firefox script has the line:

    Gizmod.Mice[0].createEventRaw(GizmoEventType.EV_REL, GizmoMouseAxis.WHEEL, -Event.Value)

    This should enable the user to scroll the page slowly if the powermate is not pressed down which should duplicate the scrolling of the mouse wheel.  Unfortunately in my setup this does not work, nothing happens when I turn the powermate with it not pressed down.

    I have hacked the script so that it works using cursor up/down instead of the mouse wheel but I would really like the mouse wheel scrolling to work.  Any ideas?

    (If it helps I installed Gizmod using the .deb rather than via SVN.)

     
    • Tim Burrell

      Tim Burrell - 2007-07-17

      Hey there,

      Could you try the following:

      - launch gizmod in debug mode (ala "gizmod -g")
      - scroll with the mouse wheel

      Copy and paste the relevant messages regarding the mouse wheel events.

      I have a feeling I know what's going on, but once I see the output we should be able to get this sorted out.

      Thanks,

      Tim.

       
    • ch

      ch - 2007-07-17

      Hi Tim,

      Thanks for the quick response.

      Here are the last few lines of the messages when I was scrolling with my mouse wheel up and down.

      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x1 Val: 0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: -0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: -0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: -0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x0 Val: 0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: 0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: 0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: -0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: -0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x8 Val: -0x1
      onEvent: Standard -- /dev/input/event3 | [EV_REL] c: 0x0 Val: 0x1

      -0x1 appears to be when I moved the wheel towards me and 0x1 when I moved it away.

      If you need any more info please just ask and I will try and get it to you.

       
      • Tim Burrell

        Tim Burrell - 2007-07-18

        In the powermate firefox script, where you see:

        # scroll slowly (create a mouse wheel event)
        Gizmod.Mice[0].createEventRaw(GizmoEventType.EV_REL, GizmoMouseAxis.WHEEL, -Event.Value)

        Can you replace with:

        # scroll slowly (create a mouse wheel event)
        Gizmod.Mice[0].createEventRaw(GizmoEventType.EV_REL, 0x01, 0x01)
        Gizmod.Mice[0].createEventRaw(GizmoEventType.EV_REL, GizmoMouseAxis.WHEEL, -Event.Value)
        Gizmod.Mice[0].createEventRaw(GizmoEventType.EV_REL, 0x00, 0x01)

        Then, restart gizmod, scroll the powermate when firefox is focused, and let me know if that produces any results?

        If not, run gizmod in debug mode (gizmod -g), focus firefox, rotate the dial, and look at the gizmod output.  Is it catching any of the scroll wheel events it's creating?

        Thanks,

        Tim.

         
    • ch

      ch - 2007-07-18

      Yes, that makes the mouse move diagonally from top-left to bottom-right (no matter which way I scroll).  It doesn't scroll the window at all - just moves the mouse.

       
    • ch

      ch - 2007-07-18

      I have just noticed that when I use the powermate in Firefox without pressing down it is actually altering the soundcard volume.

      I have confirmed this by running with "gizmod -A" and the scrolling works in Firefox as it should.

      I would prefer not to have to run "gizmod -A" how can I make Firefox a higher priority than the soundcard so that the powermate scrolls instead of altering the volume?  I have the Firefox script 210-Powermate-Firefox.py and I think the volume is controlled in 299-Powermate-Default.py, is this correct?  This should mean that Firefox is a higher priority does it not?

       
      • Tim Burrell

        Tim Burrell - 2007-07-18

        Yeah this should be the default behavior!  Hrmm...

        So there's a couple of possibilities as I see it.

        First one, is the text "firefox" in the firefox window titles?

        Second, do you have multiple powermates?

        Third, in the onDeviceEvent function in the powermate firefox script can you replace:

        # Only interact with Firefox if it's the first Powermate
        if Gizmo.DeviceClassID == 0:

        with:

        # Only interact with Firefox if it's the first Powermate
        print Gizmo.DeviceClassID
        if Gizmo.DeviceClassID == 0:

        And tell me what the result is?

        Thanks,

        Tim.

         
    • ch

      ch - 2007-07-18

      In response to your questions, I only have one powermate and yes firefox is in the title bar. The Gizmo.DeviceClassID is 0.

      With regards to the sound going up and down - this has now stopped after I restarted and now nothing happens again when I scroll the powermate.

      Here is the script I am using:

          #***
        #*********************************************************************
      #*************************************************************************
      #***
      #*** GizmoDaemon Config Script
      #***     Powermate Firefox config
      #***
      #*****************************************
        #*****************************************
          #***

      """

        Copyright (c) 2007, Gizmo Daemon Team
        Licensed under the Apache License, Version 2.0 (the "License");
        you may not use this file except in compliance with the License.
        You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.
       
      """

      ############################
      # Imports
      ##########################

      from GizmoDaemon import *
      from GizmoScriptActiveApplication import *

      ENABLED = True
      VERSION_NEEDED = 3.2
      INTERESTED_CLASSES = [GizmoEventClass.Powermate]
      INTERESTED_WINDOWS = ["firefox"]

      ############################
      # PowermateFirefox Class definition
      ##########################

      class PowermateFirefox(GizmoScriptActiveApplication):
          """
          Firefox Powermate Event Mapping
          """
         
          ############################
          # Public Functions
          ##########################
                 
          def onDeviceEvent(self, Event, Gizmo = None):
              """
              Called from Base Class' onEvent method.
              See GizmodDispatcher.onEvent documention for an explanation of this function
              """
             
                 # Only interact with Firefox if it's the first Powermate
                if Gizmo.DeviceClassID == 0:
                     # Check for rotations
                  if Event.Type == GizmoEventType.EV_REL:
                      # scroll the window slowly if the button isn't pressed
                      # and fast if the button is down
                      if not Gizmo.getKeyState(GizmoKey.BTN_0):
                          # scroll slowly
                          #if Event.Value > 0:
                          #    for repeat in range(abs(Event.Value)):
                          #        Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_DOWN)
                          #else:
                          #    for repeat in range(abs(Event.Value)):
                          #        Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_UP)
                          Gizmod.Mice[0].createEventRaw(GizmoEventType.EV_REL, GizmoMouseAxis.WHEEL, -Event.Value)
                      else:
                          # scroll quickly (by pages using the page up / page down keys)
                          if Event.Value > 0:
                              for repeat in range(abs(Event.Value)):
                                  Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_PAGEDOWN)
                          else:
                              for repeat in range(abs(Event.Value)):
                                  Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_PAGEUP)
                      return True
                  else:
                      return False
              else:
                  return False
         
          ############################
          # Private Functions
          ##########################

          def __init__(self):
              """
              Default Constructor
              """
             
              GizmoScriptActiveApplication.__init__(self, ENABLED, VERSION_NEEDED, INTERESTED_CLASSES, INTERESTED_WINDOWS)

      ############################
      # PowermateFirefox class end
      ##########################

      # register the user script
      PowermateFirefox()

       
      • Tim Burrell

        Tim Burrell - 2007-07-18

        Hmm... weird!

        When you run "gizmod -g" and rotate the powermate dial when firefox is focused, do you see any mouse events showing up in gizmod's console output?

         
    • ch

      ch - 2007-07-18

      Here is my output from gizmod -g (my powermate is event5):

      GizmoDaemon v3:3 -=- (c) 2007, Tim Burrell <tim.burrell@gmail.com>
      -----------
      Debug Mode Enabled

      Registering Devices:

          Standard - Directory [/dev/input]
             Mouse - Macintosh mouse button emulation [/dev/input/event0]
          Keyboard - Microsoft Natural® Ergonomic Keyboard 4000 [/dev/input/event1]
          Keyboard - Microsoft Natural® Ergonomic Keyboard 4000 [/dev/input/event2]
             Mouse - Microsoft Microsoft Wireless Optical Mouse® 1.00 [/dev/input/event3]
          Standard - PC Speaker [/dev/input/event4]
         Powermate - Griffin PowerMate [/dev/input/event5]
      Powermate Rotate Sensitivity set to 1 Ticks per Generated Event
          Standard - Power Button (FF) [/dev/input/event6]
          Standard - Sleep Button (CM) [/dev/input/event7]
          Standard - Power Button (CM) [/dev/input/event8]
      LIRC device node [/dev/lircd] does not exist -- disabling LIRC support

      Loading User Scripts:

               CatchAllDebug - CatchAll Event Mapping for Testing
         PowermateVisualizer - Powermate Visualization Handler [1 Powermates]
             KeyboardDefault - Default Fancy Keyboard Event Mapping
      PowermateButtonTimeout - ButtonTimeout Powermate Event Mapping
        PowermateImageViewer - Image Viewer Powermate Event Mapping
           PowermateSwiftfox - Swiftfox Powermate Event Mapping
            PowermateFirefox - Firefox Powermate Event Mapping
            PowermateDefault - Default Powermate Event Mapping

      Attached to Sound Card [hw:0] -- HDA VIA VT82xx
      onEvent: SoundCard -- SoundCardAttach [HDA VIA VT82xx]
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Headphone>
      onEvent: WindowFocus [FocusIn] -- <WindowTitle:ch@ch-desktop: ~> <FormalName:gnome-terminal> <Class:Gnome-terminal>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Headphone>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Headphone> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Headphone> Vol: 64.51612854
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <PCM>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <PCM> Unmute
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <PCM> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <PCM> Vol: 100.0
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Front>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Front>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Front> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Front> Vol: 100.0
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Surround>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Surround>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Surround> Vol: 0.0
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Center>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Center>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Center> Vol: 0.0
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <LFE>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <LFE>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <LFE> Vol: 0.0
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Line>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Line>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Line> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Line> Vol: 61.2903213501
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <CD>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <CD>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <CD> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <CD> Vol: 64.51612854
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Mic Boost>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mic Boost> Vol: 66.6666641235
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Mic>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mic>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mic> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mic> Vol: 9.67741966248
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <PC Speaker>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <PC Speaker>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <PC Speaker> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <PC Speaker> Vol: 66.6666641235
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Aux>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Aux>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Aux> Vol: 0.0
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Mono>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mono>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mono> Vol: 0.0
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mic>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mic>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <CD>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <CD>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Aux>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Aux>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Line>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Line>
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Mix>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mix>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mono>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Mono>
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Phone>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Phone>
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Capture>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Capture>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Capture>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Capture>
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <IEC958>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <IEC958>
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Channel Mode>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Channel Mode>
      onEvent: SoundCard -- MixerElementAttach [HDA VIA VT82xx] <Stereo Downmix>
      onEvent: SoundCard -- MixerElementChange [HDA VIA VT82xx] <Stereo Downmix>
      onEvent: Standard -- /dev/input/event1 | [EV_KEY] <KEY_ENTER> c: 0x1c v: 0x0
      onEvent: Standard -- /dev/input/event3 | [EV_KEY] <BTN_LEFT> c: 0x110 v: 0x1
      onEvent: Standard -- /dev/input/event3 | [EV_KEY] <BTN_LEFT> c: 0x110 v: 0x0
      onEvent: WindowFocus [FocusIn] -- <WindowTitle:Nailsea - Mozilla Firefox> <FormalName:Gecko> <Class:Firefox-bin>
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x2
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: 0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1
      onEvent: Powermate -- /dev/input/event5 | [EV_REL] c: 0x7 Val: -0x1

       
      • Tim Burrell

        Tim Burrell - 2007-07-18

        Ahhh this was what I needed to see the problem!  I had never considered this, but the problem is the "macintosh mouse emulation" device on /dev/input/event0.  It's sending the mouse commands to that device rather than your actual mouse.

        Try editing scripts/GizmoDeviceStrings.py

        Where you see the line:

        MOUSE_GIZMOS = ["mouse", "trackball", "touchpad", "logitech usb receiver"]

        Change it to:

        MOUSE_GIZMOS = ["optical mouse"]

        Let me know if that does the trick.

        Thanks,

        Tim.

         
    • ch

      ch - 2007-07-18

      Yes!  Thank-you so much that seemed to fix it :-)  I'm not even entirely sure what the "macintosh mouse emulation" is but your fix works and I am happy!

      On a side note, is there a way of specifying two applications in INTERESTED_WINDOWS?  I use Swiftfox and Firefox and it would be nice if I could specify something like INTERESTED_WINDOWS = ["firefox|swiftfox"] in my script so I didn't have to have multiple scripts doing exactly the same thing.  (Of course I could just use INTERESTED_WINDOWS = ["fox"] but I would prefer to be more verbose if possible.)

       
      • Tim Burrell

        Tim Burrell - 2007-07-18

        Excellent, good deal!  In the next version I'll add way to specify negative matches, so you can say match all things that contain "mouse" but not "mouse emulation" or something.

        Also, yes you can match multiple windows.  Just do the following:

        INTERESTED_WINDOWS = ["firefox", "swiftfox"]

        Tim.

         

Log in to post a comment.