

Favux wrote:Hi Amir,
Welcome to Mint forums!
The Mint dev.s hid the Gnome Wacom tablet applet in Mint 14 for some reason. We found out how to get it back on this thread: viewtopic.php?f=208&t=117690
I think the applet handles the touch ring settings but I am not sure. I haven't gotten direct confirmation of that, more like implied confirmation. Also it may depend on what version of the Gnome Wacom tablet applet you are dealing with. Presumably with touch ring support in more recent versions.

Ring=A
RingNumModes=4
} else if (features->type >= INTUOS5S && features->type <= INTUOS5L) {
int i;
/* Touch ring mode switch has no capacitive sensor */
input_report_key(input, BTN_0, (data[3] & 0x01));
/*
* ExpressKeys on Intuos5 have a capacitive sensor in
* addition to the mechanical switch. Switch data is
* stored in data[4], capacitive data in data[5].
*/
for (i = 0; i < 8; i++)
input_report_key(input, BTN_1 + i, data[4] & (1 << i));
if (data[2] & 0x80) {
input_report_abs(input, ABS_WHEEL, (data[2] & 0x7f));
} else {
/* Out of proximity, clear wheel value. */
input_report_abs(input, ABS_WHEEL, 0);
}
if (data[2] | (data[3] & 0x01) | data[4] | data[5]) {
input_report_key(input, wacom->tool[1], 1);
input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
} else {
input_report_key(input, wacom->tool[1], 0);
input_report_abs(input, ABS_MISC, 0);
}
} else {
static int
flags_to_group (WacomButtonFlags flags)
{
if (flags & WACOM_BUTTON_RING_MODESWITCH)
return 1;
if (flags & WACOM_BUTTON_RING2_MODESWITCH)
return 2;
if (flags & WACOM_BUTTON_TOUCHSTRIP_MODESWITCH)
return 3;
if (flags & WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH)
return 4;
return 0;
}
static GList *
gsd_wacom_device_add_ring_modes (WacomDevice *wacom_device,xsetwacom get "Wacom Intuos5 medium pad" Ring
or
xsetwacom get "Wacom Cintiq pad" Ring2

#!/bin/bash
## Get the "Device name" or ID number
## for touch from 'xsetwacom list dev'
DEVICE="Wacom Intuos5 touch M Pen pad"
RING_STATE=`xsetwacom get "$DEVICE" AbsWheelUp`
if [ "$RING_STATE" == "button +4" ]
then
notify-send -t 1500 "Success!"
xsetwacom set "$DEVICE" AbsWheelUp key d
else
notify-send -t 1500 "Woops..."
fi/home/amir/bin/wacom/ringmodes.sh: 8: [: button +4 : unexpected operator
xsetwacom get "Wacom Intuos5 touch M Pen pad" AbsWheelUpxsetwacom get "Wacom Intuos5 touch M Pen pad" AbsWheelDown

xsetwacom set "Wacom Intuos5 touch M Pen pad" Button 1 key (action 1)xsetwacom get "Wacom Intuos5 touch M Pen pad" allOption "RelWheelUp" "button +5 "
Option "RelWheelDown" "+4 "
Option "AbsWheelUp" "+4 "
Option "AbsWheelDown" "+5 "
Option "AbsWheel2Up" "+4 "
Option "AbsWheel2Down" "+5 "
Option "StripLeftUp" "+4 "
Option "StripLeftDown" "+5 "
Option "StripRightUp" "+4 "
Option "StripRightDown" "+5 "


zorbama wrote:Yes, the idea is to cycle the ring's behavior between several states, which will allow me switch between, say, zooming in/out, increasing/decreasing brush size, etc.
xsetwacom set "Wacom Intuos5 touch M Pen pad" Button 1 0
xsetwacom set "Wacom Intuos5 touch M Pen pad" Button 1
1.
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelUp zoom in
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelDown zoom out
2.
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelUp increase brush size
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelDown decrease brush size
3. etc.echo 0 > /tmp/mode_statecat /tmp/mode_state


#!/bin/bash
CHECK=`cat /tmp/mode_state`
if [ "$CHECK" == 1 ]
then
echo 2 > /tmp/mode_state
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelUp "key d"
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelDown "key f"
notify-send -t 1500 "Brush Size"
elif [ "$CHECK" == 2 ]
then
echo 3 > /tmp/mode_state
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelUp "key comma"
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelDown "key period"
notify-send -t 1500 "Zoom"
elif [ "$CHECK" == 3 ]
then
echo 4 > /tmp/mode_state
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelUp "key PgUp"
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelDown "key PgDn"
notify-send -t 1500 "Browse Layers"
else
echo 1 > /tmp/mode_state
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelUp 4
xsetwacom set "Wacom Intuos5 touch M Pen pad" AbsWheelDown 5
notify-send -t 1500 "Scroll"
fi
#!/bin/bash
## Intuos touch ring mode toggle script
##
## Bind Button 1 (center of touch ring) to the script.
## For mode state notification use:
## sudo apt-get install libnotify-bin
## Otherwise comment (#) out the notify-send lines.
## If installed see 'man notify-send'.
if [ ! -f /tmp/mode_state ]; then
echo 0 > /tmp/mode_state
fi
## For DEVICE use "device name" from 'xinput list'.
DEVICE = "Wacom Intuos5 touch M Pen pad"
MODE = `cat /tmp/mode_state`
if [ "$MODE" == 0 ]; then
xsetwacom set "$DEVICE" AbsWheelUp key shift plus # zoom in
xsetwacom set "$DEVICE" AbsWheelDown key minus # zoom out
# echo 0 > /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select
notify-send -t 1500 "Mode 1: Zoom in or out in Gimp."
elif [ "$MODE" == 1 ]; then
xsetwacom set "$DEVICE" AbsWheelUp key alt up # Increase brush radius (must be mapped in GIMP)
xsetwacom set "$DEVICE" AbsWheelDown key alt down # Decrease brush radius (must be mapped in GIMP)
# echo 1 > /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select
notify-send -t 1500 "Mode 2: Increase or decrease brush size in Gimp"
elif [ "$MODE" == 2 ]; then
# xsetwacom set "$DEVICE" AbsWheelUp key ? # scroll up
# xsetwacom set "$DEVICE" AbsWheelDown key ? # scroll down
# echo 2 > /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select
# notify-send -t 1500 "Mode 3: Scroll up or down in Gimp."
elif [ "$MODE" == 3 ]; then
# xsetwacom set "$DEVICE" AbsWheelUp key ? # rotate ccw
# xsetwacom set "$DEVICE" AbsWheelDown key ? # rotate cw
# echo 3 > /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select
# notify-send -t 1500 "Mode 4: Rotate cw or ccw in Gimp"
fi
if [ $[MODE + 1] > 3 ]; then
echo 0 > /tmp/mode_state
else
echo $[MODE + 1] > /tmp/mode_state
filocate status_led0_selectcat /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_selectecho 2 > /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_selectsudo echo 2 > /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select
sudo rmmod wacom
sudo modprobe wacomxsetwacom set "Wacom Intuos5 touch M Pen pad" Button 1 button 5 key ctrl alt r
zorbama wrote:I got it to work almost perfectly!
Before I tried your advice with sysfs, I ran into this site: http://braindump.kargulus.de/?p=321.
While it mostly talks about Intuos4, which has LEDs which you can send images to and isn't really relevant to our case, it also mentions two commands:
- Code: Select all
sudo rmmod wacom
sudo modprobe wacom
This unloads and reloads the wacom module,
zorbama wrote:that changes the way xsetwacom behaves. Now, if I write:
- Code: Select all
xsetwacom set "Wacom Intuos5 touch M Pen pad" Button 1 button 5 key ctrl alt r
it makes the middle button cycle through the LEDs and runs the mode switching script. "Button 5" here isn't an X button, but rather, it's the middle button, if you count the buttons of the tablet from top to bottom (confusing, since you assign it to "button 1").
zorbama wrote:There are two problems with this, however:
- I can't get it to work with my startup script, since rmmod and modprobe require root permissions.
- It messes up the scrolling, since Button 5 stands for cycling through LEDs and not for vertical scroll down. I can use keys up/down, but it's problematic.
zorbama wrote:Still, we're very close to solving this puzzle!

Users browsing this forum: No registered users and 0 guests