Good news Favux. It worked! Now I have the 3 bezel buttons of my tc4400 working.
Basically I applied the following two patches to xf86-input-wacom driver:
- frankenserver's - from http://forums.linuxmint.com/viewtopic.php?f=42&t=110408 (section II), thanks to you =D>
- added the lines below to wcmIDSV4.c:801
Code:
/* Soft keys outside tabletPC TC4400 */
if ((data[0] & 0xC1)==0xC1) {
switch (data[1]) {
case 0x01: /* Edit */
/*DBG(8, priv->debugLevel, ErrorF("isdv4Parse special key EDIT\n"));*/
/*Simulate mouse button 15 press when EDIT */
xf86PostButtonEvent(pInfo->dev, 1, 15, 1,0,0);
xf86PostButtonEvent(pInfo->dev, 1, 15, 0,0,0);
break;
case 0x02: /* Recicle */
/*DBG(8, priv->debugLevel, ErrorF("isdv4Parse special key RECICLE\n"));*/
/*Simulate mouse button 16 press when RECICLE */
xf86PostButtonEvent(pInfo->dev, 1, 16, 1,0,0);
xf86PostButtonEvent(pInfo->dev, 1, 16, 0,0,0);
break;
case 0x04: /* Quick */
/*DBG(8, priv->debugLevel, ErrorF("isdv4Parse special key QUICK\n"));*/
/*Simulate mouse button 17 press when QUICK */
xf86PostButtonEvent(pInfo->dev, 1, 17, 1,0,0);
xf86PostButtonEvent(pInfo->dev, 1, 17, 0,0,0);
break;
default: /* Not reconized */
break;
}
}
(Note that I haven't used Erich's patch here, but a modified version from
this one of Igor Galarraga's.)
I downloaded xf86-input-wacom-0.19.0, made these two changes, compiled and installed. After reboot, I started catching bezel button signals with xev.
Then, all I had to do was using xbindkeys to bind mouse buttons 15, 16 and 17 respectively to Writing tool, Rotate and Q-Menu buttons. So I added the following lines to my .xbindkeysrc config file:
Code:
# Binds TC4400's bezel buttons
# Writing tool
# "MyScriptStylus" in my case, but "Cellwriter" is a more commom choice
"MyScriptStylus"
b:15 + Release
# Rotate
# Used a script provided by Brancaleone at http://ubuntuforums.org/showthread.php?t=1483623&page=4
# Magick-Rotation is still responsible for automatic rotation when switching the screen from one mode to another; while this sh script deals with Rotate bezel button. Perhaps I could use only Magick-Rotation features here.
"/usr/bin/rotator"
b:16 + Release
# Q-Menu
# Still trying to open Unity's launcher panel here (without using xdotool), but you can bind it to whatever you want. In my case, I set Unity's Launcher to hide when not focused, so it would be nice if I could use Q button to open/focus it. I couldn't yet find a way to do that without xdotool though.
"[do something]"
b:17 + Release
This is it! Thank you very much. Your tip about frankenserver's patch was crucial.
Bookmarks