-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data: add the XP-Pen ACK05 Remote #777
Conversation
Hi, there. I'm a bot and have been asked to have a look at this. Please run the sysinfo script from https://github.com/linuxwacom/wacom-hid-descriptors and The
A See also https://github.com/linuxwacom/libwacom/wiki/Adding-a-new-device This is an automated comment created by a bot. Responding to the bot or mentioning it won't have any effect. |
data/xp-pen-ack05-remote.tablet
Outdated
|
||
[Buttons] | ||
Left=A;B;C;D;E;F;G;H;I;J; | ||
EvdevCodes=BTN_0;BTN_1;BTN_2;BTN_3;BTN_4;BTN_5;BTN_6;BTN_7;BTN_8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTN_9
seems to be missing :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also a BTN_10 : the keypad part has 10 buttons (so 0 to 9) but the Dial has a middle button too.
I saw on the Wacom EKR this one (middle dial button) is counted as BTN_0 and "A" label.
So, I'll probably do that for the SVG (correct me if I'm wrong.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTN_9 seems to be missing :)
Counting is not my forte... fixed, thanks.
Maybe also a BTN_10 : the keypad part has 10 buttons (so 0 to 9) but the Dial has a middle button too.
does the dial button send BTN_0? If it does we shift all of them up and name the dial button A.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my side I managed to get the dial button sending something sensible (and using currently BTN_LEFT
because BTN_10
doesn't exist, opened to discussion).
On the official documentation of the product, it is said that the button on the dial is intended for "mode switching".
I think we should have something like that (completely untested):
[Features]
Stylus=false
NumRings=1
NumDials=1
NumStrips=0
[Buttons]
Left=A;B;C;D;E;F;G;H;I;J;K
EvdevCodes=BTN_0;BTN_1;BTN_2;BTN_3;BTN_4;BTN_5;BTN_6;BTN_7;BTN_8;BTN_9;BTN_LEFT;
#Note that no LEDs light up on the device itself
RingNumModes=4
Ring=K
8857472
to
2b02d4e
Compare
Hey @whot , I finished the SVG, and tried to follow the README for using
What am I doing wrong? (PS: I attach my SVG under) |
Not your fault, but in the script (which clearly hasn't been used in a while...), fixed in #782 |
Hey @whot , thank you again for the quick fix on the *.py script. So, I executed it and saw it directly output the svg code. So, I assumed I had to use it this way:
But once I open the result on Inkscape to check it (maybe I shouldn't do that?) I have a rather weird result, and I have the feeling it isn't working as intended. Here is a screenshot: I attach my two files: the Inkscape source and the output (the one in the screenshot). |
# XP-Pen | ||
# ACK05 Remote | ||
# | ||
# Reports as UGTABLET Artist Pro 16 (Gen2), for recordings | ||
# etc. see https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/issues/32 | ||
# | ||
# ┌────────┐────────────────────────┐ | ||
# / ┌────┐ \ ┌───┐┌───┐┌───┐┌───┐│ | ||
# │ │Dial│ │ │ A ││ B ││ C ││ ││ | ||
# │ └────┘ │ └───┘└───┘└───┘│ G ││ | ||
# │\________/ ┌───┐┌───┐┌───┐│ ││ | ||
# │ │ D ││ E ││ F ││ ││ | ||
# │ └───┘└───┘└───┘└───┘│ | ||
# │ ┌───┐┌────────┐┌───┐│ | ||
# │ │ H ││ I ││ J ││ | ||
# │ └───┘└────────┘└───┘│ | ||
# └──────────────────────────────────┘ | ||
|
||
[Device] | ||
Name=UGTABLET Artist Pro 16 (Gen2) | ||
ModelName= | ||
DeviceMatch=usb|28bd|095b | ||
Layout=xp-pen-ack05-remote.svg | ||
Class=Remote | ||
|
||
[Features] | ||
Stylus=false | ||
NumDials=1 | ||
NumRings=0 | ||
NumStrips=0 | ||
StatusLEDs=Ring | ||
|
||
[Buttons] | ||
Left=A;B;C;D;E;F;G;H;I;J; | ||
EvdevCodes=BTN_0;BTN_1;BTN_2;BTN_3;BTN_4;BTN_5;BTN_6;BTN_7;BTN_8;BTN_9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# XP-Pen | |
# ACK05 Remote | |
# | |
# Reports as UGTABLET Artist Pro 16 (Gen2), for recordings | |
# etc. see https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/issues/32 | |
# | |
# ┌────────┐────────────────────────┐ | |
# / ┌────┐ \ ┌───┐┌───┐┌───┐┌───┐│ | |
# │ │Dial│ │ │ A ││ B ││ C ││ ││ | |
# │ └────┘ │ └───┘└───┘└───┘│ G ││ | |
# │\________/ ┌───┐┌───┐┌───┐│ ││ | |
# │ │ D ││ E ││ F ││ ││ | |
# │ └───┘└───┘└───┘└───┘│ | |
# │ ┌───┐┌────────┐┌───┐│ | |
# │ │ H ││ I ││ J ││ | |
# │ └───┘└────────┘└───┘│ | |
# └──────────────────────────────────┘ | |
[Device] | |
Name=UGTABLET Artist Pro 16 (Gen2) | |
ModelName= | |
DeviceMatch=usb|28bd|095b | |
Layout=xp-pen-ack05-remote.svg | |
Class=Remote | |
[Features] | |
Stylus=false | |
NumDials=1 | |
NumRings=0 | |
NumStrips=0 | |
StatusLEDs=Ring | |
[Buttons] | |
Left=A;B;C;D;E;F;G;H;I;J; | |
EvdevCodes=BTN_0;BTN_1;BTN_2;BTN_3;BTN_4;BTN_5;BTN_6;BTN_7;BTN_8;BTN_9; | |
# XP-Pen | |
# ACK05 Remote | |
# | |
# Reports as Hanvon Ugee Shortcut Remote, for recordings | |
# etc. see https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/issues/32 | |
# | |
# ┌────────┐────────────────────────┐ | |
# / ┌────┐ \ ┌───┐┌───┐┌───┐┌───┐│ | |
# │ │ A │ │ │ B ││ C ││ D ││ ││ | |
# │ └────┘ │ └───┘└───┘└───┘│ H ││ | |
# \_________/ ┌───┐┌───┐┌───┐│ ││ | |
# │ │ E ││ F ││ G ││ ││ | |
# │ └───┘└───┘└───┘└───┘│ | |
# │ ┌───┐┌────────┐┌───┐│ | |
# │ │ I ││ J ││ K ││ | |
# │ └───┘└────────┘└───┘│ | |
# └─────────────────────────────────┘ | |
[Device] | |
Name=Hanvon Ugee Shortcut Remote | |
ModelName= | |
DeviceMatch=usb:28bd:0202 | |
Layout=xp-pen-ack05-remote.svg | |
Class=Remote | |
[Features] | |
Stylus=false | |
NumDials=1 | |
NumRings=1 | |
NumStrips=0 | |
StatusLEDs=Ring | |
[Buttons] | |
Left=A;B;C;D;E;F;G;H;I;J;K; | |
EvdevCodes=BTN_LEFT;BTN_0;BTN_1;BTN_2;BTN_3;BTN_4;BTN_5;BTN_6;BTN_7;BTN_8;BTN_9; | |
#Note that no LEDs light up on the device itself | |
RingNumModes=4 | |
Ring=A |
Small changes to make my system happier:
DeviceMatch seems to be using
:, not
|`- the ring button is going to be
A
, and everything gets offset by 1 - support for ring modes?
Libwacom is happy, but if I take @Deevad SVG, the panel doesn't show the svg, so I guess something is off....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but if I take @Deevad SVG, the panel doesn't show the svg, so I guess something is off....
Hey, yes, I'm a bit stuck with the step where I have to run clean_svg.py script to autorename/autoclean elements in the SVG as noted on the documentation.
Unfortunately, my attempts are failing, I reported it here above: #777 (comment) : the script change the label of the buttons for Group A/ Group B, move the buttons around, delete the frame of the device, etc...
I found several bugs in diff --git a/tools/clean_svg.py b/tools/clean_svg.py
index b84a48ec709e..658227ba0fb7 100755
--- a/tools/clean_svg.py
+++ b/tools/clean_svg.py
@@ -29,9 +29,10 @@ BRACKETS_NAMESPACE = "{" + NAMESPACE + "}"
def human_round(number):
"""
- Round to closest .5
+ Round to closest .5, keep integer values
"""
- return round(number * 2) / 2.0
+ v = round(number * 2) / 2.0
+ return int(v) if v == int(v) else v
def traverse_and_clean(node):
@@ -83,14 +84,21 @@ def round_if_number(value):
def remove_non_svg_nodes_and_strip_namespace(root):
if root.tag.startswith(BRACKETS_NAMESPACE):
root.tag = root.tag[len(BRACKETS_NAMESPACE) :]
+
+ # we cannot remove while iterating on the same iterable,
+ # so we first get the list of nodes to remove, and then
+ # remove them in a second pass
+ cleanup_elems = [
+ elem
+ for elem in root
+ if not elem.tag.startswith(BRACKETS_NAMESPACE)
+ or elem.tag == BRACKETS_NAMESPACE + "metadata"
+ ]
+ for elem in cleanup_elems:
+ root.remove(elem)
+
for elem in root:
- if (
- not elem.tag.startswith(BRACKETS_NAMESPACE)
- or elem.tag == BRACKETS_NAMESPACE + "metadata"
- ):
- root.remove(elem)
- else:
- remove_non_svg_nodes_and_strip_namespace(elem)
+ remove_non_svg_nodes_and_strip_namespace(elem)
def remove_transform_if_exists(node): @whot, feel free to integrate them into your PR #782. @Deevad , I took the liberty to edit your original inkscape file and produce the generated SVG: I've made a few changes:
I still have issues with the Dials (running 2.11 locally here for now): Apparently, dial support is included in 2.12, but the problem is more in the So far, I've manually edited the resulting file, but it would be nice if we didn't have to. |
No problem! I attached the SVG files for this. Thank you for fixing clean_svg.py , it will be very useful for the future addition of layouts to the project 👍 |
nod Moved to #788 |
Draft because currently missing:
I'm going to punt both to @Deevad :)
@Deevad - if you save the SVG file as
data/layouts/xp-pen-ack05-remote.svg
then things should magically work once you install everything1. the layouts README has a list of things that are expected and it mostly relates to naming of leader lines etc.You can use this file as-is on libwacom <= 2.11 but you'll have to change to this line:
(pipe
|
replaced to the older version with:
)Footnotes
for testing you can also drop it directly into
/usr/share/libwacom/layouts/
after dropping this.tablet
file into/usr/share/libwacom
. ↩