Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mouse Trust MI 6900-Z get all Buttons working.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Fri Jul 13, 2007 5:22 pm    Post subject: Mouse Trust MI 6900-Z get all Buttons working. Reply with quote

Ok, I bought that queer thing:
http://www.trust.com/products/default.aspx?item=14914

And I have some problems to get the side-buttons working. First a graphical description of the mouse-buttons:
Code:

  -----------
  | 1     2 |
  |         |
  |    3    |
  |   5 6   |
  |    4    |
  |         |
 7|         |
 8|         |
 9|         |
  |         |
  -----------
The mouse-wheel is scrollable up and down and clickable to the left and to the right. There's no middle mouse-button. The official description says something of 7 mouse-buttons and this is what evdev recognizes too (more or less).

First I tried xev to identify the buttons but xev gives me for several buttons the same keycodes. Then I found this programm evtest.c. With it you can test the real keycodes even if xev doesn't recognize it correctly. After a short test I found out, that several buttons use 2 codes. I guess the windows driver identifies the buttons in a manner that it test if one code is sent and another not.

Example:
Keycode 273 and keycode 275 means the middle side button (Button 8 ) is pressed
Keycode 273 and not keycode 275 means the right button (Button 2) is pressed
Not keycode 273 and keycode 275 means the lower side button (Button 9) is pressed

xev finds only the second code if there are more codes than one available.

And now the recognition table of the events:
(Columns: Mouse-Button of my graphics, Identifier what xev finds, the rest are the issues of event.c)
Code:

Mouse-Button   xev   Type          Code               Value (Down/Up)
---------------------------------------------------------------------
1               1    1 (Key)       272 (LeftBtn)      1 0
---------------------------------------------------------------------
2               3    1 (Key)       273 (RightBtn)     1 0
---------------------------------------------------------------------
3               4    2 (Relative)  8 (Wheel)          1
---------------------------------------------------------------------
4               5    2 (Relative)  8 (Wheel)          -1
---------------------------------------------------------------------
5               6    1 (Key)       274 (Middle Btn)   1 0
5               6    1 (Key)       275 (Side Btn)     1 0
---------------------------------------------------------------------
6               7    1 (Key)       274 (Middle Btn)   1 0
6               7    1 (Key)       276 (Extra Btn)    1 0
---------------------------------------------------------------------
7               7    1 (Key)       276 (Extra Btn)    1 0
---------------------------------------------------------------------
8               6    1 (Key)       273 (RightBtn)     1 0
8               6    1 (Key)       275 (Side Btn)     1 0
---------------------------------------------------------------------
9               6    1 (Key)       275 (Side Btn)     1 0
---------------------------------------------------------------------

The problem is now that the programms react to all the mouse events. For example: Opera uses the mouse events side button and extra button to navigate next and back (keycodes 275 and 276). Also it uses the same buttons to paste some text (keycode 274). If I want to paste some text and press the mouse wheel to the left, opera pastes the text and in the same moment it calls the page visited before.

Thus I guess I have to remap / route the codes to different key events. Searching the net I found evrouter. But that's not exactly what I need. Because I don't think, evrouter can handle logical expressions of the mouse events (a && !b). Unfortunately evdev isn't able to handle this.

So how to get the side buttons working?

Config:
/etc/X11/xorg.conf:

    Identifier  "Mouse"
    Driver      "evdev"
    Option      "Name"          "HOLTEK Wired Laser Mouse"


/proc/bus/input/devices:

I: Bus=0003 Vendor=05fe Product=3002 Version=0110
N: Name="HOLTEK Wired Laser Mouse"
P: Phys=usb-0000:00:02.1-3/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse0 event1
B: EV=7
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=103


Options in xorg.conf like Buttons, evBits, keyBits, relBits, ButtonMapping don't change anything.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum