• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!



Page history last edited by PBworks 16 years, 3 months ago


Home > Trackball


The AG-5's cursor control device is a small mechanical trackball with a resolution of 200 dpi (dots per inch). With a mechanical trackball, light-emitting diodes (LEDs) transmit light through the module's X and Y wheels, allowing optical sensors behind those wheels to detect the ball's X and Y movement and reflect that movement on the screen. It works much like an upside down mechanical mouse, the operation of which is explained on the How Stuff Works website.


Opening the Trackball

Bend a paperclip into the shape of a U. Place each end in each indent located at the 3:00 and 9:00 position in the band surrounding the trackball. Then turn the band about 30 degrees counter-clockwise so the arrow points to the 10:30 position (315 degrees or Northwest position). Turn the AlphaGrip over and if the disk and ball don't fall out, slightly turn the disk one way and then the other until they come loose.

Brass Roller

Warning! -- taking apart an AlphaGrip may be difficult for those who have never disassembled electronics. Please be careful if you attempt this procedure.

If the brass roller for the trackball falls out of place, it can be reinserted by the end-user if he or she is familiar with taking electronics apart. Click here to see a picture of the brass roller in a new window. The roller is locked in position by two “sliding” plastic blocks on both sides.


Open the AG-5 by unscrewing the eight screws on the back of the Grip. Take the bottom rubber bumpers out. Once you find the roller, unplug the three groups of wires holding the trackball assembly to the circuit board. Then unscrew the six screws holding the trackball assembly in place. Now you have access to the brass roller's original position. Slide the plastic blocks to the side and reinsert the roller. Make sure it is locked into place by sliding the plastic blocks back in. Reassemble the Grip and you're back in business.


If you have any problems with this procedure, email us at support@alphagrips.com.

Cleaning the ball and rollers

Dip a cotton swab (Q-Tip) into rubbing alcohol and clean the three metal rollers inside the trackball mechanism. Give the alcohol 2-3 minutes to evaporate. If that doesn't work, try WD-40 on the ends of the rollers. The rollers should turn easily, but should not slip when they come in contact with the trackball. So make sure to wipe off the parts of the rollers that come in contact with the trackball itself. Use a q-tip if you can't reach the rollers. It has been suggested (though not tested) to use plastidip on the ball to increase friction.


If cleaning the trackball does not restore performance, please contact us at support@AlphaGrip.com.

Separate Speed Settings for AG-5 on Ubunto Linux 6.06

This article will show you how to setup your AG-5 on Ubuntu in such a way that you can hotplug your AG-5 and have an independent trackball speed setting than your primary mouse. This means that you will be able to use your primary pointing device along with the AG-5 at the same time, without messing up the pointer speed of your primary pointing device (be it a mouse or another trackball or a gesture pad)!


This is something that your Windows friends can't do!


Note that the instructions in this how-to is generic enough that it should work with most secondary pointing devices, not just the AG-5 trackball.


REQUIREMENTS: xserver, xinput

OPTIONAL: evdev driver for xserver.



- Linux distro: Ubuntu 6.06

- Primary pointing device: Logitech MX510

- Secondary pointing device: AG-5 Trackball


Here's what we're going to do: In Ubuntu 6.06, the event handler path assigned to input devices are determined dynamically, meaning everytime you unplug and re-plugin an USB input device or when you reboot, its input handler may change. So, we'll need to make udev rule to bind the AG-5's modalias (an unique ID number) to the AG-5. Next we modify the xorg.conf so that we have a seperately configured input device our AG-5, then we'll use xinput to setup a separate mouse acceleration and threshold value for the AG-5.

Creating a static input device handler

To find out what input handler handles your AG-5, plug the AG-5 in and type in the following in your console:


#cat /proc/bus/input/devices


You should have something like the following in your output:

I: Bus=0003 Vendor=0510 Product=100b Version=0102

N: Name="SEJIN AlphaGrip AG5 USB Keyboard"

P: Phys=usb-0000:00:02.0-1.1/input0

S: Sysfs=/class/input/input5

H: Handlers=kbd event3

B: EV=120003

B: KEY=1000000000007 ff800000000007ff febeffdfffefffff fffffffffffffffe

B: LED=1f


I: Bus=0003 Vendor=0510 Product=100b Version=0102

N: Name="SEJIN AlphaGrip AG5 USB Keyboard"

P: Phys=usb-0000:00:02.0-1.1/input1

S: Sysfs=/class/input/input6

H: Handlers=mouse1 event4 ts1

B: EV=7

B: KEY=70000 0 0 0 0

B: REL=103


Now, both devices have the same name, but one is the trackball and one is the keyboard. The trackball is the one with reference to "mouse" in the "Handlers" line. Now copy the "Sysfs" path. We're going to use this path to find out the "modalias" (an unique ID) for the AG-5 trackball.


#udevinfo -a -p '/sys/class/input/input6' |grep modalias |grep usb


Note that you'll need to add the "/sys" part manually. You should get something like the following:


Using the modalias, we are going to bind an event handler to the AG-5 trackball. Now, create a new udev rule file:

#sudo gedit /etc/udev/rules.d/10-local.rules

The name of the file used here is suggested in here: http://www.reactivated.net/writing_udev_rules.html#files.


We'll need to think of an event handler name that we want to bind the AG-5 trackball to. In theory, we could just use any event handler name or even a symlink linked to the device, however, Ubuntu seems to be very particular in setting up event handlers. So, in essence, Ubuntu will only accept input devices linked to an event handler, and not a symlink. AND, the event handler has to be one that is not already used.


So, browse /dev/input/ a bit and find out what's the last used event handler number, we're going to use a number that is greater than that. In my case, I used event8. Put the following in the file and save it (make sure you replace the modalias and the event handler name with your own):




Now, lets activate the new rule file on our AG-5 by unplugging the AG-5 and replugging it in.

Setting up a secondary input device in xorg.conf

I use the evdev driver for both my Logitech mouse and the AG-5 trackball because it's the most "correct" way of configuring my Logitech mouse and it's pretty darn easy. But in theory, you should be able to use the old xserver mouse driver in this how-to as well.


I won't go into the details of setting your pointing devices up using the evdev driver, for details on that here's a nicely written guide for your reading pleasure: http://wiki.archlinux.org/index.php/Get_All_Mouse_Buttons_Working


First, create another InputDevice section:

Section "InputDevice"

Identifier "Mouse2"

Driver "evdev"

Option "Device" "/dev/input/event8"


Note that the "Device" path is the path that we created by binding a static event handler to the trackball. If the event handler changed dynamically, xserver will crash, that's why we went through the extra step to create a static event handler. The Identifier "Mouse2" is used because Ubuntu doesn't seem to like more creative names. Using a more self documenting name like "AG5Trackball" will crash xserver.


Next, add a new "InputDevice" line to your "ServerLayout" section.

Section "ServerLayout"

Identifier "Layout0"

Screen 0 "Screen0" 0 0

InputDevice "Keyboard0" "CoreKeyboard"

InputDevice "Mouse1" "CorePointer"

InputDevice "Mouse2" "SendCoreEvents"


It's important that the "SendCoreEvents" is appended at the end of "Mouse2", this is what tells xserver that "Mouse2" is not a primary input device and allows you to configure it independently. Now you can logout and press alt-ctrl-backspace to restart xserver. In the event that xserver crashes, you can disable the secondary mouse by editing xorg.conf with a console text editor and commenting out the "Mouse2" line in the "ServerLayout" section and restart again.

Configuring the AG-5 trackball speed

We're almost there! If you haven't yet, install the xinput package from apt-get or synaptic. We're going to use this little utility to configure the mouse speed of our AG-5 trackball.


Run the following command in a console:

#/usr/X11R6/bin/xinput list

Look for the section with "Mouse2" in it:

"Mouse2-usb-0000:00:02.0-1.1/input1" id=0 [XExtensionDevice]

Num_buttons is 5

Num_axes is 3

Mode is Relative

Motion_buffer is 256

Axis 0 :

Min_value is 0

Max_value is 0

Resolution is 0

Axis 1 :

Min_value is 0

Max_value is 0

Resolution is 0

Axis 2 :

Min_value is 0

Max_value is 0

Resolution is 0

Copy the text between the quotation marks, that's the name you'll be using in xinput to configure the AG-5 trackball. Now lets do some testing. Enter the following in your console, replacing the text between the quotation marks with your own:

#/usr/X11R6/bin/xinput set-ptr-feedback

"Mouse2-usb-0000:00:02.0-1.1/input1" 2 7 1

The acceleration parameters are the three numbers at the end of the line. "2" is the threshold before acceleration takes place. The higher the threshold, the more you'll need to move before the pointer accelerates away. The "7" is the numerator and the "1" is the denominator for the acceleration value. You may want to tweak these values to your own liking in the console first. You'll notice that once the setting is applied, it will retain even after your mouse is unplugged and re-plugged in. However, a restart of Gnome will reset whatever setting we just made.


To make Gnome remember the settings, we'll add the xinput command that we just made to the startup programs. From the Gnome taskbar menu, open up System -> Preferences -> Sessions. Click on the "Startup Programs" tab and add command we used as a Startup Command.

Drifting Mouse

It may happen that the mouse pointer will drift towards an edge of the screen. This has been related to AutoHotkey scripts that modify mouse speed. If you use such a script, try disabling it to see if the drifting stops. If it does, consider using an alternative script or modifying the current one.


Another cause may be other pointing devices connected to the computer. Try disconnecting any devices to see if they are responsible for this phenomena.

Drifting Mouse Answer

Good news for people who like to use a mouse booster in Auto Hotkey with a multi monitor setup: I have found 1) what causes the drifting on the secondary monitor and 2) how to fix it!


It turns out that the MouseMove command has a bug when using negative coordinates. This only affects monitors that are displayed to the left of and/or above the primary monitor. The mouse will actually move 1 pixel towards the origin (upper left corner of the primary monitor) of the negative coordinate (down or right depending on which is the negative coordinate) on every iteration of the script. You can verify this by making a stationary "booster" script that moves the mouse to the location where it already is:

MouseGetPos, PosX, PosY

MouseMove, PosX, PosY, 0

This trivial script exhibits mouse drifting if your secondary display is to the left of and/or above your primary monitor. I found that MouseGetPos does return the correct values, but that the point -1,-1 maps to 0,0 in the MouseMove command.


The way to fix this is to subtract 1 from the negative coordinate before you call MouseMove. For example, in Carl Andersen's multi monitor mouse booster, just add the following code directly before the MouseMove command:

if (AdjMousePosx < 0) {

AdjMousePosx -= 1


if (AdjMousePosy < 0) {

AdjMousePosy -= 1


Hopefully this will solve the problem as it did for me :-)








It is possible to use an AlphaGrip in combination with pointing device other than the built-in trackball. However, switching hands between the AlphaGrip and the other device may be cumbersome. If you don't want to use the built-in trackball, you may want to consider modifying the hardware of the AlphaGrip to add a different trackball or a trackpoint. You will probably have to disassemble a working device to intergrate it with the AlphaGrip. See Andersen's modifications for more information on adding alternative pointing devices and other modifications.

Comments (0)

You don't have permission to comment on this page.