Skip to content
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 a new Keys/KeyCodes entry to the tablet files #588

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

whot
Copy link
Member

@whot whot commented Aug 31, 2023

This is parsed but not exported by libwacom itself, at least not until we know what our callers want.

It is used however to determine if a device has a pad and thus used to set the ID_INPUT_TABLET_PAD property through the hwdb. This fixes the issue with some devices without buttons (but with keys) to not get labelled as pads, e.g. the Cintiq Pro 13.

Fixes #585

Note: draft because I need to know the evdev keycodes for the cintiq before we can commit this, cc @Pinglinux

@Pinglinux
Copy link
Member

@whot, below are the details of the 5 touch keys. From left to right, on the top edge of the tablet, we see the keys as:
DISPLAY_TOGGLE (display off/on), KEY_CONTROLPANEL, KEY_ONSCREEN_KEYBOARD, KEY_BUTTONCONFIG, TOUCH on/off

DISPLAY_TOGGLE is managed in the kernel [1].
TOUCH on/off events are reported to userland through kernel SW_MUTE_DEVICE event [2]. SW_MUTE_DEVICE is also used to report physical touch switch events. You may want to ignore it or add special consideration for the event.
The other three keys are reported to userland as defined [3]. They are only used for soft keys, which are what you needed for this patch, I assume.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/hid/wacom_wac.c?h=v6.6-rc1&id=4082da80f46a6683439bb0357faadb18f0f5b2a6
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/hid/wacom_wac.c?h=v6.6-rc1&id=d793ff81879a5747109f3106bd18e77662cb5187
[3] linuxwacom/input-wacom@5d44f6f

@whot whot force-pushed the wip/keys branch 4 times, most recently from fd5666d to 69bcc6e Compare September 28, 2023 01:05
@whot
Copy link
Member Author

whot commented Sep 28, 2023

@Pinglinux thanks for the info, I've updated the branch.

This turned out to get a bit more complicated, mostly because of the switch entry. I've filed #594 and #595 for the cleanups in the process.

One public API libwacom_get_num_keys(), the detailed API will come if we need it from a client somewhere.

This is parsed but not exported by libwacom itself beyond the number of
available keys. We can add other bits once we know what potential
callers want.

It is used however to determine if a device has a pad and thus used to
set the ID_INPUT_TABLET_PAD property through the hwdb. This fixes the
issue with some devices without buttons (but with keys) to not get
labelled as pads, e.g. the Cintiq Pro 13.

Fixes linuxwacom#585
@whot whot marked this pull request as ready for review October 22, 2023 23:12
@whot whot merged commit f70ba11 into linuxwacom:master Oct 22, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cintiq Pro 13 Pad is not labeled as ID_INPUT_TABLET_PAD
2 participants