Skip to content

Commit

Permalink
Merge branch 'linuxwacom:master' into add-lenovo-precision-pen-2
Browse files Browse the repository at this point in the history
  • Loading branch information
RayJW authored Oct 16, 2024
2 parents a2e1386 + 34bd864 commit a9e17af
Show file tree
Hide file tree
Showing 6 changed files with 557 additions and 69 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,22 @@ jobs:
test $(libwacom-list-devices --format=yaml | yq -r '.devices[] | select(.bus == "usb") | select(.vid == "0x056a") | select(.pid == "0x0358") | .name' | wc -l) -eq 1
test $(libwacom-list-devices --format=yaml | yq -r '.devices[] | select(.bus == "usb") | select(.vid == "0x056a") | select(.pid == "0x032a") | .name' | wc -l) -eq 1
####
# make sure clean_svg.py works on our layout files
clean-svg-check:
needs: build-and-dist
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: run clean-svg on all .tablet files
run: |
for tabletfile in data/*.tablet; do
./tools/clean_svg.py --ignore-missing "$tabletfile" ""
done
###
#
# tarball verification
Expand Down
65 changes: 1 addition & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,70 +29,7 @@ device in the kernel (see `/proc/bus/input/devices`) and in the X session (see
Use the `libwacom-list-devices` tool to list all known devices and verify
the tablet is not in that list.

## To add support for a new tablet to libwacom git:

1. Create a new tablet definition file. See `data/wacom.example` in the source
for a guideline on how to add a new tablet. For an installed version of
libwacom, see the existing data files (e.g.
`/usr/share/libwacom/cintiq-13hd.tablet`)
2. A new tablet description is enabled by adding and installing a new file with
a `.tablet` suffix. Once installed the tablet is part of libwacom's
database, no rebuild is necessary
3. The tablet is then available through `libwacom-list-local-devices`

You must update udev after installing the file, see below.

## To add support for a tablet to an installed libwacom

If the system-provided libwacom does not include a `.tablet` file, it is
possible to "backport" that `.tablet` file to the system-provided libwacom.

### libwacom 1.10 and newer

Copy the `.tablet` file into `/etc/libwacom` and run the
`libwacom-update-db` tool. Copy the tablet's `.svg` layout file
to `/etc/libwacom/layouts`.

```
$ cp my-tablet-file-from-upstream.tablet /etc/libwacom/
$ cp my-tablet-file-layout.svg /etc/libwacom/layouts/
$ libwacom-update-db /etc/libwacom
```

The tool will take care of updating udev, the hwdb, etc.

### libwacom 1.9 and earlier

For versions of libwacom <= 1.9, the file must be copied to
`/usr/share/libwacom`. It may be overwritten on updates.

You must update udev after installing the file. The simplest (and broadest)
way to do this is outlined below:

```
# create the hwdb file
$ cat <EOF > /etc/udev/hwdb.d/66-libwacom.hwdb
# WARNING: change "Your Device Name" to the actual name of your device
libwacom:name:Your Device Name*:input:*
ID_INPUT=1
ID_INPUT_TABLET=1
ID_INPUT_JOYSTICK=0
libwacom:name:Your Device Name Pad:input:*
ID_INPUT_TABLET_PAD=1
# Use this if the device is an external tablet
libwacom:name:Your Device Name Finger:input:*
ID_INPUT_TOUCHPAD=1
# Use this if the device is a screen tablet
libwacom:name:Your Device Name Finger:input:*
ID_INPUT_TOUCHSCREEN=1
EOF
$ systemd-hwdb --update
```
Now disconnect and reconnect the device and it should be detected by libwacom.
See [this wiki page on adding a new device and how to test it](https://github.com/linuxwacom/libwacom/wiki/Adding-a-new-device).

# API Documentation

Expand Down
21 changes: 21 additions & 0 deletions data/isdv4-52ba.tablet
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Lenovo ThinkPad X1 Fold 16 Gen 1
# Sensor Type: AES
# Features: Touch (Integrated), Tilt
# HW Resolution: 25715 x 32525 (2540 x 2540 lpi)
#
# Autogenerated from sysinfo.yXmeuvXvKq.tar.gz
# https://github.com/linuxwacom/wacom-hid-descriptors/issues/410

[Device]
Name=Lenovo ThinkPad X1 Fold 16 Gen 1
DeviceMatch=i2c|056a|52ba
Class=ISDV4
Width=10
Height=13
IntegratedIn=Display;System
Styli=@isdv4-aes;

[Features]
Stylus=true
Touch=true
Buttons=0
Loading

0 comments on commit a9e17af

Please sign in to comment.