Discussion:
[Linuxwacom-devel] [PATCH libwacom] tools: mark the EKR as a ID_INPUT_TABLET_PAD
Peter Hutterer
2016-05-25 05:51:23 UTC
Permalink
Signed-off-by: Peter Hutterer <***@who-t.net>
---
tools/generate-udev-rules.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/generate-udev-rules.c b/tools/generate-udev-rules.c
index 87d43fe..353bf6d 100644
--- a/tools/generate-udev-rules.c
+++ b/tools/generate-udev-rules.c
@@ -102,8 +102,9 @@ static void print_udev_entry_matchstr(WacomDevice *device, const char *matchstr)
printf( "ATTRS{name}==\"* Finger\", %s ENV{%s}=\"1\"\n", matchstr, touchtype);
}

- /* set ID_INPUT_TABLET_PAD for pads */
- if (libwacom_get_num_buttons (device) > 0)
+ if (libwacom_get_class (device) == WCLASS_REMOTE)
+ printf ("%s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
+ else if (libwacom_get_num_buttons (device) > 0)
printf ("ATTRS{name}==\"* Pad\", %s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
}
--
2.7.4
Jason Gerecke
2016-05-25 18:47:26 UTC
Permalink
Doesn't the EKR already get marked as ID_INPUT_PAD? On the current
master, I get the following from generate-udev-rules:

# Wacom ExpressKey Remote
ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="056a",
ENV{ID_MODEL_ID}=="0331", ENV{ID_INPUT}="1",
ENV{ID_INPUT_JOYSTICK}="", ENV{ID_INPUT_TABLET}="1"
ATTRS{name}=="* Pad", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="056a",
ENV{ID_MODEL_ID}=="0331", ENV{ID_INPUT_TABLET_PAD}="1"

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....

On Tue, May 24, 2016 at 10:51 PM, Peter Hutterer
Post by Peter Hutterer
---
tools/generate-udev-rules.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/generate-udev-rules.c b/tools/generate-udev-rules.c
index 87d43fe..353bf6d 100644
--- a/tools/generate-udev-rules.c
+++ b/tools/generate-udev-rules.c
@@ -102,8 +102,9 @@ static void print_udev_entry_matchstr(WacomDevice *device, const char *matchstr)
printf( "ATTRS{name}==\"* Finger\", %s ENV{%s}=\"1\"\n", matchstr, touchtype);
}
- /* set ID_INPUT_TABLET_PAD for pads */
- if (libwacom_get_num_buttons (device) > 0)
+ if (libwacom_get_class (device) == WCLASS_REMOTE)
+ printf ("%s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
+ else if (libwacom_get_num_buttons (device) > 0)
printf ("ATTRS{name}==\"* Pad\", %s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
}
--
2.7.4
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Linuxwacom-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Peter Hutterer
2016-05-25 21:55:33 UTC
Permalink
Post by Jason Gerecke
Doesn't the EKR already get marked as ID_INPUT_PAD? On the current
# Wacom ExpressKey Remote
ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="056a",
ENV{ID_MODEL_ID}=="0331", ENV{ID_INPUT}="1",
ENV{ID_INPUT_JOYSTICK}="", ENV{ID_INPUT_TABLET}="1"
ATTRS{name}=="* Pad", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="056a",
ENV{ID_MODEL_ID}=="0331", ENV{ID_INPUT_TABLET_PAD}="1"
Huh, weird. I had that too but it didn't trigger on my evemu recording for
some reason. And then I thought the Pad bit was missing in the name, but
it's clearly there. Weird. Patch withdrawn, sorry about the noise.

Cheers,
Peter
Post by Jason Gerecke
On Tue, May 24, 2016 at 10:51 PM, Peter Hutterer
Post by Peter Hutterer
---
tools/generate-udev-rules.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/generate-udev-rules.c b/tools/generate-udev-rules.c
index 87d43fe..353bf6d 100644
--- a/tools/generate-udev-rules.c
+++ b/tools/generate-udev-rules.c
@@ -102,8 +102,9 @@ static void print_udev_entry_matchstr(WacomDevice *device, const char *matchstr)
printf( "ATTRS{name}==\"* Finger\", %s ENV{%s}=\"1\"\n", matchstr, touchtype);
}
- /* set ID_INPUT_TABLET_PAD for pads */
- if (libwacom_get_num_buttons (device) > 0)
+ if (libwacom_get_class (device) == WCLASS_REMOTE)
+ printf ("%s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
+ else if (libwacom_get_num_buttons (device) > 0)
printf ("ATTRS{name}==\"* Pad\", %s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
}
--
2.7.4
Loading...