1. Download the latest LinuxWacom.
2. Install the following packages through Synaptic:
- tcl8.4
- tcl8.4-dev
- tk8.4
- tk8.4-dev
- xserver-xorg-dev
- libncurses5-dev
3. Unpack the linuxwacom tar.gz
4. Modify the /src/xdrv/wcmISDV4.c as follows (add the lines in blue):
/* Coordinate data bit check */5. Modify the src/xdrv/wcmCommon.c as follows (one change in blue)
if (data[0] & 0x40)
{
if ((int)data[0] == 0xc1)
{
if (data[1] & 0x07)
{
ds = &common->wcmChannel[0].work;
/* Now fool it into thiking it's in proximity */
ds->proximity = 1;
ds->buttons = ((data[1] & 0x07) << 3);
xf86WcmEvent(common,0,ds);
}
}
return common->wcmPktLength;
}
}
/*****************************************************************************6. Go to the folder in the Terminal and type:
* xf86WcmSendButtons --
* Send button events by comparing the current button mask with the
* previous one.
****************************************************************************/
static void xf86WcmSendButtons(LocalDevicePtr local, int buttons, int rx, int ry,
int rz, int v3, int v4, int v5)
{
int button, mask, bsent = 0;
WacomDevicePtr priv = (WacomDevicePtr) local->private;
WacomCommonPtr common = priv->common;
DBG(6, priv->debugLevel, ErrorF("xf86WcmSendButtons "
"buttons=%d for %s\n", buttons, local->name));
/* Tablet PC buttons. */
if ( common->wcmTPCButton && !IsCursor(priv) && !IsPad(priv) && !IsEraser(priv) )
{
if ( buttons & 57 )
{
if ( !(priv->flags & TPCBUTTONS_FLAG) )
{
priv->flags |= TPCBUTTONS_FLAG;
bsent = 0;
/* send all pressed buttons down */
for (button=2; button<=MAX_BUTTONS; button++) { mask = 1 << (button-1); if ( buttons & mask ) { bsent = 1; /* set to the configured button */ sendAButton(local, button-1, 1, rx, ry, rz, v3, v4, v5); } }
./configure7. Now you should have a wacom_drv.so in the /src/xdrv directory. Make a backup of your old wacom_drv.so:
sudo make
sudo mv /usr/lib/xorg/modules/input/wacom_drv.so /usr/lib/xorg/modules/input/wacom_drv.so.bakand copy the new one over:
cd src/xdrv8. Edit your profile:
sudo cp wacom_drv.so /usr/lib/xorg/modules/input/wacom_drv.so
sudo nano /etc/profile
# enable buttons on HP TC4400
xsetwacom set stylus Button2 "3"
xsetwacom set stylus Button4 "core key shift F1"
xsetwacom set stylus Button5 "core key shift F2"
xsetwacom set stylus Button6 "core key shift F3"
9. Reboot.
10. Set the global keybindings and keybinding commands in the Configuration Editor /Apps /Metacity:
Global Keybindings:------------
run_command_1F1
run_command_2F2
run_command_3F3
Keybinding Commands:
command_1 xournal
command_2 sh /usr/bin/rotate.sh
command_3 [onscreen keyboard - I don't use it yet]
Thanks to Ubuntu Forum Community.
Nincsenek megjegyzések:
Megjegyzés küldése