Announcement

Collapse
No announcement yet.

Please help me configure my mouse scroll tilt with Xbindkeys...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Please help me configure my mouse scroll tilt with Xbindkeys...

    Hi all,

    I am trying to set my mouse's scroll wheel to do a:

    control+t when right tilting

    and:

    control+w when left tilting

    I ran XEV and it said that right tilt is button 7 and left tilt is button 6 on my logitech mx1100 mouse.

    My xbindkeysrc file looks like this:



    Code:
    "/usr/bin/xvkbd -xsendevent -text "\[ctrl]\[t]""
    m:0x10 + b:7
    "/usr/bin/xvkbd -xsendevent -text "\[ctrl]\[w]""
    m:0x10 + b:6
    I am sure xbindkeys is running since I can see it from the htop process viewer.

    What am I doing wrong? With the config above nothing happens. I am using Jaunty. Thanks.
    8.10 Intrepid

    #2
    Re: Please help me configure my mouse scroll tilt with Xbindkeys...

    I figured it out...



    Code:
    "/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[F4]""
    m:0x10 + b:7
    "/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[n]""
    m:0x10 + b:6

    Now I can tilt right and close a tab or window in firefox. Tilting left opens a new window. Grin
    8.10 Intrepid

    Comment


      #3
      Re: Please help me configure my mouse scroll tilt with Xbindkeys...

      Hi,
      I'm trying to get the navigate-back function in dolphin on my fourth mouse button (actually button 8).
      I tried xbindkeys, but the only thing it does is that is renders the mouse button entirely non-functional in all programs. It usually has the "back" function in all mozilla apps and used to have that function in windows as well. But Dolphin and most (all?) KDE apps don't recognize it...

      Any ideas how I could get that working? it must be possible, since mozilla apps can do it too...

      the xbindingsrc file I tried looks like this:
      Code:
      ###########################
      # xbindkeys configuration #
      ###########################
      #
      # Version: 0.1.3
      #
      # If you edit this, do not forget to uncomment any lines that you change.
      # The pound(#) symbol may be used anywhere for comments.
      #
      # A list of keys is in /usr/include/X11/keysym.h and in
      # /usr/include/X11/keysymdef.h 
      # The XK_ is not needed. 
      #
      # List of modifier (on my keyboard): 
      #  Control, Shift, Mod1 (Alt), Mod2 (NumLock), 
      #  Mod3 (CapsLock), Mod4, Mod5 (Scroll). 
      #
      # Another way to specifie a key is to use 'xev' and set the 
      # keycode with c:nnn or the modifier with m:nnn where nnn is 
      # the keycode or the state returned by xev 
      #
      # This file is created by xbindkey_config 
      # The structure is : 
      # # Remark 
      # "command" 
      # m:xxx + c:xxx 
      # Shift+... 
      
      
      
      
      #keystate_numlock = enable
      #keystate_scrolllock = enable
      #keystate_capslock = enable
      
      
      
      #Remark
      "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
       b:8
        
      
      #
      # End of xbindkeys configuration
      The "#Remark" section is the actual config.

      I'm sure xbindkeys is running (it's in System Activity) and I kill and restart it after every change... and it renders the mouse button useless, so it must be doing something...

      Comment


        #4
        Re: Please help me configure my mouse scroll tilt with Xbindkeys...

        Sorry for the late reply...

        The only difference I can see between your config and mine is the xterm:

        "m:0x10"


        I had that in mine but you did not in your config file. I read it here:

        http://www.linux.com/archive/feature/59494


        from that link:

        XBindKeys also accepts raw keycodes. If you wanted to use Ctrl-Shift-m to open an xterm, you could add it to the config file like this:

        #Using keycodes
        "xterm"
        m:0x5 + c:58

        The first part of the entry, m:0x5 is the modifier key -- in this case Ctrl and Shift pressed together. If you just press the Shift key, it would be m:0x1, and the Control key by itself would be m:0x4. The second part, c:58, is m by itself.

        What if you don't know the keycode for a key or key combination? No problem. Run xbindkeys -k from a terminal (you'll need to see its output), and it will display a small dialog box. Make sure that box has focus, and press the key or keys that you want to get the output for.
        So, I would say open up a terminal and try xbindkeys -k. And press the buttons you want to use with your mouse one by one. Then look a the output in the terminal. That will give you the info you need.

        Also, remember that capital letters give you different functionality or will make it just not work at all. That is a problem I ran into and had to correct. I couldn't use "\[Control_L]\[N]", I had to use "\[Control_L]\[n]".


        Killabee44
        8.10 Intrepid

        Comment


          #5
          Re: Please help me configure my mouse scroll tilt with Xbindkeys...

          Thanks for the reply.

          I tried xbindkeys -k... it does not seem to recognize any of my mouse buttons... when I place the cursor inside the window and press a mouse button, nothing happens... but when I hit a key, it spits out the code... (always in the form m:0x0 + ...)

          Anyway, my mouse buttons do seem to work, because the following assignment works perfectly fine!

          Code:
          # start Dolphin
          "dolphin"
          m:0x0 + b:8
          But emulating keyboard shortcut does not work... the problem is with the "/usr/bin/xvkbd -xsendevent -text "...""-command I presume... I tried different things and nothing has any effect.

          But anyway, I suspect that this xbindkeys is actually not the solution I'm looking for: when Iassign any function to my fourth mouse button, it looses its navigate-back function in firefox, and I definitely need that! (I'm using firefox more often that dolphin anyway...)

          Chopstick

          Comment


            #6
            Re: Please help me configure my mouse scroll tilt with Xbindkeys...

            The command xbindkeys -k is to find out what xbindkeys sees when you type a key on your keyboard.

            To find out what numbers the mouse buttons are:

            Now, to start the mouse setup, we need to map out the mouse in its "raw" (totally unmapped) state, and understand what buttons are recognized via evdev and what function each of these buttons does in your application(s) of interest, usually file managers and web browsers.

            To do this, open an xterm and type:

            xev | grep -i button
            So, "xev | grep -i button" from a terminal will give you the box that you can click each mouse button into to find out what the button numbers are.

            From this site:

            http://wiki.archlinux.org/index.php/MX1000_Buttons
            8.10 Intrepid

            Comment


              #7
              Re: Please help me configure my mouse scroll tilt with Xbindkeys...

              I already know the xev command - that's how I found out that it is button 8...

              As I said, the key--bindings are actually not the problem, they work fine (e.g. I can open Dolphin with my fourth mouse button); the problem is that the command to enter a keyboard short-cut does not seem to work, it simply doesn't do anything...

              But anyway, this is not going to solve my problem I'm afraid... or is there a way to assign key--board shortcuts in firefox? That might help, too. But then the key-binding problem remains...

              Comment

              Working...
              X