Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 44

Thread: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

  1. #21
    Join Date
    Mar 2011
    Beans
    1

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Can you give any explanation on how to turn that code you posted into a working program?

  2. #22
    Join Date
    Jun 2009
    Beans
    9
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    +1

    It would be great to learn a more about how this works for noobs like me.

    Of course, it would be even better if the Mouse Preferences control panel had a scroll adjustment slider!

  3. #23
    Join Date
    Dec 2005
    Beans
    25

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Here is a fantastic simple solution that worked for me:

    See: http://ubuntuforums.org/showthread.p...24#post8583324

  4. #24
    Join Date
    Dec 2005
    Beans
    25

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    I had same problem with all the wireless mice I used in all application windows, not just Firefox. The scrolling was hypersensitive. The Firefox settings did nothing, and would not have been a global solution.

    BUT this fantastically simple solution worked for me:

    http://ubuntuforums.org/showthread.p...24#post8583324

    Basically, when the PC is running, unplug the wireless USB dongle count to 3 and plug it back in. All fixed. Still no way to micro adjust, but I get a sensible wheel sensitivity after doing this.

  5. #25
    Join Date
    Aug 2010
    Beans
    12

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Quote Originally Posted by The Chef View Post
    I had same problem with all the wireless mice I used in all application windows, not just Firefox. The scrolling was hypersensitive. The Firefox settings did nothing, and would not have been a global solution.

    BUT this fantastically simple solution worked for me:

    http://ubuntuforums.org/showthread.p...24#post8583324

    Basically, when the PC is running, unplug the wireless USB dongle count to 3 and plug it back in. All fixed. Still no way to micro adjust, but I get a sensible wheel sensitivity after doing this.
    The link is incomplete/mistyped

  6. #26
    Join Date
    Dec 2005
    Beans
    25

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Hi. Yeah, seems to have disappeared. It was a huge thread with about 175 pages. Moved maybe? Anyhow, the problem seems to arise when you dual boot into Windows, and Windows leaves the mouse wheel sensitivity extremely high, even after a cold boot into Ubuntu. Which, I know, sounds pretty weird. Anyway, the fix that is shown in a number of threads is to simply unplug the USB wireless dongle and plug it back in when Ubuntu is running. Then the mouse wheel is back to a normal 3 lines per click behaviour, at least until the next time you boot into Windows. Sorry about the broken link.

  7. #27
    Join Date
    Jul 2006
    Location
    Rio de Janeiro - Brazil
    Beans
    6
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Yes, you are correct!

    I have the same crazy problem and the solution is unplug the usb and plug again.

    That's it!

    Best regards,

    Junix

  8. #28
    Join Date
    Nov 2010
    Location
    Atlanta, GA
    Beans
    54
    Distro
    Ubuntu

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Vote for a solution here, I'm still trying to have developers do something about it for MONTHS.

    I've tried getting "Gestikk" but failed at making it work, and I feel I should not have to fill my mind with such garbage just to use it once for scrolling.

    Vote here:



    Add your vote if you want a GLOBAL (Not just Firefox) solution to the scrolling which does not require as many CODES and applications in Terminal (Sure, codes are easy to paste, except when they fail for x or y reason).

    Something like this should be far more automatic.
    Last edited by Tekno.Statik; July 24th, 2011 at 06:37 PM.

  9. #29
    Join Date
    Jan 2010
    Beans
    16

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Hey Nowaker,

    thanks for your wonderful program! It works like a charm, if you want to accelerate the mouse wheel!

    Here is what I did to get your program killed and executed automatically, when the mouse is plugged in. Create the file /etc/udev/rules.d/xwheeldoubler as root and paste this content:
    Code:
    SUBSYSTEM=="input", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0040", RUN+="/home/YOUR-NAME/bin/xwheeldoubler.sh /dev/input/%k &"
    Change the vendor id and product id appropriately to your mouse. Get the info with

    Code:
    lsusb
    while the mouse is attached.

    Create the file /home/YOUR-NAME/bin/xwheeldoubler.sh, chmod 755 and paste the following:
    Code:
    #!/bin/bash
    
    # Desktop user
    USERNAME="YOUR-NAME"
    
    # Display to operate on
    export DISPLAY=":0.0"
    
    if [ "$1" == "/dev/input/event9" ]; then
      if [ -c "$1" ]; then
        if [ -r "/var/run/gdm" ]; then
          export XAUTHORITY="`ls /var/run/gdm/*/database|grep auth-for-$USERNAME-`"
        fi
        /home/$USERNAME/bin/xwheeldoubler $1 5 &
      else
        killall xwheeldoubler;
      fi
    fi
    Remember to change YOUR-NAME to your desktop username and to change event9. The right eventX for your mouse can be seen in /dev/input/by-id or /dev/input/by-path. Copy the xwheeldoubler binary to the folder /home/YOUR-NAME/bin. The multiply factor here is 5. Change it, if you want. The XAUTHORITY variable is necessary for xwheeldoubler to talk to your X server.

    I like Linux

    By the way: if you have a notebook with touchpad and you want to accelerate this, too, you can put the following in /etc/X11/xorg.conf:
    Code:
    Section "InputDevice"
        # generated from default
        Identifier     "Mouse0"
        Driver         "synaptics"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
        # accelerate vertical scrolling (default: 25)
        Option         "VertScrollDelta" "6"
    EndSection
    It depends on your xorg.conf, if you have to modify you existing InputDevice section, or if you have to add a new one. For Firefox, you can also change the wheel sensitivity, by typing about:config as address and look for the key mousewheel.withnokey.sysnumlines. Set it to false and modify mousewheel.withnokey.numlines. I changed it from 6 to 3, as otherwise Firefox would scroll too fast.


    Quote Originally Posted by Nowaker View Post
    Code:
    sudo chmod +r /dev/input/event2; xwheeldoubler /dev/input/event2 3 &
    /dev/input/event2 - your mouse
    3 - how many times faster

    AFAIR, libxtst6 package is needed (libxtst-dev for compiling).
    Compiled version for amd64 in attachment. The source code below.

    Code:
    gcc -lXtst xwheeldoubler.c
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <linux/input.h>
    #include <sys/types.h>
    #include <fcntl.h>
    #include <X11/extensions/XTest.h>
    
    Display *dpy;
    int file;
    
    void cleanup()
    {
        if(file) {
            close(file);
        }
        if(dpy) {
            XCloseDisplay(dpy); 
        }
    }
    
    int main(int argc, const char** argv)
    {
        if(argc < 3) {
            printf("Usage: %s <event_device> <how_many_times_faster>\n", argv[0]);
            return 1;
        }
    
        atexit(cleanup);
        if((file = open(argv[1], O_RDONLY)) <= 0) {
            perror("open");
            return 2;
        }
        struct input_event event;
        if ((dpy = XOpenDisplay(NULL)) == NULL) {
            fprintf(stderr, "Can't open display\n"); 
            return 3;
        }
    
        int times = atoi(argv[2]) - 1;
        size_t n;
        while((n = read(file, &event, sizeof(struct input_event)))>0) {
            if(event.type == 0x02 && event.code == 0x08) {
                if(event.value > 0) {
                    int i = 0;
                    for (; i < times; i++) {
                        XTestFakeButtonEvent(dpy, 4, True, CurrentTime);
                        XTestFakeButtonEvent(dpy, 4, False, CurrentTime);
                    }
                } else {
                    int i = 0;
                    for (; i < times; i++) {
                        XTestFakeButtonEvent(dpy, 5, True, CurrentTime);
                        XTestFakeButtonEvent(dpy, 5, False, CurrentTime);
                    }
                }
                XFlush(dpy);
            }
        }
        return 0;
    }
    Known bugs: 100% cpu after pulling in/out any USB device. Feel free to fix it. ;-]

    Source code licensed under GNU GPL v3.
    Last edited by Danstroem; September 2nd, 2011 at 05:31 AM. Reason: bugfix

  10. #30
    Join Date
    Jun 2009
    Beans
    60

    Re: Scroll (wheel) speed, mouse acceleration, threshold, sensivity

    Hi Danstroem

    I actually can't understand how to find eventX?
    Please have a look at this

    Code:
    $ ls /dev/input
    by-id    event0  event2  event4  js0   mouse0
    by-path  event1  event3  event5  mice  mouse1
    
    $ ls /dev/input/by-id
    usb-073a_2230-event-mouse
    usb-073a_2230-mouse
    usb-Logitech_USB_Receiver-event-kbd
    usb-Logitech_USB_Receiver-event-mouse
    usb-Logitech_USB_Receiver-if01-event-mouse
    usb-Logitech_USB_Receiver-if01-mouse
    usb-Logitech_USB_Receiver-mouse
    Now what is eventId for my mouse?
    Note: My keyboard and mouse have one receiver.

Page 3 of 5 FirstFirst 12345 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •