Skip to content

mentallyinspired/Kensington-Expert-Mouse-Pro-Linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Kensington Expert Mouse Pro Linux conf

This guide (and config) will give you a fully working Kensington Expert Mouse Pro under Linux (USB version).

The numbering of each key are as in the picture above. This is usefull if you want to reasign the functions in conf file under ButtonMapping. Note that the normal mapping is 1 - 15 in order, but have been rearanged in the conf file for the functionality mentioned bellow.

With the following settings

  • Key nr 1 for normal keypress
  • Key nr 3 for forward
  • Key nr 3 (while held down) for scrolling with trackball
  • Key nr 8 for back
  • Key nr 9 for right click
  • Key nr 10-15 (buttons numbered 1-6) mapped to F19-F24
  • Key nr 2 (pressing the scroll wheel) for middle mouse click
  • 4 and 5 are left as is, they are for scrolling with the scroll wheel

Base config

Download the kensington-trackball.conf file and place it in /etc/X11/xorg.conf.d/

If the conf doesn't work after restarting x then you need to modify MatchProduct or replace it with MatchUSBID.

Get MatchProduct name

Install xorg-xinput if not already installed, then run:

$ xinput list

Which gives:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Kensington Kensington USB/PS2 Trackball   id=14   [slave  pointer  (2)]

The device name should be under Virtual core pointer in the output. Replace the name in the conf file with the output name

Like so:

  MatchProduct "Kensington Kensington USB/PS2 Trackball"
  # use the output name from 'xinput list'

Replace MatchProduct with MatchUSBID (optional)

First get the USBID of the trackball.

$ lsusb

Which gives:

Bus 003 Device 005: ID 047d:1002 Kensington Expert Mouse Pro

Then replace in the conf file

  MatchProduct "Kensington Kensington USB/PS2 Trackball"

with

  MatchUSBID "047d:1002"
  # use your actual USBID, could be the same as this

Settings for left handed

If you are left handed and want to mirror the settings of the four keys around the trackball then replace ButtonMapping and ScrollButton with:

  Option "ScrollButton" "1"
  Option "ButtonMapping" "3 2 8 4 5 6 7 9 1 10 11 12 13 14 15"

Map the top 1-6 buttons to F19-F24 (optional)

Here we will map the blue top buttons (numbered 1-6) to F19 trough F24 which will allow us to make use of them like any other keyboard button. This is useful when assigning keyboard shortcuts.

Install dependencies

  • xorg-xmodmap
  • xautomation
  • xbindkeys

Check for unused keycodes

Check with

$ xmodmap -pke

Note down six unused keycodes, these will be used for mapping F19-F24.

Create new keycode bindings for F19-F24

Create and edit file for new keycode assignments

$ nano ~/.Xmodmap

Bind F19-F24 keys to unused keycodes, bellow keycodes ware empty for me which I assigned to F19-F24.

keycode 247 = F19
keycode 248 = F20
keycode 249 = F21
keycode 250 = F22
keycode 252 = F23
keycode 253 = F24

Then update xmodmap:

$ xmodmap ~/.Xmodmap

Create a new file for mapping F19-F24 to the blue (1-6) buttons on the trackball

$ nano ~/.xbindkeysrc

Map the blue (1-6) keys to F19-F24

"xte 'key F19'"
b:10

"xte 'key F20'"
b:11

"xte 'key F21'"
b:12

"xte 'key F22'"
b:13

"xte 'key F23'"
b:14

"xte 'key F24'"
b:15

Edit .xinitrc to autostart xbindkeys

$ nano ~/.xinitrc

add xbindkeys BEFORE the line that starts your window manager or DE. This is to ensure that the conf in ~/.xbindkeysrc gets activated before your window manager starts.

xbindkeys
DEFAULT_SESSION=yourWindowManager

Check functionality of the 1-6 keys

Run

$ xbindkeys --key

Press one of the six buttons within the rectangular area. You should get something like this:

"(Scheme function)"
    m:0x0 + c:247
    F19

Which is for button 1 that is mapped to F19 on keycode 247.

Congratulation, you should now have a fully functional Kensington Expert Mouse Pro under Linux.

About

A guide on making your Kensington Expert Mouse Pro work fully under Linux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published