pax_global_header00006660000000000000000000000064142172555400014517gustar00rootroot0000000000000052 comment=be485deca03157b0dbd702c7acaf35b71378be9e libwacom-libwacom-2.2.0/000077500000000000000000000000001421725554000151105ustar00rootroot00000000000000libwacom-libwacom-2.2.0/.github/000077500000000000000000000000001421725554000164505ustar00rootroot00000000000000libwacom-libwacom-2.2.0/.github/ISSUE_TEMPLATE/000077500000000000000000000000001421725554000206335ustar00rootroot00000000000000libwacom-libwacom-2.2.0/.github/ISSUE_TEMPLATE/Bug_report.md000066400000000000000000000006101421725554000232620ustar00rootroot00000000000000--- name: Bug report about: A report of an error in libwacom --- libwacom-libwacom-2.2.0/.github/ISSUE_TEMPLATE/New_device_support.md000066400000000000000000000020111421725554000250130ustar00rootroot00000000000000--- name: New device support request about: Request to add a new device to libwacom's database --- **Device name** > ... **Device model identifier** > ... **udevadm info output** libwacom-libwacom-2.2.0/.github/actions/000077500000000000000000000000001421725554000201105ustar00rootroot00000000000000libwacom-libwacom-2.2.0/.github/actions/meson/000077500000000000000000000000001421725554000212315ustar00rootroot00000000000000libwacom-libwacom-2.2.0/.github/actions/meson/action.yml000066400000000000000000000024141421725554000232320ustar00rootroot00000000000000# A Github Action to build a repository with meson name: "Setup and run meson" description: "Setup and run meson" inputs: builddir: description: "The build directory" default: "builddir" srcdir: description: "The source directory" default: "." meson_args: description: "Arguments passed to meson setup" default: "" meson_skip_test: description: "Set to a nonempty string to skip meson test" default: "" meson_test_args: description: "Arguments passed to meson test" default: "" meson_precmd: description: "Set to 'sudo' to run with sudo" default: "" ninja_args: description: "Arguments passed to ninja" default: "" ninja_precmd: description: "Set to 'sudo' to run with sudo" default: "" runs: using: "composite" steps: - run: | ${{inputs.meson_precmd}} meson setup ${{inputs.builddir}} ${{inputs.srcdir}} ${{inputs.meson_args}} ${{inputs.meson_precmd}} meson configure ${{inputs.builddir}} ${{inputs.ninja_precmd}} ninja --verbose -C ${{inputs.builddir}} ${{inputs.ninja_args}} if [[ -z "${{inputs.meson_skip_test}}" ]]; then ${{inputs.meson_precmd}} meson test -C ${{inputs.builddir}} --print-errorlogs ${{inputs.meson_test_args}}; fi shell: bash libwacom-libwacom-2.2.0/.github/actions/pkginstall/000077500000000000000000000000001421725554000222605ustar00rootroot00000000000000libwacom-libwacom-2.2.0/.github/actions/pkginstall/action.yml000066400000000000000000000010431421725554000242560ustar00rootroot00000000000000name: "Install packages" description: "Install a set of packages from sources" inputs: apt: description: "The package list to install with apt" pip: description: "The package list to install with pip" pip_precmd: description: "Set to the string 'sudo' to run through sudo" default: "" runs: using: "composite" steps: - run: sudo ${{ github.action_path }}/install-apt.sh ${{ inputs.apt }} shell: bash - run: ${{inputs.pip_precmd}} ${{ github.action_path }}/install-pip.sh ${{ inputs.pip }} shell: bash libwacom-libwacom-2.2.0/.github/actions/pkginstall/install-apt.sh000077500000000000000000000007021421725554000250460ustar00rootroot00000000000000#!/bin/bash -x # If called without arguments, just skip the rest if [[ -z "$@" ]]; then exit fi # Don't care about these bits echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft apt-get update apt-get install -yq --no-install-suggests --no-install-recommends $@ libwacom-libwacom-2.2.0/.github/actions/pkginstall/install-pip.sh000077500000000000000000000002541421725554000250540ustar00rootroot00000000000000#!/bin/bash -x # If called without arguments, just skip the rest if [[ -z "$@" ]]; then exit fi python -m pip install --upgrade pip python -m pip install --upgrade "$@" libwacom-libwacom-2.2.0/.github/workflows/000077500000000000000000000000001421725554000205055ustar00rootroot00000000000000libwacom-libwacom-2.2.0/.github/workflows/check-for-sysinfo.yml000066400000000000000000000011121421725554000245540ustar00rootroot00000000000000name: "Check for sysinfo in data files" on: [ pull_request ] jobs: checksysinfo: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: tj-actions/changed-files@v11.9 id: added-files with: path: data - name: Check for sysinfo in all added files run: | for file in ${{ steps.added-files.outputs.added_files }}; do if [[ "$file" == *.tablet ]]; then grep -q "sysinfo" $file || (echo "Missing reference to sysinfo.DEADBEEF.gz in $file" && exit 1) fi done libwacom-libwacom-2.2.0/.github/workflows/freebsd.yml000066400000000000000000000010421421725554000226370ustar00rootroot00000000000000name: "FreeBSD build and test" on: [ push, pull_request ] jobs: ### # # FreeBSD build job # freebsd: runs-on: macos-10.15 steps: - uses: actions/checkout@v2 - name: meson test uses: vmactions/freebsd-vm@v0.1.5 with: prepare: | pkg install -y meson pkgconf evdev-proto libgudev libxml++ bash libevdev pkg install -y -g py3\*-pip python3 pip install libevdev pytest pyudev run: | meson setup builddir meson test -C builddir --print-errorlogs libwacom-libwacom-2.2.0/.github/workflows/main.yml000066400000000000000000000175041421725554000221630ustar00rootroot00000000000000name: "Build and test" on: [ push, pull_request ] env: CFLAGS: "-Werror -Wno-error=missing-field-initializers" UBUNTU_PACKAGES: libgudev-1.0-dev libxml++2.6-dev valgrind tree python3-pip python3-setuptools libevdev2 PIP_PACKAGES: meson ninja libevdev pyudev pytest yq jobs: build-and-dist: runs-on: ubuntu-20.04 strategy: matrix: compiler: - gcc - clang meson_options: - '' # clang requires b_lundef=false for b_santize, see # https://github.com/mesonbuild/meson/issues/764 - '-Db_sanitize=address,undefined -Db_lundef=false' steps: - uses: actions/checkout@v2 # install python so we get pip for meson - uses: actions/setup-python@v1 with: python-version: '3.8' - uses: ./.github/actions/pkginstall with: apt: $UBUNTU_PACKAGES pip: $PIP_PACKAGES - name: meson test ${{matrix.meson_options}} uses: ./.github/actions/meson with: meson_args: ${{matrix.meson_options}} env: CC: ${{matrix.compiler}} # create the tarball - name: meson dist uses: ./.github/actions/meson with: ninja_args: dist # Capture all the meson logs, even if we failed - uses: actions/upload-artifact@v2 if: ${{ always() }} # even if we fail with: name: meson test logs path: | builddir/meson-logs/testlog*.txt builddir/meson-logs/meson-log.txt # move the tarball to the top level - name: move tarballs to top level run: mv builddir/meson-dist/libwacom-*tar.xz . - uses: actions/upload-artifact@v2 with: name: tarball path: libwacom-*tar.xz ### # # valgrind run # valgrind: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 # install python so we get pip for meson - uses: actions/setup-python@v1 with: python-version: '3.8' - uses: ./.github/actions/pkginstall with: apt: $UBUNTU_PACKAGES pip: $PIP_PACKAGES # for the valgrind case, we need custom setup, the matrix isn't # flexible enough for this - name: valgrind - meson test uses: ./.github/actions/meson with: meson_test_args: --setup=valgrind --suite=valgrind env: CC: ${{matrix.compiler}} # Capture all the meson logs, even if we failed - uses: actions/upload-artifact@v2 if: ${{ always() }} # even if we fail with: name: meson test logs path: | builddir/meson-logs/testlog*.txt builddir/meson-logs/meson-log.txt #### # /etc/ loading check etcdir: needs: build-and-dist runs-on: ubuntu-20.04 strategy: matrix: command: # A variety of ways to split the database across the two locations # we load from. - sudo mv /usr/share/libwacom/intuos*.tablet /etc/libwacom - sudo mv /usr/share/libwacom/*.tablet /etc/libwacom - sudo mv /usr/share/libwacom/*.stylus /etc/libwacom # split the libwacom.stylus file into to two files to check for # accumlated loading - sudo csplit data/libwacom.stylus '/^\[0x822\]/' && sudo mv xx00 /etc/libwacom/first.stylus && sudo mv xx01 /usr/share/libwacom/libwacom.stylus steps: - uses: actions/checkout@v2 # install python so we get pip for meson - uses: actions/setup-python@v1 with: python-version: '3.8' # Run as sudo because we install to /etc and thus need the pip # packages available to root - uses: ./.github/actions/pkginstall with: apt: $UBUNTU_PACKAGES pip: $PIP_PACKAGES pip_precmd: sudo - uses: ./.github/actions/meson with: meson_args: --prefix=/usr meson_skip_test: yes ninja_args: install ninja_precmd: sudo - name: list devices with database in /usr run: libwacom-list-devices --format=datafile > devicelist.default.txt - run: sudo mkdir /etc/libwacom - name: split the databases between /usr/share and /etc run: ${{matrix.command}} - name: list devices with database in /etc and /usr run: libwacom-list-devices --format=datafile > devicelist.modified.txt - name: compare device database run: diff -u8 devicelist.default.txt devicelist.modified.txt #### # duplicate device check duplicate-devices: needs: build-and-dist runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 # install python so we get pip for meson - uses: actions/setup-python@v1 with: python-version: '3.8' # Run as sudo because we install to /etc and thus need the pip # packages available to root - uses: ./.github/actions/pkginstall with: apt: $UBUNTU_PACKAGES pip: $PIP_PACKAGES pip_precmd: sudo - uses: ./.github/actions/meson with: meson_args: --prefix=/usr meson_skip_test: yes ninja_args: install ninja_precmd: sudo - name: list devices with database in /usr run: libwacom-list-devices --format=yaml > devicelist.default.txt - run: sudo mkdir /etc/libwacom # We override a Cintiq 27QHD with a single device match, and one of # the multiple matches of the Intuos Pro L. - name: copy and modify tablet files to override another one run: | sed -e 's/27QHD/27QHD MODIFIED/' data/cintiq-27hd.tablet | sudo tee /etc/libwacom/modified-cintiq.tablet sed -e 's/Pro L/Pro L MODIFIED/' -e 's/usb:056a:0358;//' data/intuos-pro-2-l.tablet | sudo tee /etc/libwacom/modified-intuos.tablet - name: list all devices for debugging run: libwacom-list-devices --format=yaml # We expect the modified tablets to be listed # We expect the remaining match for a modified tablet to be listed # We expect the overridden match *not* to be listed - name: check for the expected devices to be present (or not present) run: | test "$(libwacom-list-devices --format=yaml | yq -r '.devices[] | select(.bus == "usb") | select(.vid == "0x056a") | select(.pid == "0x032a") | .name')" == "Wacom Cintiq 27QHD MODIFIED" test "$(libwacom-list-devices --format=yaml | yq -r '.devices[] | select(.bus == "bluetooth") | select(.vid == "0x056a") | select(.pid == "0x0361") | .name')" == "Wacom Intuos Pro L MODIFIED" 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 ### # # tarball verification # build-from-tarball: needs: build-and-dist runs-on: ubuntu-20.04 env: TARBALLDIR: '_tarball_dir' INSTALLDIR: '/tmp/libwacom/_inst' steps: - uses: actions/checkout@v2 - name: install python uses: actions/setup-python@v1 with: python-version: '3.8' - uses: ./.github/actions/pkginstall with: apt: $UBUNTU_PACKAGES pip: $PIP_PACKAGES - name: fetch tarball from previous job(s) uses: actions/download-artifact@v2 with: name: tarball - name: extract tarball run: | mkdir -p "$TARBALLDIR" tar xf libwacom-*.tar.xz -C "$TARBALLDIR" - run: mkdir -p "$INSTALLDIR" - name: build from tarball with meson uses: ./.github/actions/meson with: srcdir: $TARBALLDIR/libwacom-*/ meson_args: --prefix="$INSTALLDIR" ninja_args: test install libwacom-libwacom-2.2.0/.github/workflows/pages.yml000066400000000000000000000020411421725554000223240ustar00rootroot00000000000000name: pages on: push: branches: - master env: UBUNTU_PACKAGES: libgudev-1.0-dev libxml++2.6-dev valgrind tree python3-pip python3-setuptools libevdev2 doxygen PIP_PACKAGES: meson ninja libevdev pyudev pytest yq jobs: deploy: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: ./.github/actions/pkginstall with: apt: $UBUNTU_PACKAGES # install python so we get pip for meson - uses: actions/setup-python@v1 with: python-version: '3.8' - uses: ./.github/actions/pkginstall with: apt: $UBUNTU_PACKAGES pip: $PIP_PACKAGES - name: meson test ${{matrix.meson_options}} uses: ./.github/actions/meson with: meson_args: -Ddocumentation=enabled meson_skip_test: yes - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./builddir/html/ allow_empty_commit: true libwacom-libwacom-2.2.0/COPYING000066400000000000000000000020711421725554000161430ustar00rootroot00000000000000Copyright © 2011 Red Hat, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Red Hat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Red Hat makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. libwacom-libwacom-2.2.0/NEWS000066400000000000000000000240301421725554000156060ustar00rootroot00000000000000libwacom 2.2: - New Devices: - Lenovo X1 Yoga Gen6, X1 Titanium Gen1 - Fujitsu Lifebook T935 - Wacom One Pen Display 13 libwacom 2.1: - New Devices: - Dell Latitude 5290 - Lenovo ThinkPad X1 Tablet Gen3, Yoga 7 - Pine64 PineNote - HP ProBook x360 libwacom 2.0: - New major version with a soname bump. Some symbols have been dropped but no user should've ever used those anyway. See commit b9961dbe912fa096230460b194eebdc8a590d256 for details. - New Devices: - LetSketch WP9620 - Wacom Intuos BT, Cintiq Pro 16 - ISDv4 523a - Dell Latitude 5290, 7275, 7320 - Asus Zenbook Flip S13 - HP EliteBook x360, ZBook x2 G4 - Lenovo Thinkpad 13 Yoga Gen 2, Yoga 6, Ideapad Flex5, Yoga C740 libwacom 1.12: - New devices: - ELAN 2513 - HP Probook x360, 435 G7 - Waltop Slim Tablet 12.1 - XP-PEN Star 3 - libwacom's hwdb no longer tags devices with "Keyboard" in their name as ID_INPUT_TABLET libwacom 1.11: - New devices: - Lenovo ThinkPad L390 Yoga, Yoga C940, Yoga 460, Yoga 720, ThinkVision M14t, IdeaPad Flex5 - HP EliteBook x360 1030 G3 - Dell XPS 13 9310 2-in-1 - HUION Kamvas Pro 13 - Note the Gaomon S56K entry was removed in favour of the Kamvas. Gaomon users will see their device show up as Kamvas Pro now. - ELAN 2514 variant 2718 libwacom 1.10: - Duplicate matches in /etc no longer cause conflicts with the system-provided .tablet files - libwacom-list-local-devices now prints YAML by default - New tools: - libwacom-list-devices lists all supported devices - libwacom-update-db to update the db after adding tablet files - New devices: - Elan 2514 variant 25BF - Huion H640P - Lenovo X1 Yoga Gen 6 - Samsung CHromebook Pro libwacom 1.9: - libwacom can now read tablet and stylus files from /etc/libwacom - New tool: libwacom-show-stylus to interactively show stylus IDs and serial numbers - New devices: - HP Envy x360, Pro Tablet 508 - Lenovo X1 Yoga Gen5, Yoga6, Ideapad Flex 5, Yoga 7, Yoga C650, L13 Yoga - Microsoft Surface Go libwacom 1.8: - New devices: - Dell XPS 15 7590 - HP EliteBook x360 (830 and 1030), Spectre x360 - Lenovo Thinkpad P15 Gen1, Yoga, Yoga 3, Yoga 11e, X13 Yoga libwacom 1.7: - New devices: - Dell XPS 13 2-in-1 9310 - Lenovo IdeaPad Flex 14API, Flex 5 - HP Envy x360, EliteBook x360 - Huawei MateBook HZ-W19 - XP Pen Star G640 libwacom 1.6: - New devices: - XP Pen G640 - libwacom_new_from_usbid() now also returns matching Bluetooth and i2c devices libwacom 1.5: - New devices: - Acer Spin 5 / Acer Spin SP513-54N - Dell Latitude 7410, - GAOMON S620 - HP Pavilion x360 Convertible 14-dh0xxx - Huawei MateBook HZ-W19 - Lenovo ThinkPad X1 Yoga 3rd - Wacom Cintiq 16, DTK-1660E libwacom 1.4.1: - fix a typo in the udev rule that caused joysticks to be mislabeled - New devices: - HP ZBook Studio x360 G5 - Dell Latitude 7285 libwacom 1.4: - New devices: - Dell Latitude 7200 2-in-1, Dell Latitude 7400 2-in-1 - Elan 2415 - HP ENVY x360 Convertible 13, - Huion 420, 1060 Plus, - GAOMON S56K - Wacom FT-0405 - Many AES stylus definitions added - New API: libwacom_stylus_get_eraser_type() - udev rules are now using hwdb entries libwacom 1.3: - New devices: - Wacom One Pen Display 13 - Lenovo Thinkpad L13 Yoga, X1 Yoga 4th, X1 Extreme 2nd, X13 Yoga, Yoga 370 - Dell XPS 9575, 7390 - Toshiba z20t-c - HP Envy x360 - Samsung Notebook 9 Pro - Android mode for 3rd gen Intuos devices is now handled libwacom 1.2: - New devices: - Wacom Moile Studio Pro (2nd gen) - Dell Latitude 7400 2-in-1, XPS 13 2-in-1 - Elan 2628 - Lenovo X1 Yoga 4th, X1 Yoga 3d, Yoga 720, Yoga C930, Yoga C940, X390 Yoga, IdeaPad FLEX-14API - ASUS ZenBook Pro Duo libwacom 1.1: - New devices: Wacom HID 5115 - Button codes defined for the 3rd gen Intuos S libwacom 1.0: - udev rules are now installed by default libwacom 0.99.901: - New devices - Lenovo YOGA 720, YOGA 520, IdeaPad FLEX 5, MIIX 520 - Dell XPS 15 9570, Latitude 5175 - HP Spectre x360, Envy x360 Convertible - Wacom Intuos Pro 2 S, Cintiq 22, DTK-1660E - Huion 610 Pro v2 - Samsung 930QAA - New API: libwacom_get_model_name() - meson build system support - fixed symbol versioning - EKR button ordering fixed - Stylus grouping added libwacom 0.33: - New devices: - Wacom Bamboo Fun 4x5, Bamboo Fun 6x8, Bamboo1 5x8, Cintiq 16 - HP EliteBook x360, x2, HP Envy x360 - Acer Switch SA5 - Huion H420 - Lenovo Thinkpad L380 Yoga, L390 Yoga, Ideapad Flex, Yoga 730 - Dell Latitude 7390 libwacom 0.32: - New devices: - Lenovo Yoga 730, X380, 300e - Dell XPS 15 9575 - HP Spectre x360 - Toshiba Portege X20W-D - DTU-1141B libwacom 0.31: - New devices: - Graphire4 6x8 - ISDv4 50fd, 4807 libwacom 0.30: - New devices: - Lenovo X1 Yoga 3rd - HP Spectre x360, HP Elite x1012 G2, HP Envy x360 - Turcom TS-6610 libwacom 0.29: - New devices: - ISDv4 50b4 libwacom 0.28: - New devices: - Cintiq Pro 24, Cintiq Pro 32 - ISDV4 5099, 50b6, 509d, 5090, 50f1, 50f8, 5110, 508b - Bamboo Pad - DTK-2451, 2452 - One by Wacom (2nd gen) libwacom 0.27: - New devices: - Dell Canvas 27 - Pro Pen 3D stylus - XP-Pen Star 03 - ISDv4 4831 (Dell XPS 13 9365) - New API: libwacom_get_button_evdev_code() and the matching EvdevCodes entry in the .tablet files libwacom 0.26: - New devices: - DTH-1152 - Wireless Intuos Pro 2nd Generation - ISDV4 4809, 481a 4822, 4824, 484c, 5010 libwacom 0.25: - New devices: - ISDV4 104, 10E, 117, 124, 4814, 5013, 5014, 503E, 503F, 5048, 5044 - USB Graphire - Cintiq Pro 13, 16 libwacom 0.24 - New devices: - Second generation Intuos Pro M - Second generation Intuos Pro L libwacom 0.23: - New devices: - ISDV4 5040, MobileStudio Pro - The 22HD(T) is now marked as having strip modes libwacom 0.22: - New API: libwacom_get_paired_device() - The EKR has the modes enabled now - Fixes to the show-svg-image tool libwacom 0.21: - New devices: - MTE-450 "Bamboo", Lenovo ThinkPad Tablet 10 - Layout fixes for the Express Key Remote, Intuos series libwacom 0.20: - New devices: "One by wacom" - Layout fixes, especially for the Express Key Remote libwacom 0.19: - New devices: - DTK-1651, ISDv4 0x504a - Quirk added to prevent udev tagging HUION Consumer Control devices as tablets libwacom 0.18: - Renamed ".tablet" files for Bamboo devices - Modified user-visible names of Bamboo devices - "Wacom Bamboo 16FG 4x5" -> "Wacom Bamboo Capture" - "Wacom Bamboo 2FG 4x5" -> "Wacom Bamboo (2FG)" - "Wacom Bamboo 2FG 6x8" -> "Wacom Bamboo Fun medium (2FG)" - "Wacom Bamboo 2FG" -> "Wacom Bamboo Touch (2FG)" - "Wacom Bamboo Craft" -> "Wacom Bamboo Fun small (2FG)" - "Wacom Bamboo Pen" -> "Wacom Bamboo Pen small" - New devices: - Missing gen-1 Bamboo (0xd5) - Missing gen-2.5 Bamboos (0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb) - Missing gen-3 Bamboos (0xdc, 0xdd, 0dxf) libwacom 0.17: - New devices: - Cintiq Companion 2 (DTH-1310) - ExpressKey Remote - New WacomClass: WCLASS_REMOTE libwacom 0.16: - Data files for Intuos and Intuos 2 series added - New stylus ID 0x8e2 libwacom 0.15: - New devices: - ISDv4 0x4800 (Dell Venue 10 5050 Android tablet) - Bustype i2c is now supported libwacom 0.14: - New devices: - Cintiq 13HD touch - Fixes to the udev rule set to tag uinput devices correctly too - Integrated tabled are not marked as ID_INPUT_TOUCHPAD anymore now libwacom 0.13: - New devices: - DTU-1141 - Huion H610 Pro - Several memory leak fixes - Added libwacom_match_get_name() to allow data-file matching on the name as well as the pid/vid libwacom 0.12: - Added libwacom_stylus_has_wheel() for relative wheel detection - Added libwacom_stylus_get_axes() for a list of supported axes - New devices: - Cintiq 27QHD, Cintiq 27QHD Touch - DTU-1031X - Intuos Pen Medium - Reworked udev rules - be more restrictive when to set ID_INPUT_TOUCHPAD - unset ID_INPUT_JOYSTICK on tablet devices - tag the Pad device as ID_INPUT_TABLET_PAD libwacom 0.11: - Better detection of wireless tablets on kernels 3.18 - New devices: - Cintiq Companion libwacom 0.10: - Fixed bus detection of Bluetooth tablets on kernels 3.14 and later (bbe317540) - New devices: - ISDV4 0x12C, 116, 4004, 5000, 5002 libwacom 0.9.0: - Add support for TouchSwitch keyword - New devices: - Intuos series - Pen&Touch (2nd gen) - DTU-1031 - Cintiq Companion Hybrid libwacom 0.8.0: - New devices: - Cintiq 13HD, 22HD touch - DTH-2242, DTU-1931, - ISDv4 EC, ED, 10F - Intuos Pro libwacom 0.7.1: - New devices: - ISDv4 10d - Better checks to prevent bad databases libwacom 0.7: - New devices: - Cintiq 22HD, 24HD touch, - ISDv4 E5, 100, 101 - Support for SVG layouts of the tablets - New APIs for: - list status LEDs - list integration flags (differ between builtin and screen-tablets) libwacom 0.6: - More metadata for: - NTrig tablet PC - ISDv4 0x93, 0x90, 0xED, 0xEF - Bamboo Pen, Fun, Craft, Touch - Support for debugging with uinput devices libwacom 0.5: - Add support for multiple match statements - Add support for bluetotooth devices - Add libwacom-list-local-devices helper tool - Add list-devices helper tool - Rename udev generation tool to generate-udev-rules - More metadata description updates libwacom 0.4: - More metadata for: - Intuos4 WL - Bamboo One - Intuos5 series - Don't fail to create a WacomDevice for Touch devices - Add API to access all items in the database - Add helper tool to generate udev rules from the database libwacom 0.3: - Loads of new and updated tablet definition files - Add and correct information about styli - Update wacom.example with loads of documentation about adding new tablet definitions - Handle Puck device type - Support enumerating touchstrips, touchrings and buttons - Get device name from the kernel for generic tablets - Add support for the WACf004 serial tablet - Build fixes (exported symbols, soname) libwacom 0.2: - Don't add devices that lack DeviceMatch - Get whether a device is builtin from udev - Fix definitions for Reversible property - Add definition for Cintiq 21UX2 - Add test for serial devices - Fix Intuos4 styli's number of buttons libwacom 0.1: - First release libwacom-libwacom-2.2.0/README.md000066400000000000000000000057301421725554000163740ustar00rootroot00000000000000# Overview libwacom is a library to identify Wacom tablets and their model-specific features. It provides easy access to information such as "is this a built-in on-screen tablet", "what is the size of this model", etc. This functionality is currently used by e.g. GNOME to map built-in tablets to the correct screen. # Adding tablet descriptions to libwacom A common indicator that a device is not supported by libwacom is that it works normally in a GNOME session, but the device is not correctly mapped to the screen. Use the `libwacom-list-local-devices` tool to list all local devices recognized by libwacom. If your device is not listed, but it is available as an event device in the kernel (see `/proc/bus/input/devices`) and in the X session (see `xinput list`), the device is missing from libwacom's database. 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 neccessary 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: ``` $ cp my-tablet-file-from-upstream.tablet /etc/libwacom/ $ 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 /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. # API Documentation The API documentation is available at https://linuxwacom.github.io/libwacom/ libwacom-libwacom-2.2.0/autogen.sh000077500000000000000000000003261421725554000171120ustar00rootroot00000000000000#! /bin/sh srcdir=`dirname $0` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? if test -z "$NOCONFIGURE"; then exec $srcdir/configure "$@" fi libwacom-libwacom-2.2.0/data/000077500000000000000000000000001421725554000160215ustar00rootroot00000000000000libwacom-libwacom-2.2.0/data/bamboo-0fg-m-p-alt.tablet000066400000000000000000000020531421725554000223740ustar00rootroot00000000000000# Wacom # Bamboo Fun # CTE-650 # # Button Map: # (A=1, B=2, C=3, ...) # # AAAA BBBB # CCCC DDDD # *-----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # | | # *-----------------------* # # Default button assignments: # A: Back # B: Forward # C: Left # D: Right # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # A # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # first generation Bamboo # # Pen active area: 8.52 x 5.33in [Device] Name=Wacom Bamboo Fun medium ModelName=CTE-650 DeviceMatch=usb:056a:0018 Class=Bamboo Width=9 Height=5 IntegratedIn= Layout=bamboo-0fg-s-p-alt.svg [Features] Stylus=true Reversible=false Touch=false Buttons=4 Ring=true [Buttons] Top=A;B;C;D EvdevCodes=0x116;0x115;0x110;0x111 libwacom-libwacom-2.2.0/data/bamboo-0fg-s-p-alt.tablet000066400000000000000000000021271421725554000224040ustar00rootroot00000000000000# Wacom # Bamboo Fun # CTE-450 # # Button Map: # (A=1, B=2, C=3, ...) # # AAAA BBBB # CCCC DDDD # *-----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # | | # *-----------------------* # # Default button assignments: # A: Back # B: Forward # C: Left # D: Right # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # A # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # first generation Bamboo # # stylus with two buttons and eraser (LP160E) # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Fun small ModelName=CTE-450 DeviceMatch=usb:056a:0017 Class=Bamboo Width=6 Height=4 IntegratedIn= Layout=bamboo-0fg-s-p-alt.svg [Features] Stylus=true Reversible=false Touch=false Buttons=4 Ring=true [Buttons] Top=A;B;C;D EvdevCodes=0x116;0x115;0x110;0x111 libwacom-libwacom-2.2.0/data/bamboo-0fg-s-p.tablet000066400000000000000000000021031421725554000216200ustar00rootroot00000000000000# Wacom # Bamboo # MTE-450 # # Button Map: # (A=1, B=2, C=3, ...) # # AAAA BBBB # CCCC DDDD # *-----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # | | # *-----------------------* # # Default button assignments: # A: Back # B: Forward # C: Left # D: Right # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # A # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # first generation Bamboo # # stylus with two buttons and no eraser # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Pen ModelName=MTE-450 DeviceMatch=usb:056a:0065 Class=Bamboo Width=6 Height=4 IntegratedIn= Layout=bamboo-0fg-s-p.svg [Features] Stylus=true Reversible=false Touch=false Buttons=4 Ring=true [Buttons] Top=A;B;C;D EvdevCodes=0x116;0x115;0x110;0x111 libwacom-libwacom-2.2.0/data/bamboo-16fg-m-pt.tablet000066400000000000000000000007221421725554000220720ustar00rootroot00000000000000# Wacom # Bamboo Create # CTH-670 # # third generation BambooPT # # stylus with two buttons and eraser (LP170ES); 16FG touch # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in [Device] Name=Wacom Bamboo Create ModelName=CTH-670 DeviceMatch=usb:056a:00df Class=Bamboo Width=6 Height=4 Layout=bamboo-16fg-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-2.2.0/data/bamboo-16fg-s-p.tablet000066400000000000000000000006171421725554000217170ustar00rootroot00000000000000# Wacom # Bamboo Connect # CTL-470 # # third generation BambooPT # # stylus with one button and no eraser (LP170G) # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Connect ModelName=CTL-470 DeviceMatch=usb:056a:00dd Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-2.2.0/data/bamboo-16fg-s-pt.tablet000066400000000000000000000007161421725554000221030ustar00rootroot00000000000000# Wacom # Bamboo Capture # CTH-470 # # third generation BambooPT # # stylus with one button no eraser (LP170G); 16FG touch # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Capture ModelName=CTH-470 DeviceMatch=usb:056a:00de Class=Bamboo Width=6 Height=4 Layout=bamboo-16fg-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-2.2.0/data/bamboo-16fg-s-t.tablet000066400000000000000000000006141421725554000217200ustar00rootroot00000000000000# Wacom # Bamboo Touch # CTT-470 # # third generation BambooPT # # no stylus; 16FG touch # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo 16FG 4x5 ModelName=CTT-470 DeviceMatch=usb:056a:00dc Class=Bamboo Width=6 Height=4 Layout=bamboo-16fg-s-t.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-2.2.0/data/bamboo-2fg-fun-m-pt.tablet000066400000000000000000000014211421725554000225700ustar00rootroot00000000000000# Wacom # Bamboo Fun medium / Bamboo Comic # CTH-661 # # first generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo Fun medium (2FG) ModelName=CTH-661 DeviceMatch=usb:056a:00d3 Class=Bamboo Width=9 Height=5 Layout=bamboo-2fg-fun-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-2fg-fun-s-pt.tablet000066400000000000000000000014141421725554000226000ustar00rootroot00000000000000# Wacom # Bamboo Fun small / Bamboo Craft # CTH-461 # # first generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo Fun small (2FG) ModelName=CTH-461 DeviceMatch=usb:056a:00d2 Class=Bamboo Width=6 Height=4 Layout=bamboo-2fg-fun-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-2fg-m-p.tablet000066400000000000000000000005641421725554000216250ustar00rootroot00000000000000# Wacom # Bamboo Pen medium # CTL-660 # # first generation BambooPT # # stylus with two buttons and no eraser (LP160) # Pen active area: 8.52 x 5.39 in [Device] Name=Wacom Bamboo Pen medium ModelName=CTL-660 DeviceMatch=usb:056a:00d5 Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/bamboo-2fg-s-p.tablet000066400000000000000000000005521421725554000216300ustar00rootroot00000000000000# Wacom # Bamboo Pen # CTL-460 # # first generation BambooPT # # stylus with two buttons and no eraser (LP160) # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Pen small ModelName=CTL-460 DeviceMatch=usb:056a:00d4 Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/bamboo-2fg-s-pt.tablet000066400000000000000000000013451421725554000220150ustar00rootroot00000000000000# Wacom # Bamboo # CTH-460 # # first generation BambooPT # # stylus with two buttons and eraser (LP160E); 2FG touch # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo (2FG) ModelName=CTH-460 DeviceMatch=usb:056a:00d1 Class=Bamboo Width=6 Height=4 Layout=bamboo-2fg-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-2fg-s-t.tablet000066400000000000000000000012571421725554000216370ustar00rootroot00000000000000# Wacom # Bamboo Touch # CTT-460 # # first generation BambooPT # # no stylus; 2FG touch # Touch active area: 4.92 x 3.35in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo Touch (2FG) ModelName=CTT-460 DeviceMatch=usb:056a:00d0 Class=Bamboo Width=5 Height=3 Layout=bamboo-2fg-s-t.svg IntegratedIn= [Features] Stylus=false Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-4fg-fun-m.tablet000066400000000000000000000010061421725554000221500ustar00rootroot00000000000000# Wacom # Bamboo Fun medium / Bamboo Comic # CTH-661(A) # # second generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch (4FG gesture) # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in [Device] Name=Wacom Bamboo Fun medium (2+FG) ModelName=CTH-661(A) DeviceMatch=usb:056a:00d8 Class=Bamboo Width=9 Height=5 Layout=bamboo-4fg-fun-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-4fg-fun-s.tablet000066400000000000000000000010011421725554000221510ustar00rootroot00000000000000# Wacom # Bamboo Fun small / Bamboo Craft # CTH-461(A) # # second generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch (4FG gesture) # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Fun small (2+FG) ModelName=CTH-461(A) DeviceMatch=usb:056a:00d7 Class=Bamboo Width=6 Height=4 Layout=bamboo-4fg-fun-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-4fg-s-pt.tablet000066400000000000000000000007621421725554000220210ustar00rootroot00000000000000# Wacom # Bamboo Pen & Touch # CTH-460(A) # # second generation BambooPT # # stylus with two buttons and eraser (LP160E); 2FG touch (4FG gesture) # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Pen & Touch (2+FG) ModelName=CTH-460(A) DeviceMatch=usb:056a:00d6 Class=Bamboo Width=6 Height=4 Layout=bamboo-4fg-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-4fg-s-t.tablet000066400000000000000000000006361421725554000216410ustar00rootroot00000000000000# Wacom # Bamboo Touch # CTT-460(A) # # second generation BambooPT # # no stylus; 2FG touch (4FG gesture) # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo (2+FG) ModelName=CTT-460(A) DeviceMatch=usb:056a:00d9 Class=Bamboo Width=5 Height=3 Layout=bamboo-4fg-s-t.svg IntegratedIn= [Features] Stylus=false Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-4fg-se-m-pt.tablet000066400000000000000000000010371421725554000224140ustar00rootroot00000000000000# Wacom # Bamboo Special Edition Pen & Touch medium # CTH-661SE # # second generation BambooPT # # stylus with two buttons and eraser (LP161ESE); 2FG touch (4FG gesture) # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in [Device] Name=Wacom Bamboo Special Edition Pen & Touch medium ModelName=CTH-661SE DeviceMatch=usb:056a:00db Class=Bamboo Width=9 Height=5 Layout=bamboo-4fg-se-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-4fg-se-s-pt.tablet000066400000000000000000000010321421725554000224150ustar00rootroot00000000000000# Wacom # Bamboo Special Edition Pen & Touch small # CTH-461SE # # second generation BambooPT # # stylus with two buttons and eraser (LP161ESE); 2FG touch (4FG gesture) # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Special Edition Pen & Touch small ModelName=CTH-461SE DeviceMatch=usb:056a:00da Class=Bamboo Width=6 Height=4 Layout=bamboo-4fg-se-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-2.2.0/data/bamboo-one-m-p.tablet000066400000000000000000000004121421725554000217200ustar00rootroot00000000000000# Wacom # Bamboo One # CTE-660 # # Pen active area: 5.31x8.5 in [Device] Name=Wacom Bamboo1 5x8 Pen ModelName=CTE-660 DeviceMatch=usb:056a:006b Class=Bamboo Width=8 Height=5 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/bamboo-one.tablet000066400000000000000000000003461421725554000212370ustar00rootroot00000000000000# Wacom # Bamboo One # CTF-430 [Device] Name=Bamboo One ModelName=CTF-430 DeviceMatch=usb:056a:0069 Class=Bamboo Width=5 Height=4 IntegratedIn= [Features] Reversible=true Stylus=true Touch=false Ring=false NumStrips=0 Buttons=0 libwacom-libwacom-2.2.0/data/bamboo-pad-wireless.tablet000066400000000000000000000005101421725554000230460ustar00rootroot00000000000000# Wacom # Bamboo Pad Wireless # CTH-300 # # Button events sent from touch interface [Device] Name=Wacom Bamboo Pad Wireless ModelName=CTH-300 DeviceMatch=usb:056a:0319 Class=Bamboo Width=4 Height=3 Layout=bamboo-pad.svg [Features] Stylus=true Reversible=false Touch=true Buttons=2 [Buttons] Bottom=A;B EvdevCodes=0x110;0x111 libwacom-libwacom-2.2.0/data/bamboo-pad.tablet000066400000000000000000000004661421725554000212250ustar00rootroot00000000000000# Wacom # Bamboo Pad # CTH-301 # # Button events sent from touch interface [Device] Name=Wacom Bamboo Pad ModelName=CTH-301 DeviceMatch=usb:056a:0318 Class=Bamboo Width=4 Height=3 Layout=bamboo-pad.svg [Features] Stylus=true Reversible=false Touch=true Buttons=2 [Buttons] Bottom=A;B EvdevCodes=0x110;0x111 libwacom-libwacom-2.2.0/data/cintiq-12wx.tablet000066400000000000000000000020601421725554000213020ustar00rootroot00000000000000# Wacom # Cintiq 12WX # DTZ-1200W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # II | | JJ # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | DISPLAY | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Cintiq 12WX ModelName=DTZ-1200W Class=Cintiq DeviceMatch=usb:056a:00c6 Width=10 Height=7 Layout=cintiq-12wx.svg Styli=@intuos3; IntegratedIn=Display [Features] Stylus=true NumStrips=2 Buttons=10 [Buttons] Left=A;B;C;D;I Right=E;F;G;H;J libwacom-libwacom-2.2.0/data/cintiq-13hd.tablet000066400000000000000000000015661421725554000212520ustar00rootroot00000000000000# Wacom # Cintiq 13HD # DTK-1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle [Device] Name=Wacom Cintiq 13HD ModelName=DTK-1300 Class=Cintiq DeviceMatch=usb:056a:0304 Width=12 Height=7 Layout=cintiq-13hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-2.2.0/data/cintiq-13hdt.tablet000066400000000000000000000017251421725554000214330ustar00rootroot00000000000000# Wacom # Cintiq 13HD touch # DTH-1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle # touch data comes through the usb:056a:0335 interface [Device] Name=Wacom Cintiq 13HD touch ModelName=DTH-1300 Class=Cintiq DeviceMatch=usb:056a:0333 PairedID=usb:056a:0335 Width=12 Height=7 Layout=cintiq-13hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-2.2.0/data/cintiq-16-2.tablet000066400000000000000000000004461421725554000210740ustar00rootroot00000000000000# Wacom # Cintiq 16 # DTK-1660 [Device] Name=Wacom Cintiq 16 ModelName=DTK-1660 Class=Cintiq DeviceMatch=usb:056a:03ae Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/cintiq-16.tablet000066400000000000000000000004461421725554000207350ustar00rootroot00000000000000# Wacom # Cintiq 16 # DTK-1660 [Device] Name=Wacom Cintiq 16 ModelName=DTK-1660 Class=Cintiq DeviceMatch=usb:056a:0390 Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/cintiq-20wsx.tablet000066400000000000000000000023111421725554000214630ustar00rootroot00000000000000# Wacom # Cintiq 20WSX # DTZ-2000W # # Button Map: # (A=1, B=2, C=3, ...) # (NOTE: This map has *not* been verified.) # # *-----------------------* # | | # | | # KL | | MN # | | # II | | JJ # CA | | EG # CA | DISPLAY | EG # CB | | FG # CB | | FG # DD | | HH # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # (NOTE: This map has *not* been verified.) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # [Device] Name=Wacom Cintiq 20WSX ModelName=DTZ-2000W DeviceMatch=usb:056a:00c5 Class=Cintiq Width=17 Height=11 Layout=cintiq-20wsx.svg Styli=@intuos3; IntegratedIn=Display [Features] Reversible=false Stylus=true NumStrips=2 Buttons=14 [Buttons] Left=A;B;C;D;I;K;L Right=E;F;G;H;J;M;N libwacom-libwacom-2.2.0/data/cintiq-21ux.tablet000066400000000000000000000016641421725554000213110ustar00rootroot00000000000000# Wacom # Cintiq 21UX # DTZ-2100 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # CA | | EG # CA | | EG # CB | DISPLAY | FG # CB | | FG # DD | | HH # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Cintiq 21UX ModelName=DTZ-2100 DeviceMatch=usb:056a:003f Class=Cintiq Width=17 Height=13 Layout=cintiq-21ux.svg Styli=@intuos3; IntegratedIn=Display [Features] Reversible=false Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-2.2.0/data/cintiq-21ux2.tablet000066400000000000000000000027131421725554000213670ustar00rootroot00000000000000# Wacom # Cintiq 21UX [2nd generation] # DTK-2100 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | K # C | | L # D | | M # E | | N # A | DISPLAY | J # F | | O # G | | P # H | | Q # I | | R # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 10 | | 00 # 11 | | 01 # 12 | DISPLAY | 02 # 13 | | 03 # | | # *-----------------------* # [Device] Name=Wacom Cintiq 21UX2 ModelName=DTK-2100 DeviceMatch=usb:056a:00cc Class=Cintiq Width=17 Height=13 Layout=cintiq-21ux2.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Ring=false NumStrips=2 Buttons=18 StatusLEDs=Touchstrip2;Touchstrip [Buttons] Left=B;C;D;E;A;F;G;H;I Right=K;L;M;N;J;O;P;Q;R Touchstrip=A Touchstrip2=J StripsNumModes=4 libwacom-libwacom-2.2.0/data/cintiq-22.tablet000066400000000000000000000004471421725554000207330ustar00rootroot00000000000000# Wacom # Cintiq 22 # DTK-2260 [Device] Name=Wacom Cintiq 22 ModelName=DTK-2260 Class=Cintiq DeviceMatch=usb:056a:0391 Width=19 Height=10 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/cintiq-22hd.tablet000066400000000000000000000022521421725554000212430ustar00rootroot00000000000000 # Wacom # Cintiq 22HD # DTK-2200 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | K # C | | L # D | | M # E | | N # A | DISPLAY | J # F | | O # G | | P # H | | Q # I | | R # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # [Device] Name=Wacom Cintiq 22HD ModelName=DTK-2200 DeviceMatch=usb:056a:00fa Class=Cintiq Width=19 Height=11 Layout=cintiq-22hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false NumStrips=2 Buttons=18 [Buttons] Left=B;C;D;E;A;F;G;H;I Right=K;L;M;N;J;O;P;Q;R Touchstrip=A Touchstrip2=J # Note: no physical LEDs to show mode StripsNumModes=4 libwacom-libwacom-2.2.0/data/cintiq-22hdt.tablet000066400000000000000000000024101421725554000214230ustar00rootroot00000000000000# Wacom # Cintiq 22HD touch # DTH-2200 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | K # C | | L # D | | M # E | | N # A | DISPLAY | J # F | | O # G | | P # H | | Q # I | | R # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # # Note: touch data comes through the usb:056a:005e interface [Device] Name=Wacom Cintiq 22HD touch ModelName=DTH-2200 DeviceMatch=usb:056a:005b PairedID=usb:056a:005e Class=Cintiq Width=19 Height=11 Layout=cintiq-22hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false NumStrips=2 Buttons=18 [Buttons] Left=B;C;D;E;A;F;G;H;I Right=K;L;M;N;J;O;P;Q;R Touchstrip=A Touchstrip2=J # Note: no physical LEDs to show mode StripsNumModes=4 libwacom-libwacom-2.2.0/data/cintiq-24hd-touch.tablet000066400000000000000000000026311421725554000223660ustar00rootroot00000000000000# Wacom # Cintiq 24HD touch # DTH-2400 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | I # B | | J # C | DISPLAY | K # DEFF | | NNML # DEGG | | OOML # DEHH | | PPML # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | DISPLAY | B # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # 10 | | 00 # 11 | | 01 # 12 | DISPLAY | 02 # 1* | | 0* # | | # *-----------------------* # # Note: touch data comes through the usb:056a:00f6 interface [Device] Name=Wacom Cintiq 24HD touch ModelName=DTH-2400 DeviceMatch=usb:056a:00f8 PairedID=usb:056a:00f6 Class=Cintiq Width=21 Height=13 Layout=cintiq-24hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Buttons=16 Ring=true Ring2=true StatusLEDs=Ring2;Ring [Buttons] Left=A;B;C;D;E;F;G;H Right=I;J;K;L;M;N;O;P Ring=A;B;C Ring2=I;J;K libwacom-libwacom-2.2.0/data/cintiq-24hd.tablet000066400000000000000000000024721421725554000212510ustar00rootroot00000000000000# Wacom # Cintiq 24HD # DTK-2400 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | I # B | | J # C | DISPLAY | K # DEFF | | NNML # DEGG | | OOML # DEHH | | PPML # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | DISPLAY | B # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # 10 | | 00 # 11 | | 01 # 12 | DISPLAY | 02 # 1* | | 0* # | | # *-----------------------* # [Device] Name=Wacom Cintiq 24HD ModelName=DTK-2400 DeviceMatch=usb:056a:00f4 Class=Cintiq Width=21 Height=13 Layout=cintiq-24hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Buttons=16 Ring=true Ring2=true StatusLEDs=Ring2;Ring [Buttons] Left=A;B;C;D;E;F;G;H Right=I;J;K;L;M;N;O;P Ring=A;B;C Ring2=I;J;K libwacom-libwacom-2.2.0/data/cintiq-27hd.tablet000066400000000000000000000004161421725554000212500ustar00rootroot00000000000000# Wacom # Cintiq 27QHD # DTK-2700 # [Device] Name=Wacom Cintiq 27QHD ModelName=DTK-2700 DeviceMatch=usb:056a:032a Class=Cintiq Width=24 Height=12 Styli=@intuos5; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Buttons=0 Ring=false Ring2=false libwacom-libwacom-2.2.0/data/cintiq-27hdt.tablet000066400000000000000000000005551421725554000214400ustar00rootroot00000000000000# Wacom # Cintiq 27QHD touch # DTH-2700 # # Note: touch data comes through the usb:056a:032c interface [Device] Name=Wacom Cintiq 27QHD touch ModelName=DTH-2700 DeviceMatch=usb:056a:032b PairedID=usb:056a:032c Class=Cintiq Width=24 Height=12 Styli=@intuos5; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Buttons=0 Ring=false Ring2=false libwacom-libwacom-2.2.0/data/cintiq-companion-2.tablet000066400000000000000000000020471421725554000226300ustar00rootroot00000000000000# Wacom # Cintiq Companion # DTH-W1310 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # | | # I | | # J A H | DISPLAY | # K | | # | | # E | | # F | | # G | | # | | # *-----------------------* # # Note: Buttons H, I, J, K are on a circle # # Note: touch data comes through the usb:056a:0326 interface # [Device] Name=Wacom Cintiq Companion 2 ModelName=DTH-W1310 Class=Cintiq DeviceMatch=usb:056a:0325 PairedID=usb:056a:0326 Width=12 Height=7 Layout=cintiq-companion-2.svg Styli=@intuos5;@intuos4; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=false Buttons=11 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K libwacom-libwacom-2.2.0/data/cintiq-companion-hybrid.tablet000066400000000000000000000017631421725554000237540ustar00rootroot00000000000000# Wacom # Cintiq Companion Hybrid # DTH-A1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle # # Note: touch data comes through the usb:056a:0309 interface # [Device] Name=Wacom Cintiq Companion Hybrid ModelName=DTH-A1300 Class=Cintiq DeviceMatch=usb:056a:0307 PairedID=usb:056a:0309 Width=12 Height=7 Layout=cintiq-companion-hybrid.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-2.2.0/data/cintiq-companion.tablet000066400000000000000000000017241421725554000224720ustar00rootroot00000000000000# Wacom # Cintiq Companion # DTH-W1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle # # Note: touch data comes through the usb:056a:030c interface # [Device] Name=Wacom Cintiq Companion ModelName=DTH-W1300 Class=Cintiq DeviceMatch=usb:056a:030a PairedID=usb:056a:030c Width=12 Height=7 Layout=cintiq-companion.svg Styli=@intuos5;@intuos4; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-2.2.0/data/cintiq-pro-13.tablet000066400000000000000000000021211421725554000215200ustar00rootroot00000000000000# Wacom # Cintiq Pro 13 # DTH-1320 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Mode change (Display/Opaque) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 13 ModelName=DTH-1320 Class=Cintiq DeviceMatch=usb:056a:034f PairedID=usb:056a:0353 Width=12 Height=7 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/cintiq-pro-16-2.tablet000066400000000000000000000017131421725554000216700ustar00rootroot00000000000000# Wacom # Cintiq Pro 16 # DTH167 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # A | | E # B | | F # C | | G # D | | H # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # NOTE: Buttons are on the back side of the device rather # than on the top bezel. # [Device] Name=Wacom Cintiq Pro 16 ModelName=DTH167 Class=Cintiq DeviceMatch=usb:056a:03b2 PairedID=usb:056a:03b3 Width=14 Height=8 Layout=cintiq-pro-16-2.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-2.2.0/data/cintiq-pro-16.tablet000066400000000000000000000021211421725554000215230ustar00rootroot00000000000000# Wacom # Cintiq Pro 16 # DTH-1620 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Mode change (Display/Opaque) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 16 ModelName=DTH-1620 Class=Cintiq DeviceMatch=usb:056a:0350 PairedID=usb:056a:0354 Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/cintiq-pro-24-p.tablet000066400000000000000000000021221421725554000217600ustar00rootroot00000000000000# Wacom # Cintiq Pro 24 P # DTK-2420 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Change display source (DisplayPort, USB-C, etc.) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 24 ModelName=DTK-2420 Class=Cintiq DeviceMatch=usb:056a:037c Width=20 Height=12 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/cintiq-pro-24-pt.tablet000066400000000000000000000021511421725554000221460ustar00rootroot00000000000000# Wacom # Cintiq Pro 24 PT # DTH-2420 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Change display source (DisplayPort, USB-C, etc.) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 24 ModelName=DTH-2420 Class=Cintiq DeviceMatch=usb:056a:0351 PairedID=usb:056a:0355 Width=20 Height=12 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/cintiq-pro-32.tablet000066400000000000000000000021461421725554000215300ustar00rootroot00000000000000# Wacom # Cintiq Pro 32 # DTH-3220 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Change display source (DisplayPort, USB-C, etc.) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 32 ModelName=DTH-3220 Class=Cintiq DeviceMatch=usb:056a:0352 PairedID=usb:056a:0356 Width=27 Height=15 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/dell-canvas-27.tablet000066400000000000000000000014021421725554000216320ustar00rootroot00000000000000# Dell # Canvas 27 # # # # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # [Device] Name=Dell Canvas 27 ModelName= Class=Cintiq DeviceMatch=usb:056a:4200 PairedID=usb:2575:0204 Width=23 Height=13 # No pad buttons, so no layout Styli=0xffffd; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/dtf-720.tablet000066400000000000000000000003761421725554000203070ustar00rootroot00000000000000# Wacom # DTF-720 Interactive Pen Display # # FIXME: This file has not been verified yet [Device] Name=Wacom DTF-720 ModelName=DTF-720 DeviceMatch=usb:056a:00c0 Width=13 Height=11 Class=PenDisplay IntegratedIn=Display [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/dth-1152.tablet000066400000000000000000000005531421725554000203660ustar00rootroot00000000000000# Wacom # DTH-1152 Interactive Pen Display # # Note: Stylus does not have an eraser [Device] Name=Wacom DTH1152 ModelName=DTH-1152 DeviceMatch=usb:056a:035a PairedID=usb:056a:0368 Class=PenDisplay Width=9 Height=5 #No ExpressKeys, so no layout IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Ring2=false NumStrips=0 Buttons=0 libwacom-libwacom-2.2.0/data/dth-2242.tablet000066400000000000000000000014071421725554000203660ustar00rootroot00000000000000# Wacom # DTH-2242 Interactive Pen and Touch Display # # Button Map: # (A=1, B=2, C=3, ...) # # A B C D E F # *-----------------* # | | # | DISPLAY | # | | # *-----------------* # # Note: touch data comes through the usb:056a:005d interface [Device] Name=Wacom DTH2242 ModelName=DTH-2242 DeviceMatch=usb:056a:0059 PairedID=usb:056a:005d Class=PenDisplay Width=19 Height=11 Layout=dth-2242.svg Styli=@dth2242; IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=true Ring=false Ring2=false NumStrips=0 # Actually 7 buttons but one is reserved for onscreen menus Buttons=6 [Buttons] Top=A;B;C;D;E;F libwacom-libwacom-2.2.0/data/dth-2452.tablet000066400000000000000000000011771421725554000203750ustar00rootroot00000000000000# Wacom # DTH-2452 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------* # | | A # | | B # | DISPLAY | # | | C # | | D # *-----------------* # [Device] Name=Wacom DTH2452 ModelName=DTH-2452 DeviceMatch=usb:056a:037d PairedID=usb:056a:037e Class=PenDisplay Width=20 Height=12 Layout=dth-2452.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Ring2=false NumStrips=0 # Actually 5 buttons but one is reserved for onscreen menus Buttons=4 [Buttons] Right=A;B;C;D libwacom-libwacom-2.2.0/data/dti-520.tablet000066400000000000000000000014071421725554000203040ustar00rootroot00000000000000# Wacom # DTI-520 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # F G H I J # *-----------------* # | | # | DISPLAY | # | | # *-----------------* # D # B A C B # E [Device] Name=Wacom DTI520UB/L ModelName=DTI-520 DeviceMatch=usb:056a:003a Class=PenDisplay Width=14 Height=12 Layout=dti-520.svg # FIXME does the stylus have an eraser? # Styli=0xfffff; IntegratedIn=Display [Features] # This tablet does not appear to support erasers on styli Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 # Actually 11 buttons but the two Ctrl ones send the same scancode Buttons=10 [Buttons] Top=F;G;H;I;J Bottom=B;A;D;E;C;B libwacom-libwacom-2.2.0/data/dtk-1651.tablet000066400000000000000000000010521421725554000203700ustar00rootroot00000000000000# Wacom # DTK-1651 Interactive Pen Display # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------* # | | D # | | C # | DISPLAY | # | | B # | | A # *-----------------* # [Device] Name=Wacom DTK1651 ModelName=DTK-1651 DeviceMatch=usb:056a:0343 Class=PenDisplay Width=14 Height=8 Layout=dtk-1651.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Right=A;B;C;D libwacom-libwacom-2.2.0/data/dtk-1660e-2.tablet000066400000000000000000000004341421725554000206770ustar00rootroot00000000000000# Wacom # DTK-1660E [Device] Name=Wacom DTK-1660E ModelName=DTK-1660E Class=Cintiq DeviceMatch=usb:056a:03b0 Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/dtk-1660e.tablet000066400000000000000000000004341421725554000205400ustar00rootroot00000000000000# Wacom # DTK-1660E [Device] Name=Wacom DTK-1660E ModelName=DTK-1660E Class=Cintiq DeviceMatch=usb:056a:0396 Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/dtk-2241.tablet000066400000000000000000000012521421725554000203660ustar00rootroot00000000000000# Wacom # DTK-2241 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # A B C D E F # *-----------------* # | | # | DISPLAY | # | | # *-----------------* # [Device] Name=Wacom DTK2241 ModelName=DTK-2241 DeviceMatch=usb:056a:0057 Class=PenDisplay Width=19 Height=11 Layout=dth-2242.svg Styli=@dth2242; IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 # Actually 7 buttons but one is reserved for onscreen menus Buttons=6 [Buttons] Top=A;B;C;D;E;F libwacom-libwacom-2.2.0/data/dtk-2451.tablet000066400000000000000000000011511421725554000203670ustar00rootroot00000000000000# Wacom # DTK-2451 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------* # | | A # | | B # | DISPLAY | # | | C # | | D # *-----------------* # [Device] Name=Wacom DTK2451 ModelName=DTK-2451 DeviceMatch=usb:056a:0382 Class=PenDisplay Width=20 Height=12 Layout=dtk-2451.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 # Actually 5 buttons but one is reserved for onscreen menus Buttons=4 [Buttons] Right=A;B;C;D libwacom-libwacom-2.2.0/data/dtu-1031.tablet000066400000000000000000000011711421725554000203740ustar00rootroot00000000000000# Wacom # DTU-1031 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # A *-----------------* # B | | # C | | # D | DISPLAY | # | | # | | # *-----------------* # [Device] Name=Wacom DTU1031 ModelName=DTU-1031 DeviceMatch=usb:056a:00fb Class=PenDisplay Width=9 Height=5 Layout=dtu-1031.svg IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Left=A;B;C;D libwacom-libwacom-2.2.0/data/dtu-1031x.tablet000066400000000000000000000005521421725554000205660ustar00rootroot00000000000000# Wacom # DTU-1031X Interactive Pen Display # [Device] Name=Wacom DTU1031X ModelName=DTU-1031X DeviceMatch=usb:056a:032f Class=PenDisplay Width=9 Height=5 IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=0 libwacom-libwacom-2.2.0/data/dtu-1141.tablet000066400000000000000000000012131421725554000203730ustar00rootroot00000000000000# Wacom # DTU-1141 Interactive Pen Display # Button Map: # (A=1, B=2, C=3, ...) # # A B C D # *-----------------* # | | # | | # | DISPLAY | # | | # | | # *-----------------* # [Device] Name=Wacom DTU1141 ModelName=DTU-1141 DeviceMatch=usb:056a:0336 Class=PenDisplay Width=9 Height=5 Layout=dtu-1141.svg IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/dtu-1141b.tablet000066400000000000000000000010701421725554000205360ustar00rootroot00000000000000# Wacom # DTU-1141B Interactive Pen Display # Button Map: # (A=1, B=2, C=3, ...) # # A B C D # *-----------------* # | | # | | # | DISPLAY | # | | # | | # *-----------------* # [Device] Name=Wacom DTU1141B ModelName=DTU-1141B DeviceMatch=usb:056a:0359 Class=PenDisplay Width=9 Height=5 Layout=dtu-1141b.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/dtu-1631.tablet000066400000000000000000000004001421725554000203740ustar00rootroot00000000000000# Wacom # DTU-1631 Interactive Pen Display # # FIXME: This file has not been verified yet [Device] Name=Wacom DTU-1631 ModelName=DTU-1631 DeviceMatch=usb:056a:00f0 Width=14 Height=8 Class=PenDisplay IntegratedIn=Display [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/dtu-1931.tablet000066400000000000000000000003231421725554000204030ustar00rootroot00000000000000# Wacom # DTU-1931 Interactive Pen Display # [Device] Name=Wacom DTU-1931 ModelName=DTU-1931 DeviceMatch=usb:056a:00c7 Width=15 Height=12 Class=PenDisplay IntegratedIn=Display [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/dtu-2231.tablet000066400000000000000000000003241421725554000203760ustar00rootroot00000000000000# Wacom # DTU-2231 Interactive Pen Display # [Device] Name=Wacom DTU-2231 ModelName=DTU-2231 DeviceMatch=usb:056a:00ce Class=PenDisplay Width=19 Height=11 IntegratedIn=Display [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/ek-remote.tablet000066400000000000000000000012211421725554000211020ustar00rootroot00000000000000# Wacom # ExpressKey Remote # ACK-411050 # # C D # B A E # F # G H I # J K L # M N O # P # Q R [Device] Name=Wacom ExpressKey Remote ModelName=ACK-411050 DeviceMatch=usb:056a:0331 Layout=ek-remote.svg Class=Remote [Features] Stylus=false Ring=true NumStrips=0 Buttons=18 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107;0x108;0x109;0x130;0x131;0x132;0x133;0x134;0x135;0x126;0x127 #Note that though this device has 3 ring modes #this mode selection does not function the same #as previous devices. The EKR's mode is read-only. RingNumModes=3 Ring=A libwacom-libwacom-2.2.0/data/elan-0732.tablet000066400000000000000000000003651421725554000205320ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP envy x360 Convertible 13-ag0xxx [Device] Name=ELAN 0732 ModelName= DeviceMatch=i2c:04f3:271c Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2072.tablet000066400000000000000000000004121421725554000205220ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Spectre x360 Convertible 13-40xx [Device] Name=ELAN 2072 ModelName= DeviceMatch=usb:04f3:2072 Width=12 Height=7 Class=PenDisplay IntegratedIn=Display;System Styli=0xffffd; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-22e2.tablet000066400000000000000000000004171421725554000206070ustar00rootroot00000000000000# Used in the HP Spectre X360 [Device] Name=ELAN 22E2 ModelName= DeviceMatch=i2c:04f3:22e2 Class=ISDV4 IntegratedIn=Display;System Styli=0xffffe;0xfffff; [Features] Stylus=true Reversible=false Touch=false TouchSwitch=false Ring=false Ring2=false NumStrips=0 Buttons=0 libwacom-libwacom-2.2.0/data/elan-24d8.tablet000066400000000000000000000005211421725554000206120ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP ProBook 435 G7 [Device] Name=ELAN 24D8 ModelName= DeviceMatch=i2c:04f3:2ad8; Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System; Styli=0xffffe;0xfffff; [Features] Reversible=false Stylus=true Ring=false Ring2=false Touch=true TouchSwitch=false # StatusLEDs= NumStrips=0 Buttons=0 libwacom-libwacom-2.2.0/data/elan-24db.tablet000066400000000000000000000003671421725554000206740ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Spectre x360 Convertible 13-ac0XX [Device] Name=ELAN 24DB ModelName= DeviceMatch=i2c:04f3:24db Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2513.tablet000066400000000000000000000005401421725554000205240ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Pavilion x360 Convertible 14-dh0xxx # sysinfo.6IzIUhfUYF # https://github.com/linuxwacom/wacom-hid-descriptors/issues/163#issue-936701718 [Device] Name=ELAN 2513 ModelName= DeviceMatch=i2c:04f3:2b5f Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2514-alt.tablet000066400000000000000000000005201421725554000213010ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Pavilion x360 Convertible 14-dh0xxx # sysinfo.fpvLP66qoQ # https://github.com/linuxwacom/wacom-hid-descriptors/issues/85 [Device] Name=ELAN 2514 ModelName= DeviceMatch=i2c:004f3:23db Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2514-alt2.tablet000066400000000000000000000007551421725554000213750ustar00rootroot00000000000000# ELAN touchscreen/pen # # HP Envy x360 Converti0ble 15-dr1xxx # # i2c:04f3:29cf # sysinfo.uFNKtCProZ # https://github.com/linuxwacom/wacom-hid-descriptors/issues/102 # # # i2c:04f3:25bf # HP Spectre x360 Convertible 15t-ch000 # sysinfo.xibMWZk1d9 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/128 [Device] Name=ELAN 2514 ModelName= DeviceMatch=i2c:04f3:29cf;i2c:04f3:25bf; Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2514.tablet000066400000000000000000000020131421725554000205220ustar00rootroot00000000000000# ELAN touchscreen/pen sensor # i2c:04f3:29f5 # # HP Spectre x360 Convertible 13-aw0xxx # i2c:04f3:2af4 # # HP Envy x360 Convertible 13-ay0xxx # # sysinfo.L1vXaj9Wcz # https://github.com/linuxwacom/wacom-hid-descriptors/issues/110 # i2c:04f3:2813 # # HP Spectre x360 Convertible 13-ap0xxx # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/127 # i2c:04f3:2817 # # HP Spectre x360 Convertible 15-df0xxx # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/70 # i2c:04f3:2b0a # # HP Envy x360 Convertible 15z-ee000 # i2c:04f3:23f3 # # HP Envy x360 Convertible 15-dr1xxx # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/140 # i2c:04f3:2718 # # HP Envy x360 Convertible 14-cd0xxx # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/155 [Device] Name=ELAN 2514 ModelName= DeviceMatch=i2c:04f3:29f5;i2c:04f3:2af4;i2c:04f3:2813;i2c:04f3:2817;i2c:04f3:2b0a;i2c:04f3:23f3;i2c:04f3:2718 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2537.tablet000066400000000000000000000003651421725554000205370ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP ENVY x360 Convertible 15m-bq1xx [Device] Name=ELAN 2537 ModelName= DeviceMatch=i2c:04f3:2537 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2627.tablet000066400000000000000000000003651421725554000205370ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP envy x360 Convertible 13-ag0xxx [Device] Name=ELAN 2627 ModelName= DeviceMatch=i2c:04f3:2627 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2628.tablet000066400000000000000000000003641421725554000205370ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP envy x360 Convertible 13-ag0xxx [Device] Name=ELAN 2628 ModelName= DeviceMatch=i2c:04f3:2628 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-262b.tablet000066400000000000000000000003651421725554000206120ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP envy x360 Convertible 13-ag0xxx [Device] Name=ELAN 262b ModelName= DeviceMatch=i2c:04f3:262b Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-264c.tablet000066400000000000000000000005571421725554000206200ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Envy x360 Convertible 15-cp0XXX [Device] Name=ELAN touchscreen/pen sensor ModelName=ELAN-264C DeviceMatch=i2c:04f3:264c Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System # This device supports both pens with eraser and without eraser Styli=0xffffd;0xffffe;0xfffff; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-29a1.tablet000066400000000000000000000004751421725554000206150ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the ASUS ZenBook Pro Duo UX581GV # this is the secondary / bottom touchscreen # 345mm x 99mm # 13.59in x 3.9in [Device] Name=ELAN 29A1 ModelName= DeviceMatch=i2c:04f3:29a1 Class=ISDV4 Width=14 Height=4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-29b6.tablet000066400000000000000000000004671421725554000206240ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the ASUS ZenBook Pro Duo UX581GV # this is the main / top touchscreen # 345mm x 194mm # 13.59in x 7.64in [Device] Name=ELAN 29B6 ModelName= DeviceMatch=i2c:04f3:29b6 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2a70.tablet000066400000000000000000000004671421725554000206130ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP ProBook X360 11 G5 EE # https://github.com/linuxwacom/wacom-hid-descriptors/issues/185 # sysinfo.B2HOmo20Hc [Device] Name=ELAN1001 DeviceMatch=i2c:04f3:2a70 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2ad9.tablet000066400000000000000000000004571421725554000207000ustar00rootroot00000000000000# ELAN touchscreen/pen sensor in the HP Probook x360 435 G7 # # sysinfo.9FNnwQKhog # https://github.com/linuxwacom/wacom-hid-descriptors/issues/165 [Device] Name=ELAN 2AD9 DeviceMatch=i2c:04f3:2ad9 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-2bb3.tablet000066400000000000000000000004711421725554000206650ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the ASUS ZenBook Flip S13 OLED UX371 # # sysinfo.rrI71nO76F # https://github.com/linuxwacom/wacom-hid-descriptors/issues/179 [Device] Name=ELAN 2BB3 ModelName= DeviceMatch=i2c:04f3:2bb3 Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/elan-5515.tablet000066400000000000000000000003071421725554000205320ustar00rootroot00000000000000# ELAN touchscreen/pen present in the Acer Switch SA5-271P [Device] Name=ELAN 5515 ModelName= DeviceMatch=i2c:04f3:2339 Class=ISDV4 IntegratedIn=Display [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/gaomon-s620.tablet000066400000000000000000000010511421725554000211630ustar00rootroot00000000000000# GAOMON # S620 # # This tablet masquerades as a Huion (vendor 256c) tablet despite not being the # same manufacturer. # # The pen is visually identical to that from the Huion 420, so the Styli # parameter has been copied from it. # [Device] Name=GAOMON S620 ModelName= DeviceMatch=usb:256c:006d:GAOMON Gaomon Tablet Pen;usb:256c:006d:GAOMON Gaomon Tablet Pad; Class=Bamboo Width=6 Height=4 Layout=gaomon-s620.svg IntegratedIn= Styli=0xffffd; [Features] Stylus=true Reversible=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-2.2.0/data/generic.tablet000066400000000000000000000002041421725554000206260ustar00rootroot00000000000000[Device] Name=Generic ModelName=generic DeviceMatch=generic [Features] Reversible=true Stylus=true Ring=true NumStrips=2 Buttons=4 libwacom-libwacom-2.2.0/data/graphire-usb.tablet000066400000000000000000000007641421725554000216150ustar00rootroot00000000000000# Wacom # Graphire # ET-0405 # # Button Map: # (A=1, B=2, C=3, ...) # # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire ModelName=ET-0405 DeviceMatch=usb:056a:0010 Class=Graphire Width=5 Height=4 [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/graphire-wireless-8x6.tablet000066400000000000000000000010531421725554000232740ustar00rootroot00000000000000# Wacom # Graphire Wireless # CTE-630BT # # Button Map: # (A=1, B=2, C=3, ...) # # A B # *-------------------* # | | # | | # | TABLET | # | | # | | # | | # *-------------------* [Device] Name=Wacom Graphire Wireless ModelName=CTE-630BT DeviceMatch=bluetooth:056a:0081 Class=Graphire Width=8 Height=6 Layout=graphire-wireless-8x6.svg IntegratedIn= [Features] Reversible=false Stylus=true Ring=false Buttons=2 [Buttons] Top=A;B libwacom-libwacom-2.2.0/data/graphire2-4x5.tablet000066400000000000000000000010001421725554000215060ustar00rootroot00000000000000# Wacom # Graphire2 4x5 # ET-0405A # # Button Map: # (A=1, B=2, C=3, ...) # # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire2 4x5 ModelName=ET-0405A DeviceMatch=usb:056a:0011 Class=Graphire Width=5 Height=4 [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/graphire2-5x7.tablet000066400000000000000000000010001421725554000215110ustar00rootroot00000000000000# Wacom # Graphire2 5x7 # ET-0507A # # Button Map: # (A=1, B=2, C=3, ...) # # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire2 5x7 ModelName=ET-0507A DeviceMatch=usb:056a:0012 Class=Graphire Width=7 Height=5 [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/graphire3-4x5.tablet000066400000000000000000000002731421725554000215220ustar00rootroot00000000000000 [Device] # Model CTE-430 (Sapphire) (CTE-430/B) Name=Wacom Graphire3 4x5 ModelName=CTE-430 DeviceMatch=usb:056a:0013 Class=Graphire Width=5 Height=4 [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/graphire3-6x8.tablet000066400000000000000000000002731421725554000215270ustar00rootroot00000000000000 [Device] # Model CTE-630 (Sapphire) (CTE-630/B) Name=Wacom Graphire3 6x8 ModelName=CTE-630 DeviceMatch=usb:056a:0014 Class=Graphire Width=8 Height=6 [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/graphire4-4x5.tablet000066400000000000000000000011001421725554000215110ustar00rootroot00000000000000# Wacom # Graphire4 4x5 # CTE-440 # # Button Map: # (A=1, B=2, C=3, ...) # # AA BB # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire4 4x5 ModelName=CTE-440 DeviceMatch=usb:056a:0015 Class=Graphire Width=5 Height=4 Layout=graphire4-4x5.svg [Features] Stylus=true Buttons=2 [Buttons] Top=A;B libwacom-libwacom-2.2.0/data/graphire4-6x8.tablet000066400000000000000000000011271421725554000215270ustar00rootroot00000000000000# Wacom # Graphire4 6x8 # CTE-640 # # Button Map: # (A=1, B=2, C=3, ...) # # AA BB # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire4 6x8 ModelName=CTE-640 DeviceMatch=usb:056a:0016 Class=Graphire Width=8 Height=6 Layout=graphire4-6x8.svg [Features] Stylus=true Buttons=2 [Buttons] Top=A;B EvdevCodes=0x116;0x115 libwacom-libwacom-2.2.0/data/hp-pro-tablet-408.tablet000066400000000000000000000005051421725554000222050ustar00rootroot00000000000000# This is for the HP Pro Tablet 408 # # Synaptics I2C sensor # Makes use of a HP branded stylus # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/137 [Device] Name=HP Pro Tablet 408 Class=ISDV4 DeviceMatch=i2c:06cb:125d Width=4 Height=7 IntegratedIn=Display;System; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/huion-420.tablet000066400000000000000000000003471421725554000206470ustar00rootroot00000000000000# HUION # H420 # [Device] Name=Huion 420 ModelName= DeviceMatch=usb:256c:006e:HUION 420 Pen;usb:256c:006e:HUION 420 Pad; Class=Bamboo Width=4 Height=2 IntegratedIn= Styli=0xffffd; [Features] Stylus=true Reversible=true Buttons=0 libwacom-libwacom-2.2.0/data/huion-h420.tablet000066400000000000000000000011201421725554000210050ustar00rootroot00000000000000# HUION # H420 # # Button Map: # (A=1, B=2, C=3) # # *-----------------------* # A | | # | | # B | TABLET | # | | # C | | # *-----------------------* [Device] Name=Huion H420 ModelName= DeviceMatch=usb:256c:006e:HUION H420 Pen;usb:256c:006e:HUION H420 Pad; Class=Bamboo Width=4 Height=2 IntegratedIn= Layout=huion-h420.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=3 [Buttons] Left=A;B;C EvdevCodes=0x100;0x101;0x102; libwacom-libwacom-2.2.0/data/huion-h610-pro.tablet000066400000000000000000000011031421725554000216050ustar00rootroot00000000000000# HUION # H610 Pro # [Device] Name=Huion H610 Pro ModelName= DeviceMatch=usb:256c:006e:HUION PenTablet Pen;usb:256c:006e:HUION PenTablet Pad;usb:256c:006e:Turcom TS-6610 Pen;usb:256c:006e:Turcom TS-6610 Pad;usb:256c:006e:HUION Huion Tablet Pen;usb:256c:006e:HUION Huion Tablet Pad;usb:256c:006e:HUION H610 Pen;usb:256c:006e:HUION H610 Pad Class=Bamboo Width=10 Height=6 IntegratedIn= Layout=huion-h610-pro.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=8 [Buttons] Left=A;B;C;D;E;F;G;H EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107 libwacom-libwacom-2.2.0/data/huion-h640p.tablet000066400000000000000000000014511421725554000212000ustar00rootroot00000000000000# HUION # H640P # # *-------------------------------* # A | | # B | | # C | | # | DISPLAY | # D | | # E | | # F | | # *-------------------------------* # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/145 [Device] Name=Huion H640P ModelName= DeviceMatch=usb:256c:006d:HUION Huion Tablet_H640P Pad;usb:256c:006d:HUION Huion Tablet_H640P Pen Class=Bamboo Width=6 Height=4 IntegratedIn= Layout=huion-h640p.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=6 [Buttons] Left=A;B;C;D;E;F EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105 libwacom-libwacom-2.2.0/data/huion-h950p.tablet000066400000000000000000000006441421725554000212070ustar00rootroot00000000000000# HUION # H950P # Autogenerated from sysinfo.5rJ4iuOykV # https://github.com/linuxwacom/wacom-hid-descriptors/issues/124 [Device] Name=Huion H950P ModelName= DeviceMatch=usb:256c:006d Class=Bamboo Width=9 Height=5 IntegratedIn= Layout=huion-h950p.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=8 [Buttons] Left=A;B;C;D;E;F;G;H EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107 libwacom-libwacom-2.2.0/data/huion-new-1060-plus.tablet000066400000000000000000000006511421725554000224760ustar00rootroot00000000000000# HUION # New 1060 Plus # [Device] Name=Huion New 1060 Plus ModelName= DeviceMatch=usb:256c:006e:HID 256c:006e Pen;usb:256c:006e:HID 256c:006e Pad Class=Bamboo Width=10 Height=6 IntegratedIn= Layout=huion-new-1060-plus.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=12 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107;0x108;0x109;0x130;0x131 libwacom-libwacom-2.2.0/data/intuos-12x12.tablet000066400000000000000000000003211421725554000213060ustar00rootroot00000000000000# Wacom # Intuos 12x12 # GD-1212 [Device] Name=Wacom Intuos 12x12 ModelName=GD-1212 DeviceMatch=usb:056a:0023 Class=Intuos Width=12 Height=12 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos-12x18.tablet000066400000000000000000000003211421725554000213140ustar00rootroot00000000000000# Wacom # Intuos 12x18 # GD-1218 [Device] Name=Wacom Intuos 12x18 ModelName=GD-1218 DeviceMatch=usb:056a:0024 Class=Intuos Width=18 Height=12 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos-4x5.tablet000066400000000000000000000003131421725554000211520ustar00rootroot00000000000000# Wacom # Intuos 4x5 # GD-0405 [Device] Name=Wacom Intuos 4x5 ModelName=GD-0405 DeviceMatch=usb:056a:0020 Class=Intuos Width=5 Height=4 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos-6x8.tablet000066400000000000000000000003131421725554000211570ustar00rootroot00000000000000# Wacom # Intuos 6x8 # GD-0608 [Device] Name=Wacom Intuos 6x8 ModelName=GD-0608 DeviceMatch=usb:056a:0021 Class=Intuos Width=8 Height=6 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos-9x12.tablet000066400000000000000000000003161421725554000212400ustar00rootroot00000000000000# Wacom # Intuos 9x12 # GD-0912 [Device] Name=Wacom Intuos 9x12 ModelName=GD-0912 DeviceMatch=usb:056a:0022 Class=Intuos Width=12 Height=9 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos-m-p.tablet000066400000000000000000000012671421725554000212340ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-680 # # Successor of Bamboo3 series # # stylus with two buttons and eraser # Pen active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen Medium ModelName=CTL-680 DeviceMatch=usb:056a:0323 Class=Bamboo Width=9 Height=5 Layout=intuos-m-p.svg IntegratedIn= [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-m-p2.tablet000066400000000000000000000013651421725554000213150ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-690 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and no eraser # Pen active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen Medium ModelName=CTL-690 DeviceMatch=usb:056a:033d Class=Bamboo Width=9 Height=5 Layout=intuos-m-p2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-m-p3-android.tablet000066400000000000000000000017561421725554000227400ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-6100 # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos M (Android Mode) ModelName=CTL-6100 DeviceMatch=usb:2d1f:0375 Class=Bamboo Width=3 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-m-p3-wl-android.tablet000066400000000000000000000020141421725554000233440ustar00rootroot00000000000000# Wacom # Intuos Pen Medium Wireless # CTL-6100WL # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos BT M (Android Mode) ModelName=CTL-6100WL DeviceMatch=usb:2d1f:0378;usb:2d1f:03c7 Class=Bamboo Width=3 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-m-p3-wl.tablet000066400000000000000000000015311421725554000217310ustar00rootroot00000000000000# Wacom # Intuos Pen Medium Wireless # CTL-6100WL # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos BT M ModelName=CTL-6100WL DeviceMatch=usb:056a:0378;bluetooth:056a:0379;usb:056a:03c7;bluetooth:056a:03c8 Class=Bamboo Width=9 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-2.2.0/data/intuos-m-p3.tablet000066400000000000000000000014231421725554000213110ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-6100 # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos M ModelName=CTL-6100 DeviceMatch=usb:056a:0375 Class=Bamboo Width=9 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-2.2.0/data/intuos-m-pt.tablet000066400000000000000000000021721421725554000214140ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Medium # CTH-680 # # Successor of Bamboo3 series # # stylus with two buttons and eraser; 16FG touch # Pen active area: 8.5 x 5.3in # Touch active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Medium ModelName=CTH-680 DeviceMatch=usb:056a:0303 Class=Bamboo Width=9 Height=5 Layout=intuos-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-m-pt2.tablet000066400000000000000000000022701421725554000214750ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Medium # CTH-690 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and no eraser; 16FG touch # Pen active area: 8.5 x 5.3in # Touch active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Medium ModelName=CTH-690 DeviceMatch=usb:056a:033e Class=Bamboo Width=9 Height=5 Layout=intuos-m-pt2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-pro-2-l.tablet000066400000000000000000000025671421725554000217370ustar00rootroot00000000000000# Wacom # Intuos Pro 2 L # PTH-860 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # I | TABLET | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 01 02 | | # | TABLET | # 00 03 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro L ModelName=PTH-860 DeviceMatch=usb:056a:0358;bluetooth:056a:0361; Class=Intuos5 Width=12 Height=8 Layout=intuos-pro-2-l.svg IntegratedIn= Styli=@intuos5;@mobilestudio; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=I RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos-pro-2-m.tablet000066400000000000000000000025661421725554000217370ustar00rootroot00000000000000# Wacom # Intuos Pro 2 M # PTH-660 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # I | TABLET | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 01 02 | | # | TABLET | # 00 03 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro M ModelName=PTH-660 DeviceMatch=usb:056a:0357;bluetooth:056a:0360; Class=Intuos5 Width=9 Height=6 Layout=intuos-pro-2-m.svg IntegratedIn= Styli=@intuos5;@mobilestudio; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=I RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos-pro-2-s.tablet000066400000000000000000000020271421725554000217350ustar00rootroot00000000000000# Wacom # Intuos Pro 2 S # PTH-460 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # G | TABLET | # D | | # E | | # F | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # No changeable LEDs or modes [Device] Name=Wacom Intuos Pro S ModelName=PTH-460 DeviceMatch=usb:056a:0392;bluetooth:056a:0393; Class=Intuos5 Width=6 Height=4 Layout=intuos-pro-2-s.svg IntegratedIn= Styli=@intuos5;@mobilestudio; [Features] Stylus=true Reversible=true Touch=true Buttons=7 Ring=true [Buttons] Left=A;B;C;D;E;F;G # This device has a ring, but the button inside the ring is not a modesiwtch libwacom-libwacom-2.2.0/data/intuos-pro-l.tablet000066400000000000000000000025651421725554000215760ustar00rootroot00000000000000# Wacom # Intuos Pro L # PTH-851 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro L ModelName=PTH-851 DeviceMatch=usb:056a:0317 Class=Intuos5 Width=13 Height=8 Layout=intuos-pro-l.svg IntegratedIn= Styli=@intuos4-lens;@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos-pro-m.tablet000066400000000000000000000025461421725554000215760ustar00rootroot00000000000000# Wacom # Intuos Pro M # PTH-651 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro M ModelName=PTH-651 DeviceMatch=usb:056a:0315 Class=Intuos5 Width=9 Height=6 Layout=intuos-pro-m.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos-pro-s.tablet000066400000000000000000000024441421725554000216010ustar00rootroot00000000000000# Wacom # Intuos Pro S # PTH-451 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro S ModelName=PTH-451 DeviceMatch=usb:056a:0314 Class=Intuos5 Width=6 Height=4 Layout=intuos-pro-s.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=7 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos-s-p.tablet000066400000000000000000000011671421725554000212410ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-480 # # Successor of Bamboo3 series # # stylus with two buttons and eraser # Pen active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Intuos Pen Small ModelName=CTL-480 DeviceMatch=usb:056a:030e Class=Bamboo Width=6 Height=4 Layout=intuos-s-p.svg IntegratedIn= [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-s-p2.tablet000066400000000000000000000012651421725554000213220ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-490 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and no eraser # Pen active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Intuos Pen Small ModelName=CTL-490 DeviceMatch=usb:056a:033b Class=Bamboo Width=6 Height=4 Layout=intuos-s-p2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-s-p3-android.tablet000066400000000000000000000020201421725554000227270ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-4100 # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-490. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos S (Android Mode) ModelName=CTL-4100 DeviceMatch=usb:2d1f:0374 Class=Bamboo Width=2 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-2.2.0/data/intuos-s-p3-wl-android.tablet000066400000000000000000000020131421725554000233510ustar00rootroot00000000000000# Wacom # Intuos Pen Small Wireless # CTL-4100WL # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos BT S (Android Mode) ModelName=CTL-4100WL DeviceMatch=usb:2d1f:0376;usb:2d1f:03c5 Class=Bamboo Width=2 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-s-p3-wl.tablet000066400000000000000000000015301421725554000217360ustar00rootroot00000000000000# Wacom # Intuos Pen Small Wireless # CTL-4100WL # # This is the third generation "Intuos", a successor to # the CTL-490. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos BT S ModelName=CTL-4100WL DeviceMatch=usb:056a:0376;bluetooth:056a:0377;usb:056a:03c5;bluetooth:056a:03c6 Class=Bamboo Width=6 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-2.2.0/data/intuos-s-p3.tablet000066400000000000000000000014221421725554000213160ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-4100 # # This is the third generation "Intuos", a successor to # the CTL-490. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos S ModelName=CTL-4100 DeviceMatch=usb:056a:0374 Class=Bamboo Width=6 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-2.2.0/data/intuos-s-pt.tablet000066400000000000000000000021701421725554000214200ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Small # CTH-480 # # Successor of Bamboo3 series # # stylus with two buttons and eraser; 16FG touch # Pen active area: 6.0 x 3.7in # Touch active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Small ModelName=CTH-480 DeviceMatch=usb:056a:0302 Class=Bamboo Width=6 Height=4 Layout=intuos-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos-s-pt2.tablet000066400000000000000000000022241421725554000215020ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Small # CTH-490 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and eraser; 16FG touch # Pen active area: 6.0 x 3.7in # Touch active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Small ModelName=CTH-490 DeviceMatch=usb:056a:033c Class=Bamboo Width=6 Height=4 Layout=intuos-s-pt2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-2.2.0/data/intuos2-12x12.tablet000066400000000000000000000003271421725554000213760ustar00rootroot00000000000000[Device] Name=Wacom Intuos2 12x12 ModelName= DeviceMatch=usb:056a:0044 Class=Intuos2 Width=12 Height=12 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos2-12x18.tablet000066400000000000000000000004011421725554000213750ustar00rootroot00000000000000# Wacom # Intuos2 12x18 # XD-1218 [Device] Name=Wacom Intuos2 12x18 ModelName=XD-1218 DeviceMatch=usb:056a:0045 Class=Intuos2 Width=18 Height=12 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos2-4x5.tablet000066400000000000000000000003731421725554000212420ustar00rootroot00000000000000# Wacom # Intuos2 4x5 # XD-0405 [Device] Name=Wacom Intuos2 4x5 ModelName=XD-0405 DeviceMatch=usb:056a:0041 Class=Intuos2 Width=5 Height=4 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos2-6x8.tablet000066400000000000000000000004441421725554000212460ustar00rootroot00000000000000# Wacom # Intuos2 6x8 # XD-0608 [Device] Name=Wacom Intuos2 6x8 ModelName=XD-0608 # FIXME add missing usb:0056a:0047 match DeviceMatch=usb:056a:0042 Class=Intuos2 Width=8 Height=6 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos2-9x12.tablet000066400000000000000000000003761421725554000213300ustar00rootroot00000000000000# Wacom # Intuos2 9x12 # XD-0912 [Device] Name=Wacom Intuos2 9x12 ModelName=XD-0912 DeviceMatch=usb:056a:0043 Class=Intuos2 Width=12 Height=9 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/intuos3-12x12.tablet000066400000000000000000000020071421725554000213740ustar00rootroot00000000000000# Wacom # Intuos3 12x12 # PTZ-1230 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 12x12 ModelName=PTZ-1230 DeviceMatch=usb:056a:00b3 Class=Intuos3 Width=12 Height=12 Layout=intuos3-12x12.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-2.2.0/data/intuos3-12x19.tablet000066400000000000000000000020111421725554000213760ustar00rootroot00000000000000# Wacom # Intuos3 12x19 # PTZ-1231W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 12x19 ModelName=PTZ-1231W DeviceMatch=usb:056a:00b4 Class=Intuos3 Width=19 Height=12 Layout=intuos3-12x19.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-2.2.0/data/intuos3-4x5.tablet000066400000000000000000000017341421725554000212450ustar00rootroot00000000000000# Wacom # Intuos3 4x5 # PTZ-430 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | # CA | | # CB | | # CB | | # DD | TABLET | # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | # A | DISPLAY | # | | # *-----------------------* # [Device] Name=Wacom Intuos3 4x5 ModelName=PTZ-430 DeviceMatch=usb:056a:00b0 Class=Intuos3 Width=5 Height=4 Layout=intuos3-4x5.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=1 Buttons=4 [Buttons] Left=A;B;C;D libwacom-libwacom-2.2.0/data/intuos3-4x6.tablet000066400000000000000000000017351421725554000212470ustar00rootroot00000000000000# Wacom # Intuos3 4x6 # PTZ-431W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | # CA | | # CB | | # CB | | # DD | TABLET | # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | # A | DISPLAY | # | | # *-----------------------* # [Device] Name=Wacom Intuos3 4x6 ModelName=PTZ-431W DeviceMatch=usb:056a:00b7 Class=Intuos3 Width=6 Height=4 Layout=intuos3-4x6.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=1 Buttons=4 [Buttons] Left=A;B;C;D libwacom-libwacom-2.2.0/data/intuos3-6x11.tablet000066400000000000000000000020021421725554000213110ustar00rootroot00000000000000# Wacom # Intuos3 6x11 # PTZ-631W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 6x11 ModelName=PTZ-631W DeviceMatch=usb:056a:00b5 Class=Intuos3 Width=11 Height=6 Layout=intuos3-6x11.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-2.2.0/data/intuos3-6x8.tablet000066400000000000000000000017741421725554000212560ustar00rootroot00000000000000# Wacom # Intuos3 6x8 # PTZ-630 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 6x8 ModelName=PTZ-630 DeviceMatch=usb:056a:00b1 Class=Intuos3 Width=8 Height=6 Layout=intuos3-6x8.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-2.2.0/data/intuos3-9x12.tablet000066400000000000000000000020001421725554000213130ustar00rootroot00000000000000# Wacom # Intuos3 9x12 # PTZ-930 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 9x12 ModelName=PTZ-930 DeviceMatch=usb:056a:00b2 Class=Intuos3 Width=12 Height=9 Layout=intuos3-9x12.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-2.2.0/data/intuos4-12x19.tablet000066400000000000000000000021641421725554000214100ustar00rootroot00000000000000# Wacom # Intuos4 Extra Large # PTK-1240 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 12x19 ModelName=PTK-1240 DeviceMatch=usb:056a:00bb Class=Intuos4 Width=19 Height=12 Layout=intuos4-12x19.svg IntegratedIn= Styli=@intuos4-lens;@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos4-4x6.tablet000066400000000000000000000021511421725554000212410ustar00rootroot00000000000000# Wacom # Intuos4 Small # PTK-440 # # Button Map: # (A=1, B=2, C=3, ...) # (NOTE: This map has *not* been verified.) # # *-----------------------* # | | # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 4x6 ModelName=PTK-440 DeviceMatch=usb:056a:00b8 Class=Intuos4 Width=6 Height=4 Layout=intuos4-4x6.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=7 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos4-6x9-wl.tablet000066400000000000000000000021651421725554000216730ustar00rootroot00000000000000# Wacom # Intuos4 Wireless # PTK-540WL # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 WL ModelName=PTK-540WL DeviceMatch=usb:056a:00bc;bluetooth:056a:00bd Class=Intuos4 Width=8 Height=5 IntegratedIn= Layout=intuos4-6x9-wl.svg Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos4-6x9.tablet000066400000000000000000000021311421725554000212440ustar00rootroot00000000000000# Wacom # Intuos4 Medium # PTK-640 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 6x9 ModelName=PTK-640 DeviceMatch=usb:056a:00b9 Class=Intuos4 Width=9 Height=6 Layout=intuos4-6x9.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos4-8x13.tablet000066400000000000000000000021331421725554000213230ustar00rootroot00000000000000# Wacom # Intuos4 Large # PTK-840 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 8x13 ModelName=PTK-840 DeviceMatch=usb:056a:00ba Class=Intuos4 Width=13 Height=8 Layout=intuos4-8x13.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos5-m.tablet000066400000000000000000000025361421725554000210640ustar00rootroot00000000000000# Wacom # Intuos5 M # PTK-650 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 M ModelName=PTK-650 DeviceMatch=usb:056a:002a Class=Intuos5 Width=9 Height=6 Layout=intuos5-m.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=false Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos5-s.tablet000066400000000000000000000024341421725554000210670ustar00rootroot00000000000000# Wacom # Intuos5 S # PTK-450 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 S ModelName=PTK-450 DeviceMatch=usb:056a:0029 Class=Intuos5 Width=6 Height=4 Layout=intuos5-s.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=false Buttons=7 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos5-touch-l.tablet000066400000000000000000000025701421725554000222010ustar00rootroot00000000000000# Wacom # Intuos5 touch L # PTH-850 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 touch L ModelName=PTH-850 DeviceMatch=usb:056a:0028 Class=Intuos5 Width=13 Height=8 Layout=intuos5-l.svg IntegratedIn= Styli=@intuos4-lens;@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos5-touch-m.tablet000066400000000000000000000025511421725554000222010ustar00rootroot00000000000000# Wacom # Intuos5 touch M # PTH-650 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 touch M ModelName=PTH-650 DeviceMatch=usb:056a:0027 Class=Intuos5 Width=9 Height=6 Layout=intuos5-m.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/intuos5-touch-s.tablet000066400000000000000000000024471421725554000222130ustar00rootroot00000000000000# Wacom # Intuos5 touch S # PTH-450 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 touch S ModelName=PTH-450 DeviceMatch=usb:056a:0026 Class=Intuos5 Width=6 Height=4 Layout=intuos5-s.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=7 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-2.2.0/data/isdv4-016c.tablet000066400000000000000000000006471421725554000207250ustar00rootroot00000000000000# HP ZBook x2 G4 # Sensor Type: EMR # Features: Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.52jLcHT93O # https://github.com/linuxwacom/wacom-hid-descriptors/issues/181#issue-1082766412 [Device] Name=ISDv4 016c ModelName= DeviceMatch=i2c:056a:016c Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=0xfffff;0xffffe;0xffffd [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-100.tablet000066400000000000000000000003431421725554000205450ustar00rootroot00000000000000# this is for Wacom MT touchscreen 0x0100 (10 fingers) [Device] Name=Wacom ISDv4 100 ModelName= DeviceMatch=usb:056a:0100 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=false Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-101.tablet000066400000000000000000000003621421725554000205470ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu T902 [Device] Name=Wacom ISDv4 101 ModelName= DeviceMatch=usb:056a:0101 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-104.tablet000066400000000000000000000003461421725554000205540ustar00rootroot00000000000000# this is for the Wacom pen as found in the Cube i7 Stylus [Device] Name=Wacom ISDv4 104 ModelName= DeviceMatch=i2c:056a:0104 Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-10d.tablet000066400000000000000000000003731421725554000206340ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu Lifebook T902 [Device] Name=Wacom ISDv4 10D ModelName= DeviceMatch=usb:056a:010d Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-10e.tablet000066400000000000000000000003731421725554000206350ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu Lifebook T732 [Device] Name=Wacom ISDv4 10E ModelName= DeviceMatch=usb:056a:010e Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-10f.tablet000066400000000000000000000003651421725554000206370ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Panasonic CF-C2 [Device] Name=Wacom ISDv4 10F ModelName= DeviceMatch=usb:056a:010f Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-114.tablet000066400000000000000000000003271421725554000205540ustar00rootroot00000000000000# EMR sensor used by the Lenovo Thinkpad 10 [Device] Name=Wacom ISDv4 114 ModelName= DeviceMatch=i2c:056a:0114 Class=ISDV4 IntegratedIn=Display;System Width=9 Height=5 [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-116.tablet000066400000000000000000000002511421725554000205520ustar00rootroot00000000000000[Device] Name=Wacom ISDv4 116 ModelName= DeviceMatch=usb:056a:0116 Class=ISDV4 Width=8 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-117.tablet000066400000000000000000000003771421725554000205640ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Panasonic Toughbook CF-C2 [Device] Name=Wacom ISDv4 117 ModelName= DeviceMatch=usb:056a:0117 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-124.tablet000066400000000000000000000004201421725554000205470ustar00rootroot00000000000000# this is for the Wacom pen as found in the Fujitsu ARROWS Tab QH55/M # the touchscreen is 056a:5008 [Device] Name=Wacom ISDv4 124 DeviceMatch=i2c:056a:0124 ModelName= Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-12c.tablet000066400000000000000000000002371421725554000206340ustar00rootroot00000000000000[Device] Name=Wacom ISDv4 12C ModelName= DeviceMatch=usb:056a:012c Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-149.tablet000066400000000000000000000004101421725554000205550ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Toshiba z20t-b, z20t-c and others. [Device] Name=Wacom ISDv4 149 ModelName= DeviceMatch=usb:056a:0149 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-2d1f-001e.tablet000066400000000000000000000003721421725554000214460ustar00rootroot00000000000000# EMR (?) sensor used by the Samsung 940X5N (Samsung Notebook 9 Pro) # Wacom-alternate VID [Device] Name=Wacom ISDv4 1E ModelName= DeviceMatch=i2c:2d1f:001e Class=ISDV4 Width=13 Height=7 IntegratedIn=Display;System [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-2d1f-002e.tablet000066400000000000000000000004371421725554000214510ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Samsung 930QAA (Samsung Notebook 9 Pen) # Wacom-alternate VID [Device] Name=Wacom ISDv4 2E ModelName= DeviceMatch=i2c:2d1f:002e Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-2d1f-0095.tablet000066400000000000000000000006471421725554000214030ustar00rootroot00000000000000# PINE64 PineNote # Sensor Type: EMR # Features: Tilt # HW Resolution: 20966 x 15725 (2540 x 2540 lpi) # # Autogenerated from sysinfo.QLV8DTvIWZ # https://github.com/linuxwacom/wacom-hid-descriptors/issues/196#issuecomment-1025156067 [Device] Name=ISDv4 0095 ModelName= DeviceMatch=i2c:2d1f:0095 Class=ISDV4 Width=8 Height=6 IntegratedIn=Display;System Styli=0xfffff;0xffffe; [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-2d1f-0163.tablet000066400000000000000000000006641421725554000213760ustar00rootroot00000000000000# Samsung Chromebook Pro XE510C24-Caroline # Sensor Type: EMR # Features: Tilt # HW Resolution: 25920 x 17280 (2540 x 2540 lpi) # # Autogenerated from sysinfo.UwjeIiKZUM # https://github.com/linuxwacom/wacom-hid-descriptors/issues/147#issue-830093962 [Device] Name=ISDv4 0163 ModelName= DeviceMatch=i2c:2d1f:0163 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-2d1f-524c.tablet000066400000000000000000000007101421725554000214520ustar00rootroot00000000000000# Lenovo ThinkVision M14t # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Manually generated from sysinfo.4trjkKChOo # https://github.com/linuxwacom/wacom-hid-descriptors/issues/157#issuecomment-855588271 [Device] Name=Lenovo ThinkVision M14t ModelName= DeviceMatch=usb:2d1f:524c Class=ISDV4 Width=12 Height=7 IntegratedIn=Display Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4004.tablet000066400000000000000000000003561421725554000206400ustar00rootroot00000000000000# Note: At least one device with this sensor has no pen interface [Device] Name=Wacom ISDv4 4004 ModelName= DeviceMatch=usb:056a:4004 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4800.tablet000066400000000000000000000003571421725554000206450ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Venue 10 5050 [Device] Name=Wacom ISDv4 4800 ModelName= DeviceMatch=i2c:056a:4800 Class=ISDV4 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4804.tablet000066400000000000000000000006641421725554000206520ustar00rootroot00000000000000# Dell Latitude 7275 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 27648 x 15552 (2540 x 2540 lpi) # # Autogenerated from sysinfo.80nTMs7TS9 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/172#issue-1021979106 [Device] Name=Dell Latitude 7275 ModelName= DeviceMatch=i2c:056a:4804 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4806.tablet000066400000000000000000000004001421725554000206400ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 5175 [Device] Name=Wacom ISDv4 4806 ModelName= DeviceMatch=i2c:056a:4806 Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4807.tablet000066400000000000000000000004031421725554000206440ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 11 5175 [Device] Name=Wacom ISDv4 4807 ModelName= DeviceMatch=i2c:056a:4807 Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4809.tablet000066400000000000000000000004031421725554000206460ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Venue 8 Pro 5855 [Device] Name=Wacom ISDv4 4809 ModelName= DeviceMatch=i2c:056a:4809 Class=ISDV4 Width=4 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4814.tablet000066400000000000000000000004021421725554000206410ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP Elite x2 1012 G1 [Device] Name=Wacom ISDv4 4814 ModelName= DeviceMatch=i2c:056a:4814 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-481a.tablet000066400000000000000000000004101421725554000207150ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP EliteBook x360 1030 G2 [Device] Name=Wacom ISDv4 481a ModelName= DeviceMatch=i2c:056a:481a Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4822.tablet000066400000000000000000000003771421725554000206530ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 12 9250 [Device] Name=Wacom ISDv4 4822 ModelName= DeviceMatch=i2c:056a:4822 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4824.tablet000066400000000000000000000004031421725554000206430ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Venue 8 Pro 5855 [Device] Name=Wacom ISDv4 4824 ModelName= DeviceMatch=i2c:056a:4824 Class=ISDV4 Width=4 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4831.tablet000066400000000000000000000003771421725554000206530ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 13 9365 [Device] Name=Wacom ISDv4 4831 ModelName= DeviceMatch=i2c:056a:4831 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4834.tablet000066400000000000000000000006621421725554000206530ustar00rootroot00000000000000# Huawei MateBook HZ-W19 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 2540 x 1693 (254 x 254 lpi) # # Autogenerated from sysinfo.WMalrfIR6D # https://github.com/linuxwacom/wacom-hid-descriptors/issues/111#issuecomment-731835104 [Device] Name=ISDv4 4834 ModelName= DeviceMatch=i2c:056a:4834 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4838.tablet000066400000000000000000000006521421725554000206560ustar00rootroot00000000000000# Huawei MateBook HZ-W19 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 2540 x 1693 (254 x 254 lpi) # # Autogenerated from sysinfo.zIp2pgQHPA # https://github.com/linuxwacom/wacom-hid-descriptors/issues/97#issue-663582700 [Device] Name=ISDv4 4838 ModelName= DeviceMatch=i2c:056a:4838 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4841.tablet000066400000000000000000000004101421725554000206400ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 7390 2-in-1 [Device] Name=Wacom ISDv4 4841 ModelName= DeviceMatch=i2c:056a:4841 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-484c.tablet000066400000000000000000000004011421725554000207220ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 5285 [Device] Name=Wacom ISDv4 484c ModelName= DeviceMatch=i2c:056a:484c Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-484d.tablet000066400000000000000000000006631421725554000207350ustar00rootroot00000000000000# Dell Latitude 5290 2-in-1 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 25920 x 17280 (2540 x 2540 lpi) # # Autogenerated from sysinfo.vHHzmjnIC7 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/198#issue-1123870461 [Device] Name=ISDv4 484d ModelName= DeviceMatch=i2c:056a:484d Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-484e.tablet000066400000000000000000000004011421725554000207240ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 5290 [Device] Name=Wacom ISDv4 484e ModelName= DeviceMatch=i2c:056a:484e Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4851.tablet000066400000000000000000000006521421725554000206510ustar00rootroot00000000000000# Dell Latitude 7285 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 25920 x 17280 (2540 x 2540 lpi) # # Autogenerated from sysinfo.aCRrYn3IG9 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/94#issue-640648378 [Device] Name=ISDv4 4851 ModelName= DeviceMatch=i2c:056a:4851 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-485e.tablet000066400000000000000000000004021421725554000207260ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP Elite x2 1012 G2 [Device] Name=Wacom ISDv4 485e ModelName= DeviceMatch=i2c:056a:485e Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4865.tablet000066400000000000000000000004101421725554000206460ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP EliteBook x360 1020 G2 [Device] Name=Wacom ISDv4 4865 ModelName= DeviceMatch=i2c:056a:4865 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-486a.tablet000066400000000000000000000003771421725554000207360ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 15 9575 [Device] Name=Wacom ISDv4 486a ModelName= DeviceMatch=i2c:056a:486a Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4870.tablet000066400000000000000000000004021421725554000206430ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP Elite x2 1013 G3 [Device] Name=Wacom ISDv4 4870 ModelName= DeviceMatch=i2c:056a:4870 Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4875.tablet000066400000000000000000000003771421725554000206630ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 15 9575 [Device] Name=Wacom ISDv4 4875 ModelName= DeviceMatch=i2c:056a:4875 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-488f.tablet000066400000000000000000000004111421725554000207320ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Dell XPS 15 9570 [Device] Name=Wacom ISDv4 488f ModelName= DeviceMatch=i2c:056a:488f Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4898.tablet000066400000000000000000000006701421725554000206640ustar00rootroot00000000000000# HP EliteBook x360 1030 G3 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.h8eClGGagq # https://github.com/linuxwacom/wacom-hid-descriptors/issues/154#issue-892789312 [Device] Name=ISDv4 4898 ModelName= DeviceMatch=i2c:056a:4898 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48c9.tablet000066400000000000000000000004101421725554000207270ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 7400 2-in-1 [Device] Name=Wacom ISDv4 48c9 ModelName= DeviceMatch=i2c:056a:48c9 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48ca.tablet000066400000000000000000000006671421725554000210150ustar00rootroot00000000000000# Dell Latitude 7400 2-in-1 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.wQAYGut7W0 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/91#issue-606922363 [Device] Name=ISDv4 48CA ModelName= DeviceMatch=i2c:056a:48ca Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48ce.tablet000066400000000000000000000006671421725554000210210ustar00rootroot00000000000000# Dell Latitude 7200 2-in-1 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 25920 x 17280 (2540 x 2540 lpi) # # Autogenerated from sysinfo.Zdy1qj7KjX # https://github.com/linuxwacom/wacom-hid-descriptors/issues/90#issue-602690541 [Device] Name=ISDv4 48CE ModelName= DeviceMatch=i2c:056a:48ce Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48d6.tablet000066400000000000000000000004061421725554000207320ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP ZBook Studio x360 G5 [Device] Name=Wacom ISDv4 48d6 ModelName= DeviceMatch=i2c:056a:48d6 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48eb.tablet000066400000000000000000000006661421725554000210170ustar00rootroot00000000000000# Dell XPS 13 9310 2-in-1 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 28800 x 18000 (2540 x 2540 lpi) # # Autogenerated from sysinfo.p9W9AH9iLf # https://github.com/linuxwacom/wacom-hid-descriptors/issues/149#issue-837382460 [Device] Name=ISDv4 48eb ModelName= DeviceMatch=i2c:056a:48eb Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48ec.tablet000066400000000000000000000004211421725554000210050ustar00rootroot00000000000000# this is for the alternate Wacom pen + touchscreen as found in the Dell XPS 13 7390 [Device] Name=Wacom HID 48EC ModelName= DeviceMatch=i2c:056a:48ec Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48ed.tablet000066400000000000000000000004111421725554000210050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Dell XPS 13 7390 [Device] Name=Wacom ISDv4 48ed ModelName= DeviceMatch=i2c:056a:48ed Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48ee.tablet000066400000000000000000000004141421725554000210110ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 13 2 in 1 7390 (UHD) [Device] Name=Wacom ISDv4 48ee ModelName= DeviceMatch=i2c:056a:48ee Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-48f6.tablet000066400000000000000000000006671421725554000207450ustar00rootroot00000000000000# HP EliteBook x360 830 G6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.rm4Tc3FDa7 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/113#issue-752711184 [Device] Name=ISDv4 48f6 ModelName= DeviceMatch=i2c:056a:48f6 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-490a.tablet000066400000000000000000000006571421725554000207320ustar00rootroot00000000000000# Dell XPS 15 7590 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 34422 x 19362 (2540 x 2540 lpi) # # Autogenerated from sysinfo.STL9faUAu9 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/120#issue-774701341 [Device] Name=ISDv4 490a ModelName= DeviceMatch=i2c:056a:490a Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-490b.tablet000066400000000000000000000003711421725554000207240ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Dell XPS 15 (9590) [Device] Name=Wacom ISDv4 490b ModelName= DeviceMatch=i2c:056a:490b Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4957.tablet000066400000000000000000000006601421725554000206570ustar00rootroot00000000000000# Dell Latitude 7410 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.QiJWeKfV85 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/95#issue-650787763 [Device] Name=ISDv4 4957 ModelName= DeviceMatch=i2c:056a:4957 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-495f.tablet000066400000000000000000000006611421725554000207370ustar00rootroot00000000000000# Acer Spin SP513-54N # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 28493 x 18996 (2540 x 2540 lpi) # # Autogenerated from sysinfo.HTNXDkXGX0 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/98#issue-664734855 [Device] Name=ISDv4 495F ModelName= DeviceMatch=i2c:056a:495f Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-496c.tablet000066400000000000000000000007031421725554000207320ustar00rootroot00000000000000# HP EliteBook x360 830 G7 Notebook PC # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.4ok4QJxaiB # https://github.com/linuxwacom/wacom-hid-descriptors/issues/119#issue-773316409 [Device] Name=ISDv4 496c ModelName= DeviceMatch=i2c:056a:496c Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4988.tablet000066400000000000000000000007041421725554000206620ustar00rootroot00000000000000# HP EliteBook x360 1030 G7 Notebook PC # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.tJRaV636j4 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/125#issue-786190625 [Device] Name=ISDv4 4988 ModelName= DeviceMatch=i2c:056a:4988 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-4995.tablet000066400000000000000000000006641421725554000206650ustar00rootroot00000000000000# HP EliteBook x360 1040 G8 Notebook PC # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.eODHXSdB5e # https://github.com/linuxwacom/wacom-hid-descriptors/issues/186 [Device] Name=ISDv4 4995 ModelName= DeviceMatch=i2c:056a:4995 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-49a3.tablet000066400000000000000000000006751421725554000207350ustar00rootroot00000000000000# Dell Latitude 7320 Detachable # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 27446 x 18298 (2540 x 2540 lpi) # # Autogenerated from sysinfo.qx0ZUyGzUn # https://github.com/linuxwacom/wacom-hid-descriptors/issues/174#issue-1035004205 [Device] Name=ISDv4 49a3 ModelName= DeviceMatch=i2c:056a:49a3 Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5000.tablet000066400000000000000000000002531421725554000206310ustar00rootroot00000000000000[Device] Name=Wacom ISDv4 5000 ModelName= DeviceMatch=usb:056a:5000 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5002.tablet000066400000000000000000000003631421725554000206350ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu T904 [Device] Name=Wacom ISDv4 5002 ModelName= DeviceMatch=usb:056a:5002 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5010.tablet000066400000000000000000000004031421725554000206270ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Lenovo ThinkPad T550 [Device] Name=Wacom ISDv4 5010 ModelName= DeviceMatch=usb:056a:5010 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5013.tablet000066400000000000000000000004141421725554000206340ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Toshiba dynabook KIRA L93/39M [Device] Name=Wacom ISDv4 5013 ModelName= DeviceMatch=i2c:056a:5013 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5014.tablet000066400000000000000000000004311421725554000206340ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by some versions of the # Lenovo ThinkPad Helix 2 [Device] Name=Wacom ISDv4 5014 ModelName= DeviceMatch=i2c:056a:5014 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5019.tablet000066400000000000000000000006641421725554000206510ustar00rootroot00000000000000# Fujitsu LIFEBOOK T935 # Sensor Type: EMR # Features: Touch (Integrated) # HW Resolution: 29576 x 16724 (2540 x 2540 lpi) # # Autogenerated from sysinfo.hEgTzdfzP1 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/210#issue-1164063876 [Device] Name=ISDv4 5019 ModelName= DeviceMatch=usb:056a:5019 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=0xfffff;0xffffe; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-502a.tablet000066400000000000000000000003661421725554000207210ustar00rootroot00000000000000# Toshiba Portege X20W-D Convertible and Toshiba TruPen [Device] Name=Wacom ISDv4 50a2 ModelName= DeviceMatch=usb:056a:50a2 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-503e.tablet000066400000000000000000000004461421725554000207250ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in some versions of the Lenovo # Thinkpad X1 Yoga. [Device] Name=Wacom ISDv4 503E ModelName= DeviceMatch=usb:056a:503e Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-503f.tablet000066400000000000000000000004461421725554000207260ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in some versions of the Lenovo # Thinkpad X1 Yoga. [Device] Name=Wacom ISDv4 503F ModelName= DeviceMatch=usb:056a:503f Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5040.tablet000066400000000000000000000005321421725554000206350ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in the Lenovo Thinkpad X1 Yoga # 14" WQHD display, measuring 310x174mm # pen with 2 buttons, no eraser [Device] Name=Wacom ISDv4 5040 ModelName= DeviceMatch=usb:056a:5040 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5044.tablet000066400000000000000000000005321421725554000206410ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in the Lenovo ThinkpPad Yoga 260 # 20FD002HUS (12.5" FHD; 276x155mm). # Pen with 2 buttons, no eraser. [Device] Name=Wacom ISDv4 5044 ModelName= DeviceMatch=usb:056a:5044 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5048.tablet000066400000000000000000000004471421725554000206520ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in some versions of the Lenovo # ThinkpPad Yoga 260 [Device] Name=Wacom ISDv4 5048 ModelName= DeviceMatch=usb:056a:5048 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-504a.tablet000066400000000000000000000004101421725554000207110ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 460 [Device] Name=Wacom ISDv4 504a ModelName= DeviceMatch=usb:056a:504a Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-504c.tablet000066400000000000000000000006701421725554000207230ustar00rootroot00000000000000# Lenovo ThinkPad Yoga 460 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.orm25GGiUq # https://github.com/linuxwacom/wacom-hid-descriptors/issues/144#issuecomment-835381091 [Device] Name=ISDv4 504c ModelName= DeviceMatch=usb:056a:504c Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5072.tablet000066400000000000000000000006711421725554000206460ustar00rootroot00000000000000# Lenovo ThinkPad Yoga 11e 3rd Gen # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 25613 x 14400 (2540 x 2540 lpi) # # Autogenerated from sysinfo.XoiNSn7Aiz # https://github.com/linuxwacom/wacom-hid-descriptors/issues/126#issue-787478489 [Device] Name=ISDv4 5072 ModelName= DeviceMatch=i2c:056a:5072 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5090.tablet000066400000000000000000000004311421725554000206400ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo Yoga 260 [Device] Name=Wacom ISDv4 5090 ModelName= DeviceMatch=usb:056a:5090 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5099.tablet000066400000000000000000000004311421725554000206510ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo Miix 720 [Device] Name=Wacom ISDv4 5099 ModelName= DeviceMatch=i2c:056a:5099 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-509d.tablet000066400000000000000000000004421421725554000207260ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad Yoga 370 [Device] Name=Wacom ISDv4 509D ModelName= DeviceMatch=usb:056a:509d Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-509f.tablet000066400000000000000000000006601421725554000207320ustar00rootroot00000000000000# Lenovo ThinkPad Yoga 370 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.Mc7vuWOv8R # https://github.com/linuxwacom/wacom-hid-descriptors/issues/87#issue-584787327 [Device] Name=ISDv4 509F ModelName= DeviceMatch=usb:056a:509f Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50b4.tablet000066400000000000000000000004321421725554000207160ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (2nd-gen) [Device] Name=Wacom ISDv4 50b4 ModelName= DeviceMatch=usb:056a:50b4 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50b6.tablet000066400000000000000000000004321421725554000207200ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (2nd-gen) [Device] Name=Wacom ISDv4 50b6 ModelName= DeviceMatch=usb:056a:50b6 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50b8.tablet000066400000000000000000000004321421725554000207220ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (2nd-gen) [Device] Name=Wacom ISDv4 50b8 ModelName= DeviceMatch=usb:056a:50b8 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50db.tablet000066400000000000000000000004161421725554000210000ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 520-14IKB [Device] Name=Wacom ISDv4 50db ModelName= DeviceMatch=i2c:056a:50db Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50e9.tablet000066400000000000000000000004231421725554000207260ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ideapad FLEX 5-1570 [Device] Name=Wacom ISDv4 50e9 ModelName= DeviceMatch=i2c:056a:50e9 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50ef.tablet000066400000000000000000000004161421725554000210050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 720-13IKB [Device] Name=Wacom ISDv4 50ef ModelName= DeviceMatch=i2c:056a:50ef Class=ISDV4 Width=12 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50f1.tablet000066400000000000000000000004141421725554000207170ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 720 13" [Device] Name=Wacom ISDv4 50f1 ModelName= DeviceMatch=i2c:056a:50f1 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50f8.tablet000066400000000000000000000004141421725554000207260ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 720 15" [Device] Name=Wacom ISDv4 50f8 ModelName= DeviceMatch=i2c:056a:50f8 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50fd.tablet000066400000000000000000000004171421725554000210050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 720 15IKB" [Device] Name=Wacom ISDv4 50fd ModelName= DeviceMatch=i2c:056a:50fd Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-50fe.tablet000066400000000000000000000006561421725554000210130ustar00rootroot00000000000000# Lenovo YOGA 720-15IKB # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 34560 x 19440 (2540 x 2540 lpi) # # Autogenerated from sysinfo.Ohpanx9rCW # https://github.com/linuxwacom/wacom-hid-descriptors/issues/158#issue-920186988 [Device] Name=ISDv4 50fe ModelName= DeviceMatch=i2c:056a:50fe Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5110.tablet000066400000000000000000000004421421725554000206330ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad Yoga 970 [Device] Name=Wacom ISDv4 5110 ModelName= DeviceMatch=i2c:056a:5110 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5115.tablet000066400000000000000000000004071421725554000206410ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in Lenovo Thinkpad X1 Tablet Gen 2 [Device] Name=Wacom HID 5115 DeviceMatch=i2c:056a:5115 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-511a.tablet000066400000000000000000000007001421725554000207110ustar00rootroot00000000000000# Lenovo ThinkPad X1 Tablet Gen 3 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 27450 x 18300 (2540 x 2540 lpi) # # Autogenerated from sysinfo.xN8e5fELwe # https://github.com/linuxwacom/wacom-hid-descriptors/issues/193#issue-1114377615 [Device] Name=ISDv4 511a ModelName= DeviceMatch=i2c:056a:511a Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5122.tablet000066400000000000000000000004111421725554000206320ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo 300e 81FY [Device] Name=Wacom ISDv4 5122 ModelName= DeviceMatch=i2c:056a:5122 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5128.tablet000066400000000000000000000004161421725554000206450ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 720-12IKB [Device] Name=Wacom ISDv4 5128 ModelName= DeviceMatch=i2c:056a:5128 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-513b.tablet000066400000000000000000000004161421725554000207200ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo MIIX 520-12IKB [Device] Name=Wacom ISDv4 513B ModelName= DeviceMatch=i2c:056a:513b Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5144.tablet000066400000000000000000000006711421725554000206460ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga 3rd # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30937 x 17402 (2540 x 2540 lpi) # # Autogenerated from sysinfo.H4ol2IJwzg # https://github.com/linuxwacom/wacom-hid-descriptors/issues/96#issue-655117893 [Device] Name=ISDv4 5144 ModelName= DeviceMatch=usb:056a:5144 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5146.tablet000066400000000000000000000004321421725554000206430ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (3rd-gen) [Device] Name=Wacom ISDv4 5146 ModelName= DeviceMatch=usb:056a:5146 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5147.tablet000066400000000000000000000004321421725554000206440ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (3rd-gen) [Device] Name=Wacom ISDv4 5147 ModelName= DeviceMatch=usb:056a:5147 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5148.tablet000066400000000000000000000005621421725554000206510ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (3rd-gen) # # sysinfo.4xQ82uOLCD # https://github.com/linuxwacom/wacom-hid-descriptors/issues/117 [Device] Name=Wacom ISDv4 5148 ModelName= DeviceMatch=usb:056a:5148 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5150.tablet000066400000000000000000000004431421725554000206400ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad X380 Yoga [Device] Name=Wacom ISDv4 5150 ModelName= DeviceMatch=usb:056a:5150 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5157.tablet000066400000000000000000000004451421725554000206510ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad L380 Yoga [Device] Name=Wacom ISDv4 5157 ModelName= DeviceMatch=usb:056a:5157; Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System; Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5158.tablet000066400000000000000000000004441421725554000206510ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad L390 Yoga [Device] Name=Wacom ISDv4 5158 ModelName= DeviceMatch=usb:056a:5158 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System; Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5159.tablet000066400000000000000000000006701421725554000206530ustar00rootroot00000000000000# Lenovo ThinkPad L390 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.lGbFRE2Ryr # https://github.com/linuxwacom/wacom-hid-descriptors/issues/156#issue-900019933 [Device] Name=ISDv4 5159 ModelName= DeviceMatch=usb:056a:5159 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-515a.tablet000066400000000000000000000004451421725554000207230ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad L380 Yoga [Device] Name=Wacom ISDv4 515a ModelName= DeviceMatch=usb:056a:515a; Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System; Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5169.tablet000066400000000000000000000004161421725554000206520ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 730-15IWL [Device] Name=Wacom ISDv4 5169 ModelName= DeviceMatch=i2c:056a:5169 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-516b.tablet000066400000000000000000000004161421725554000207230ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 730-15IKB [Device] Name=Wacom ISDv4 516B ModelName= DeviceMatch=i2c:056a:516b Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-517d.tablet000066400000000000000000000004241421725554000207250ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ideapad FLEX 6-14ARR [Device] Name=Wacom ISDv4 517D ModelName= DeviceMatch=i2c:056a:517d Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5196.tablet000066400000000000000000000004171421725554000206530ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA C930-13IKB [Device] Name=Wacom ISDv4 5196 ModelName= DeviceMatch=i2c:056a:5196 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51a0.tablet000066400000000000000000000004271421725554000207160ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Extreme 2nd [Device] Name=Wacom ISDv4 51a0 ModelName= DeviceMatch=usb:056a:51a0 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51af.tablet000066400000000000000000000004221421725554000207770ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X390 Yoga [Device] Name=Wacom ISDv4 51af ModelName= DeviceMatch=usb:056a:51af Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b0.tablet000066400000000000000000000006371421725554000207220ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.wym3nbQqZN # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B0 ModelName= DeviceMatch=usb:056a:51b0 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b1.tablet000066400000000000000000000006371421725554000207230ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.F0GO4PAS9O # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B1 ModelName= DeviceMatch=usb:056a:51b1 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b2.tablet000066400000000000000000000006371421725554000207240ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.wFZ9uMfoYf # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B2 ModelName= DeviceMatch=usb:056a:51b2 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b3.tablet000066400000000000000000000006371421725554000207250ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.JMUwt4E2Wq # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B3 ModelName= DeviceMatch=usb:056a:51b3 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b6.tablet000066400000000000000000000006441421725554000207260ustar00rootroot00000000000000# Lenovo ThinkPad X1 Carbon 7th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30937 x 17402 (2540 x 2540 lpi) # # Autogenerated from sysinfo.soRAtaSZMv # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B6 ModelName= DeviceMatch=usb:056a:51b6 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b7.tablet000066400000000000000000000006421421725554000207250ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga 4th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30935 x 17401 (2540 x 2540 lpi) # # Autogenerated from sysinfo.6qw5zSXxSq # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B7 ModelName= DeviceMatch=usb:056a:51b7 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b8.tablet000066400000000000000000000004171421725554000207260ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo X1 Yoga 4th-gen [Device] Name=Wacom ISDv4 51B8 ModelName= DeviceMatch=usb:056a:51b8 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51b9.tablet000066400000000000000000000006261421725554000207310ustar00rootroot00000000000000# Lenovo ThinkPad # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30927 x 17397 (2540 x 2540 lpi) # # Autogenerated from sysinfo.pijIZAvdWl # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B9 ModelName= DeviceMatch=usb:056a:51b9 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51ba.tablet000066400000000000000000000005001421725554000207700ustar00rootroot00000000000000# Lenovo # Known PID, but unknown details (assume similar to other private # reports received at the same time: e.g. isdv4-51BB.tablet) [Device] Name=ISDv4 51BA ModelName= DeviceMatch=usb:056a:51ba Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51bb.tablet000066400000000000000000000006421421725554000210000ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga 4th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.LoFm5ZeX4S # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51BB ModelName= DeviceMatch=usb:056a:51bb Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51bc.tablet000066400000000000000000000006421421725554000210010ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga 4th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30937 x 17402 (2540 x 2540 lpi) # # Autogenerated from sysinfo.4mulKviG5U # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51BC ModelName= DeviceMatch=usb:056a:51bc Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51bd.tablet000066400000000000000000000005001421725554000207730ustar00rootroot00000000000000# Lenovo # Known PID, but unknown details (assume similar to other private # reports received at the same time: e.g. isdv4-51BB.tablet) [Device] Name=ISDv4 51BD ModelName= DeviceMatch=usb:056a:51bd Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51be.tablet000066400000000000000000000004171421725554000210030ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo X1 Yoga 4th-gen [Device] Name=Wacom ISDv4 51BE ModelName= DeviceMatch=usb:056a:51be Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51bf.tablet000066400000000000000000000004171421725554000210040ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo X1 Yoga 4th-gen [Device] Name=Wacom ISDv4 51BF ModelName= DeviceMatch=usb:056a:51bf Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51c4.tablet000066400000000000000000000004221421725554000207170ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo IdeaPad FLEX-14API [Device] Name=Wacom ISDv4 51C4 ModelName= DeviceMatch=i2c:056a:51c4 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51c7.tablet000066400000000000000000000006701421725554000207270ustar00rootroot00000000000000# Lenovo IdeaPad FLEX-14API # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.MuVcg9kgJJ # https://github.com/linuxwacom/wacom-hid-descriptors/issues/109#issue-746220933 [Device] Name=ISDv4 51C7 ModelName= DeviceMatch=i2c:056a:51c7 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51d0.tablet000066400000000000000000000007011421725554000207140ustar00rootroot00000000000000# Lenovo ThinkPad X1 Titanium Gen 1 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 28493 x 18996 (2540 x 2540 lpi) # # Autogenerated from sysinfo.cMlxVzQx6k # https://github.com/linuxwacom/wacom-hid-descriptors/issues/205#issue-1140341746 [Device] Name=ISDv4 51d0 ModelName= DeviceMatch=usb:056a:51d0 Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51e2.tablet000066400000000000000000000006651421725554000207300ustar00rootroot00000000000000# Lenovo Yoga C940-14IIL # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.giGDPrJpNp # https://github.com/linuxwacom/wacom-hid-descriptors/issues/150#issue-841283965 [Device] Name=ISDv4 51e2 ModelName= DeviceMatch=i2c:056a:51e2 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51e9.tablet000066400000000000000000000006011421725554000207250ustar00rootroot00000000000000# Lenovo ThinkPad P15 Gen 1 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 34422 x 19362 (2540 x 2540 lpi) # # Autogenerated from sysinfo.VSiBXWPx2J # From private bug report [Device] Name=ISDv4 51e9 ModelName= DeviceMatch=usb:056a:51e9 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51ef.tablet000066400000000000000000000006451421725554000210120ustar00rootroot00000000000000# Lenovo Yoga C740-14IML # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.rRepB89Qwa # https://github.com/linuxwacom/wacom-hid-descriptors/issues/190 [Device] Name=ISDv4 51ef ModelName= DeviceMatch=i2c:056a:51ef Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51f5.tablet000066400000000000000000000005121421725554000207230ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the ThinkPad L13 Yoga # https://github.com/linuxwacom/wacom-hid-descriptors/issues/83 [Device] Name=Wacom ISDv4 F1F5 ModelName= DeviceMatch=usb:056a:51f5 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51f6.tablet000066400000000000000000000005121421725554000207240ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the ThinkPad L13 Yoga # https://github.com/linuxwacom/wacom-hid-descriptors/issues/78 [Device] Name=Wacom ISDv4 51F6 ModelName= DeviceMatch=usb:056a:51f6 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-51f9.tablet000066400000000000000000000006671421725554000207420ustar00rootroot00000000000000# Lenovo ThinkPad L13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.ylAeu0fEDt # https://github.com/linuxwacom/wacom-hid-descriptors/issues/143#issue-810475452 [Device] Name=ISDv4 51f9 ModelName= DeviceMatch=usb:056a:51f9 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5202.tablet000066400000000000000000000006651421725554000206440ustar00rootroot00000000000000# Lenovo YOGA C640-13IML # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.M5WQPQfqXg # https://github.com/linuxwacom/wacom-hid-descriptors/issues/118#issue-772431716 [Device] Name=ISDv4 5202 ModelName= DeviceMatch=i2c:056a:5202 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5204.tablet000066400000000000000000000006741421725554000206460ustar00rootroot00000000000000# Lenovo YOGA C640-13IML # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.72igrHtWeC # https://github.com/linuxwacom/wacom-hid-descriptors/issues/101#issuecomment-778785170 [Device] Name=ISDv4 5204 ModelName= DeviceMatch=i2c:056a:5204 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5215.tablet000066400000000000000000000006741421725554000206500ustar00rootroot00000000000000# Lenovo IdeaPad Flex 5 14ALC05 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.LyIiLqPZux # https://github.com/linuxwacom/wacom-hid-descriptors/issues/164#issue-941998063 [Device] Name=ISDv4 5215 ModelName= DeviceMatch=i2c:056a:5215 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5216.tablet000066400000000000000000000007031421725554000206420ustar00rootroot00000000000000# Lenovo IdeaPad Flex 5 14IIL05 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30937 x 17402 (2540 x 2540 lpi) # # Autogenerated from sysinfo.n0ilTsFMOk # https://github.com/linuxwacom/wacom-hid-descriptors/issues/103#issuecomment-768913777 [Device] Name=ISDv4 5216 ModelName= DeviceMatch=i2c:056a:5216 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5218.tablet000066400000000000000000000006741421725554000206530ustar00rootroot00000000000000# Lenovo IdeaPad Flex 5 14ALC05 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.YPpNpkeE1A # https://github.com/linuxwacom/wacom-hid-descriptors/issues/170#issue-997612708 [Device] Name=ISDv4 5218 ModelName= DeviceMatch=i2c:056a:5218 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-521c.tablet000066400000000000000000000006741421725554000207260ustar00rootroot00000000000000# Lenovo IdeaPad Flex 5 15ALC05 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 34416 x 19359 (2540 x 2540 lpi) # # Autogenerated from sysinfo.hNFCjvCKen # https://github.com/linuxwacom/wacom-hid-descriptors/issues/167#issue-980739498 [Device] Name=ISDv4 521c ModelName= DeviceMatch=i2c:056a:521c Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-521f.tablet000066400000000000000000000006371421725554000207300ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.9s9w22c3OD # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 521F ModelName= DeviceMatch=usb:056a:521f Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5220.tablet000066400000000000000000000006551421725554000206430ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga Gen 1 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.KNB1IfMgnC # https://github.com/linuxwacom/wacom-hid-descriptors/issues/129 [Device] Name=ISDv4 5220 ModelName= DeviceMatch=usb:056a:5220 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5221.tablet000066400000000000000000000006371421725554000206440ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.z6KU8DWk8L # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 5221 ModelName= DeviceMatch=usb:056a:5221 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5222.tablet000066400000000000000000000006371421725554000206450ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.yxQueczf1R # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 5222 ModelName= DeviceMatch=usb:056a:5222 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5229.tablet000066400000000000000000000006741421725554000206550ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 5 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.FAhKZ7iIrn # https://github.com/linuxwacom/wacom-hid-descriptors/issues/135#issue-800191575 [Device] Name=ISDv4 5229 ModelName= DeviceMatch=usb:056a:5229 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-523a.tablet000066400000000000000000000006551421725554000207250ustar00rootroot00000000000000# Lenovo Yoga 9 14ITL5 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.XEiGpAPiOa # https://github.com/linuxwacom/libwacom/issues/355#issuecomment-780039943 [Device] Name=ISDv4 523a ModelName= DeviceMatch=i2c:056a:523a Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-523e.tablet000066400000000000000000000006231421725554000207240ustar00rootroot00000000000000# Lenovo Yoga 9 14ITL5 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Copied and altered from the ISDV4 523a file. Same laptop, just slightly different PID. [Device] Name=ISDv4 523e ModelName= DeviceMatch=i2c:056a:523e Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5256.tablet000066400000000000000000000006721421725554000206530ustar00rootroot00000000000000# Lenovo Yoga 7 15ITL5 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 34416 x 19359 (2540 x 2540 lpi) # # Autogenerated from sysinfo.sX9QiNn0RF # https://github.com/linuxwacom/wacom-hid-descriptors/issues/139#issuecomment-776946036 [Device] Name=ISDv4 5256 ModelName= DeviceMatch=i2c:056a:5256 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5276.tablet000066400000000000000000000006751421725554000206600ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30159 x 18850 (2540 x 2540 lpi) # # Autogenerated from sysinfo.hm61PxhoDt # https://github.com/linuxwacom/wacom-hid-descriptors/issues/202#issue-1132947621 [Device] Name=ISDv4 5276 ModelName= DeviceMatch=i2c:056a:5276 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5277.tablet000066400000000000000000000006051421725554000206520ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30165 x 18853 (2540 x 2540 lpi) # # Autogenerated from sysinfo.rhiB11PAfy # From private bug report [Device] Name=ISDv4 5277 ModelName= DeviceMatch=i2c:056a:5277 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5278.tablet000066400000000000000000000006051421725554000206530ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30159 x 18850 (2540 x 2540 lpi) # # Autogenerated from sysinfo.jlmKxHDD9N # From private bug report [Device] Name=ISDv4 5278 ModelName= DeviceMatch=i2c:056a:5278 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5279.tablet000066400000000000000000000006051421725554000206540ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30159 x 18850 (2540 x 2540 lpi) # # Autogenerated from sysinfo.8euIJDBa1t # From private bug report [Device] Name=ISDv4 5279 ModelName= DeviceMatch=i2c:056a:5279 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-527a.tablet000066400000000000000000000006051421725554000207240ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30160 x 18850 (2540 x 2540 lpi) # # Autogenerated from sysinfo.lhwHw4oxV0 # From private bug report [Device] Name=ISDv4 527a ModelName= DeviceMatch=i2c:056a:527a Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-527e.tablet000066400000000000000000000006051421725554000207300ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30159 x 18850 (2540 x 2540 lpi) # # Autogenerated from sysinfo.azexD4AUXu # From private bug report [Device] Name=ISDv4 527e ModelName= DeviceMatch=i2c:056a:527e Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-527f.tablet000066400000000000000000000006051421725554000207310ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga Gen 6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30159 x 18850 (2540 x 2540 lpi) # # Autogenerated from sysinfo.KNSxghuR5y # From private bug report [Device] Name=ISDv4 527f ModelName= DeviceMatch=i2c:056a:527f Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-5285.tablet000066400000000000000000000006761421725554000206610ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga Gen 2 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 28604 x 17878 (2540 x 2540 lpi) # # Autogenerated from sysinfo.AP2hbJxj8g # https://github.com/linuxwacom/wacom-hid-descriptors/issues/188#issue-1096423544 [Device] Name=ISDv4 5285 ModelName= DeviceMatch=i2c:056a:5285 Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-528e.tablet000066400000000000000000000006641421725554000207360ustar00rootroot00000000000000# Lenovo Yoga 6 13ARE05 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.RGxfCFKW69 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/136#issue-801322153 [Device] Name=ISDv4 528e ModelName= DeviceMatch=i2c:056a:528e Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-52a2.tablet000066400000000000000000000006641421725554000207240ustar00rootroot00000000000000# Lenovo Yoga 6 13ALC6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.EssJBy7Vw2 # https://github.com/linuxwacom/wacom-hid-descriptors/issues/175#issue-1036576495 [Device] Name=ISDv4 52a2 ModelName= DeviceMatch=i2c:056a:52a2 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-52b0.tablet000066400000000000000000000006641421725554000207230ustar00rootroot00000000000000# Lenovo Yoga 7 14ACN6 # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.9RbKEELzvC # https://github.com/linuxwacom/wacom-hid-descriptors/issues/195#issue-1118194996 [Device] Name=ISDv4 52b0 ModelName= DeviceMatch=i2c:056a:52b0 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System Styli=@isdv4-aes; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-90.tablet000066400000000000000000000004741421725554000205020ustar00rootroot00000000000000# USB tablet PC models: ASUS R1E and ASUS R1F # # stylus with one button and eraser # # Screen size 11.7 x 7.9; 13.3" diagonal [Device] Name=Wacom ISDv4 90 ModelName= DeviceMatch=usb:056a:0090;serial:056a:0090 Class=ISDV4 Width=12 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-93.tablet000066400000000000000000000005421421725554000205010ustar00rootroot00000000000000# USB tablet PC models: HP Pavilion TX2000 and HP Pavilion TX2500 # # stylus with two buttons and eraser; 1FGT touchscreen # # Screen size 10.2 x 6.4; 12.1" diagonal [Device] Name=Wacom ISDv4 93 ModelName= DeviceMatch=usb:056a:0093;serial:056a:0093 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-e2.tablet000066400000000000000000000003451421725554000205550ustar00rootroot00000000000000# this is for the Wacom pen found in the HP Pavillion dv6 [Device] Name=Wacom ISDv4 E2 ModelName= DeviceMatch=usb:056a:00e2 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-e3.tablet000066400000000000000000000003751421725554000205610ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the HP Touchsmart tm2 laptop. [Device] Name=Wacom ISDv4 E3 ModelName= DeviceMatch=usb:056a:00e3;serial:056a:00e3 Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-e5.tablet000066400000000000000000000003361421725554000205600ustar00rootroot00000000000000# this is for Wacom MT touchscreen E5 (10 fingers) [Device] Name=Wacom ISDv4 E5 ModelName= DeviceMatch=usb:056a:00e5 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=false Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-e6.tablet000066400000000000000000000003721421725554000205610ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad x220t [Device] Name=Wacom ISDv4 E6 ModelName= DeviceMatch=usb:056a:00e6 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-ec.tablet000066400000000000000000000005261421725554000206370ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Samsung Ativ Smart PC Pro 700t. # Also used in the Thinkpad Yoga 260, the PairedID entry is for that device. [Device] Name=Wacom ISDv4 EC ModelName= DeviceMatch=usb:056a:00ec Class=ISDV4 IntegratedIn=Display;System PairedID=usb:04f3:0254 [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-ed.tablet000066400000000000000000000003521421725554000206350ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Panasonic CF-H2 laptop. [Device] Name=Wacom ISDv4 ED ModelName= DeviceMatch=usb:056a:00ed Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/isdv4-ef.tablet000066400000000000000000000003311421725554000206340ustar00rootroot00000000000000# this is for the Wacom pen as found in a limited special Tablet PC edition [Device] Name=Wacom ISDv4 EF ModelName= DeviceMatch=usb:056a:00ef Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/kamvas-pro-13.tablet000066400000000000000000000025651421725554000215270ustar00rootroot00000000000000# Huion # Kamvas Pro 13 # GT-133 # # sysinfo.6ktY6Uln9z.tar.gz # https://github.com/linuxwacom/wacom-hid-descriptors/issues/160 # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # | | # | DISPLAY | # | | # C | | # D | | # E | | # *-----------------------* # # Touch Strip Map: # NOTE: not enabled because i couldnt get it to work # evtest reports 0x108 (BTN_8), 0x109 (BTN_9), 0x130 (BTN_SOUTH) # # *-----------------------* # | | # A | | # a | DISPLAY | # | | # *-----------------------* # # Also matches: # GAOMON S56K which doesn't have buttons but since HUION re-uses usb IDs # there is nothing we can do about this. [Device] Name=Huion Kamvas Pro 13 ModelName=GT-133 Class=Cintiq DeviceMatch=usb:256c:006e:Tablet Monitor Pen;usb:256c:006e:Tablet Monitor Pad; Width=12 Height=7 Layout=kamvas-pro-13.svg Styli=0xffffd; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=5 [Buttons] Left=A;B;C;D;E EvdevCodes=0x100;0x101;0x102;0x103;0x104 libwacom-libwacom-2.2.0/data/layouts/000077500000000000000000000000001421725554000175215ustar00rootroot00000000000000libwacom-libwacom-2.2.0/data/layouts/README.md000066400000000000000000000205031421725554000210000ustar00rootroot00000000000000# libwacom SVG format requirements SVG images have a dual purpose, providing an accurate representation of the tablets and also providing the size and location of the various controls on the device that can be queried by various applications that may need it. To allow applications to identify each control in the SVG and also apply a CSS if desired, the following naming convention applies: ## Buttons Each button ID in the SVG is built of the string "Button" with ID of the button between 'A' and 'Z'. Additionally, the SVG class must contain the button ID of the button between 'A' and 'Z' and the more generic class "Button": | Button ID | SVG id | SVG class | |:---------:|:---------:|:----------:| | `A` | `ButtonA` | `A Button` | | `B` | `ButtonB` | `B Button` | | ... | ... | ... | `Z` | `ButtonZ` | `Z Button` | For example: ```xml ``` If the button is a mode-switch button as well, the class list should also contain "ModeSwitch": ```xml ``` This allows applications to modify the appearance of all the buttons at once via a CSS, yet allowing to customize the appearance of single buttons by using the button ID. ## Touch Rings/Strips Touch rings and strips use the following convention: | Type | SVG id | SVG class | |--------------------|:--------:|:------------------:| | First touch ring | `Ring` | `Ring TouchRing` | | Second touch ring | `Ring2` | `Ring2 TouchRing` | | First touch strip | `Strip` | `Strip TouchStrip` | | Second touch strip | `Strip2` | `Strip2 TouchStrip` | For example: ```xml ``` ### Fake buttons to indicate interactions Additional "fake" buttons (i.e. actual controls not found on the real device) may be added to touch controls to help indicate the type of action expected on the control. For example a circular motion arrow on a touch ring or vertical motion arrow on a touch strip. Where the controls are present, they should be named using the following convention: | Type | SVG id | SVG class | |--------------------|:--------:|:------------------:| | First touch ring, rotating clockwise | `RingCW` | `RingCW Button ` | | First touch ring, rotating counterclockwise | `RingCCW` | `RingCCW Button` | | Second touch ring, rotating clockwise | `Ring2CW` | `Ring2CW Button ` | | Second touch ring, rotating counterclockwise | `Ring2CCW` | `Ring2CCW Button` | | First touch strip, moving up | `StripUp` | `StripUp Button` | | First touch strip, moving down | `StripDown` | `StripDown Button` | | Second touch strip, moving up | `Strip2Up` | `Strip2Up Button` | | Second touch strip, moving down | `Strip2Down` | `Strip2Down Button` | For example: ```xml ... ``` The use of those "fake" buttons is left at the discretion of the designer and is not mandatory nor enforced. Multiple controls may be present, e.g. it's allowed to add both a CW and CCW motion indicator. ## Labels The role of the labels in the SVG is to give applications an indication on where to place the caption for each button. The actual content of the text in the SVG image may not be relevant, what matters is the actual location. Applications should hide the labels (using CSS) or replace the text with an appropriate caption. The convention is to prefix the type with "Label" for the SVG id and append "Label" to the type for the SVG class: | Type | SVG id | SVG class | |--------------------|:--------:|:------------------:| | Button 'A' label | `LabelA` | `A Label` | | Button 'B' label | `LabelB` | `B Label` | | Button 'C' label for a mode-switch button | `LabelC` | `C ModeSwitch Label` | | Label for first touch ring, rotating clockwise | `LabelRingCW` | `RingCCW Ring Label` | | Label for first touch ring, rotating counterclockwise | `LabelRingCCW` | `RingCCW Ring Label` | | Label for second touch ring, rotating clockwise | `LabelRing2CW` | `Ring2CCW Ring2 Label` | | Label for second touch ring, rotating counterclockwise | `LabelRing2CCW` | `Ring2CCW Ring2 Label` | | Label for first touch strip, moving up | `LabelStripUp` | `StripUp Strip Label` | | Label for first touch strip, moving down | `LabelStripDown` | `StripDown Strip Label` | | Label for second touch strip, moving up | `LabelStrip2Up` | `Strip2Up Strip2 Label` | | Label for second touch strip, moving down | `LabelStrip2Down` | `Strip2Down Strip2 Label` | For example: ```xml D ... CCW ``` ### Caption leader lines To match the buttons with their corresponding labels, the SVG must also provide a leader line for each label in the form of a line that links each button and its label. Each leader line follows the same naming convention as the labels, using the special name "Leader" in place of "Label", ie: | Type | SVG id | SVG class | |--------------------|:--------:|:------------------:| | Button 'A' leader | `LeaderA` | `A Leader` | | Button 'B' leader | `LeaderB` | `B Leader` | | Button 'C' leader for a mode-switch button | `LeaderC` | `C ModeSwitch Leader` | | Leader for first touch ring, rotating clockwise | `LeaderRingCW` | `RingCCW Ring Leader` | | Leader for first touch ring, rotating counterclockwise | `LeaderRingCCW` | `RingCCW Ring Leader` | | Leader for second touch ring, rotating clockwise | `LeaderRing2CW` | `Ring2CCW Ring2 Leader` | | Leader for second touch ring, rotating counterclockwise | `LeaderRing2CCW` | `Ring2CCW Ring2 Leader` | | Leader for first touch strip, moving up | `LeaderStripUp` | `StripUp Strip Leader` | | Leader for first touch strip, moving down | `LeaderStripDown` | `StripDown Strip Leader` | | Leader for second touch strip, moving up | `LeaderStrip2Up` | `Strip2Up Strip2 Leader` | | Leader for second touch strip, moving down | `LeaderStrip2Down` | `Strip2Down Strip2 Leader` | For example: ```xml ``` ## Tips For Creating New Layouts Layouts use very simple SVG rules. WISIWYG editors such as Inkscape are very convenient to design new layouts but usually produce a much more complex SVG markup so files that are produced with those editors should be cleaned. To help with this task, there is a script called `clean_svg.py` in the tools folder. Besides cleaning the markup and removing editor specific tags, `clean_svg.py` also automates the naming of the elements. ### Automatic Naming with Inkscape and `clean_svg.py` In Inkscape, be sure to group the button, leader and label elements and assign the group's ID to the desired logical name. e.g.: Assigning "A" to the group's ID and running the `clean_svg.py` script with that SVG, will assign "ButtonA"/"B Button" to the ID and class of the first rect/circle element found in the group; it also analogously assigns the ID and class of the first path and text elements found in that group. `clean_svg.py` needs two arguments, the SVG file path and the name of the tablet, e.g.: ``` ./clean_svg.py /path/to/svg_file.svg "My Brand New Tablet Name" ``` libwacom-libwacom-2.2.0/data/layouts/bamboo-0fg-s-p-alt.svg000066400000000000000000000065231421725554000234340ustar00rootroot00000000000000 Wacom Bamboo CTE-450 A B C FN1 D FN2 CCW CW libwacom-libwacom-2.2.0/data/layouts/bamboo-0fg-s-p.svg000066400000000000000000000063731421725554000226610ustar00rootroot00000000000000 Wacom Bamboo MTE-450 A B C D CCW CW libwacom-libwacom-2.2.0/data/layouts/bamboo-16fg-m-pt.svg000066400000000000000000000046501421725554000231220ustar00rootroot00000000000000 Wacom Bamboo Create (CTH-670) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-16fg-s-pt.svg000066400000000000000000000046511421725554000231310ustar00rootroot00000000000000 Wacom Bamboo Capture (CTH-470) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-16fg-s-t.svg000066400000000000000000000046461421725554000227550ustar00rootroot00000000000000 Wacom Bamboo Touch (CTT-470) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-2fg-fun-m-pt.svg000066400000000000000000000045541421725554000236260ustar00rootroot00000000000000 Wacom Bamboo Fun medium (CTH-661) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-2fg-fun-s-pt.svg000066400000000000000000000045571421725554000236370ustar00rootroot00000000000000 Wacom Bamboo Fun small (2FG) (CTH-461) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-2fg-s-pt.svg000066400000000000000000000046461421725554000230500ustar00rootroot00000000000000 Wacom Bamboo (2FG) (CTH-460) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-2fg-s-t.svg000066400000000000000000000046501421725554000226630ustar00rootroot00000000000000 Wacom Bamboo Touch (2FG) (CTT-460) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-4fg-fun-m-pt.svg000066400000000000000000000045541421725554000236300ustar00rootroot00000000000000 Wacom Bamboo 2FG 6x8 (CTH-661(A)) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-4fg-fun-s-pt.svg000066400000000000000000000045501421725554000236320ustar00rootroot00000000000000 Wacom Bamboo Craft (CTH-461(A)) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-4fg-s-pt.svg000066400000000000000000000046531421725554000230500ustar00rootroot00000000000000 Wacom Bamboo 2FG 4x5 (CTH-460(A)) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-4fg-s-t.svg000066400000000000000000000046431421725554000226670ustar00rootroot00000000000000 Wacom Bamboo 2FG (CTT-460(A)) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-4fg-se-m-pt.svg000066400000000000000000000046111421725554000234410ustar00rootroot00000000000000 Wacom Bamboo Special Edition Pen & Touch medium (CTH-661SE) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-4fg-se-s-pt.svg000066400000000000000000000046061421725554000234530ustar00rootroot00000000000000 Wacom Bamboo Special Edition Pen & Touch small (CTH-461SE) A B C D libwacom-libwacom-2.2.0/data/layouts/bamboo-pad.svg000066400000000000000000000024721421725554000222500ustar00rootroot00000000000000 Wacom Bamboo Pad A B libwacom-libwacom-2.2.0/data/layouts/cintiq-12wx.svg000066400000000000000000000150541421725554000223350ustar00rootroot00000000000000 Wacom Cintiq 12WX A B C D E F G H I J Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/cintiq-13hd.svg000066400000000000000000000104271421725554000222720ustar00rootroot00000000000000 Wacom Cintiq 13HD B C H G F I D A E libwacom-libwacom-2.2.0/data/layouts/cintiq-20wsx.svg000066400000000000000000000203671421725554000225220ustar00rootroot00000000000000 Wacom Cintiq 20WSX A B C D E F G H I J K L M N Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/cintiq-21ux.svg000066400000000000000000000117351421725554000223350ustar00rootroot00000000000000 Wacom Cintiq 21UX A B C D E F G H Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/cintiq-21ux2.svg000066400000000000000000000212551421725554000224150ustar00rootroot00000000000000 Wacom Cintiq 21UX2 B C D E A F G H I K L M N J O P Q R Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/cintiq-22hd.svg000066400000000000000000000214151421725554000222710ustar00rootroot00000000000000 Wacom Cintiq 22HD B C D E A F G H I K L M N J O P Q R Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/cintiq-24hd.svg000066400000000000000000000237371421725554000223040ustar00rootroot00000000000000 Wacom Cintq 24HD A B C D E F G H CCW CW I J K L M N O P CCW CW libwacom-libwacom-2.2.0/data/layouts/cintiq-companion-2.svg000066400000000000000000000117521421725554000236570ustar00rootroot00000000000000 Wacom Cintiq Companion 2 B C D J I H K A E F G libwacom-libwacom-2.2.0/data/layouts/cintiq-companion-hybrid.svg000066400000000000000000000104171421725554000247740ustar00rootroot00000000000000 Wacom Cintiq Companion Hybrid B C H G F I D A E libwacom-libwacom-2.2.0/data/layouts/cintiq-companion.svg000066400000000000000000000103721421725554000235150ustar00rootroot00000000000000 Wacom Cintiq Companion B C H G F I D A E libwacom-libwacom-2.2.0/data/layouts/cintiq-pro-16-2.svg000066400000000000000000000064471421725554000227250ustar00rootroot00000000000000 Wacom Cintiq Pro 16 A B C D E F G H libwacom-libwacom-2.2.0/data/layouts/dth-2242.svg000066400000000000000000000054111421725554000214110ustar00rootroot00000000000000 Wacom DTH-2242 A B C D E F libwacom-libwacom-2.2.0/data/layouts/dth-2452.svg000066400000000000000000000054341421725554000214210ustar00rootroot00000000000000 Wacom DTH-2452 A B C D libwacom-libwacom-2.2.0/data/layouts/dti-520.svg000066400000000000000000000100761421725554000213320ustar00rootroot00000000000000 Wacom DTI520UB/L A B C D E F G H I J libwacom-libwacom-2.2.0/data/layouts/dtk-1651.svg000066400000000000000000000054341421725554000214240ustar00rootroot00000000000000 Wacom DTK-1651 A B C D libwacom-libwacom-2.2.0/data/layouts/dtk-2451.svg000066400000000000000000000054341421725554000214230ustar00rootroot00000000000000 Wacom DTK-2451 A B C D libwacom-libwacom-2.2.0/data/layouts/dtu-1031.svg000066400000000000000000000033011421725554000214150ustar00rootroot00000000000000 Wacom DTU1031 A B C D libwacom-libwacom-2.2.0/data/layouts/dtu-1141.svg000066400000000000000000000034501421725554000214240ustar00rootroot00000000000000 Wacom DTU-1141 A B C D libwacom-libwacom-2.2.0/data/layouts/dtu-1141b.svg000066400000000000000000000034521421725554000215700ustar00rootroot00000000000000 Wacom DTU-1141B A B C D libwacom-libwacom-2.2.0/data/layouts/ek-remote.svg000066400000000000000000000316471421725554000221450ustar00rootroot00000000000000 image/svg+xml Wacom ExpressKey Remote Wacom ExpressKey Remote B A D E F C G I J L M O H K N CCW CW R Q P libwacom-libwacom-2.2.0/data/layouts/gaomon-s620.svg000066400000000000000000000025441421725554000222170ustar00rootroot00000000000000 Gaomon S620 A B C D libwacom-libwacom-2.2.0/data/layouts/graphire-wireless-8x6.svg000066400000000000000000000024671421725554000243320ustar00rootroot00000000000000 Wacom Graphire Wireless A B libwacom-libwacom-2.2.0/data/layouts/graphire4-4x5.svg000066400000000000000000000026211421725554000225460ustar00rootroot00000000000000 Wacom Graphire4 4x5 A B libwacom-libwacom-2.2.0/data/layouts/graphire4-6x8.svg000066400000000000000000000026211421725554000225530ustar00rootroot00000000000000 Wacom Graphire4 4x5 A B libwacom-libwacom-2.2.0/data/layouts/huion-h420.svg000066400000000000000000000026541421725554000220460ustar00rootroot00000000000000 Huion H420 A B C libwacom-libwacom-2.2.0/data/layouts/huion-h610-pro.svg000066400000000000000000000071521421725554000226430ustar00rootroot00000000000000 Huion H610 Pro A B C D E F G H libwacom-libwacom-2.2.0/data/layouts/huion-h640p.svg000066400000000000000000000054301421725554000222250ustar00rootroot00000000000000 Huion H640P A B C D E F libwacom-libwacom-2.2.0/data/layouts/huion-h950p.svg000066400000000000000000000071041421725554000222310ustar00rootroot00000000000000 Huion H950P A B C D E F G H libwacom-libwacom-2.2.0/data/layouts/huion-new-1060-plus.svg000066400000000000000000000110141421725554000235150ustar00rootroot00000000000000 Huion New 1060 Plus A B C D E F G H I J K L libwacom-libwacom-2.2.0/data/layouts/intuos-m-p.svg000066400000000000000000000032141421725554000222520ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-680) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-m-p2.svg000066400000000000000000000030741421725554000223400ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-690) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-m-p3.svg000066400000000000000000000030201421725554000223300ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-6100) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-m-pt.svg000066400000000000000000000032141421725554000224360ustar00rootroot00000000000000 Wacom Intuos PT Medium (CTH-680) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-m-pt2.svg000066400000000000000000000030731421725554000225230ustar00rootroot00000000000000 Wacom Intuos PT Medium (CTH-690) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-pro-2-l.svg000066400000000000000000000176411421725554000227620ustar00rootroot00000000000000 image/svg+xml Wacom Intuos Pro 2 L Wacom Intuos Pro 2 L A B C D E F G H CCW CW I libwacom-libwacom-2.2.0/data/layouts/intuos-pro-2-m.svg000066400000000000000000000176411421725554000227630ustar00rootroot00000000000000 image/svg+xml Wacom Intuos Pro 2 M Wacom Intuos Pro 2 M A B C D E F G H CCW CW I libwacom-libwacom-2.2.0/data/layouts/intuos-pro-2-s.svg000066400000000000000000000146531421725554000227710ustar00rootroot00000000000000 image/svg+xml Wacom Intuos Pro S Wacom Intuos Pro S A B C D E F CCW CW G libwacom-libwacom-2.2.0/data/layouts/intuos-pro-l.svg000066400000000000000000000117301421725554000226140ustar00rootroot00000000000000 Wacom Intuos Pro L B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos-pro-m.svg000066400000000000000000000117171421725554000226220ustar00rootroot00000000000000 Wacom Intuos Pro M B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos-pro-s.svg000066400000000000000000000101121421725554000226140ustar00rootroot00000000000000 Wacom Intuos5 Pro S B C D E F G CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos-s-p.svg000066400000000000000000000032151421725554000222610ustar00rootroot00000000000000 Wacom Intuos Pen Small (CTL-480) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-s-p2.svg000066400000000000000000000030721421725554000223440ustar00rootroot00000000000000 Wacom Intuos Pen Small (CTL-490) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-s-p3.svg000066400000000000000000000030201421725554000223360ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-6100) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-s-pt.svg000066400000000000000000000032151421725554000224450ustar00rootroot00000000000000 Wacom Intuos PT Small (CTH-480) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos-s-pt2.svg000066400000000000000000000030711421725554000225270ustar00rootroot00000000000000 Wacom Intuos PT Small (CTH-490) A B C D libwacom-libwacom-2.2.0/data/layouts/intuos3-12x12.svg000066400000000000000000000121161421725554000224220ustar00rootroot00000000000000 Wacom Intuos3 12x12 A B C D E F G H Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/intuos3-12x19.svg000066400000000000000000000121161421725554000224310ustar00rootroot00000000000000 Wacom Intuos3 12x19 A B C D E F G H Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/intuos3-4x5.svg000066400000000000000000000054251421725554000222720ustar00rootroot00000000000000 Wacom Intuos3 4x5 A B C D Up Down libwacom-libwacom-2.2.0/data/layouts/intuos3-4x6.svg000066400000000000000000000054371421725554000222760ustar00rootroot00000000000000 Wacom Intuos3 4x6 A B C D Up Down libwacom-libwacom-2.2.0/data/layouts/intuos3-6x11.svg000066400000000000000000000121071421725554000223440ustar00rootroot00000000000000 Wacom Intuos3 6x11 A B C D E F G H Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/intuos3-6x8.svg000066400000000000000000000121061421725554000222710ustar00rootroot00000000000000 Wacom Intuos3 6x8 A B C D E F G H Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/intuos3-9x12.svg000066400000000000000000000121071421725554000223500ustar00rootroot00000000000000 Wacom Intuos3 9x12 A B C D E F G H Up Down Up Down libwacom-libwacom-2.2.0/data/layouts/intuos4-12x19.svg000066400000000000000000000111261421725554000224320ustar00rootroot00000000000000 Wacom Intuos4 XL B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos4-4x6.svg000066400000000000000000000075241421725554000222760ustar00rootroot00000000000000 Wacom Intuos4 S B C D E F G CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos4-6x9-wl.svg000066400000000000000000000112741421725554000227200ustar00rootroot00000000000000 Wacom Intuos4 WL B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos4-6x9.svg000066400000000000000000000113121421725554000222710ustar00rootroot00000000000000 Wacom Intuos4 M B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos4-8x13.svg000066400000000000000000000111141421725554000223460ustar00rootroot00000000000000 Wacom Intuos4 L B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos5-l.svg000066400000000000000000000117221421725554000221040ustar00rootroot00000000000000 Wacom Intuos5 L B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos5-m.svg000066400000000000000000000117171421725554000221110ustar00rootroot00000000000000 Wacom Intuos5 M Touch B C D E F G H I CCW CW A libwacom-libwacom-2.2.0/data/layouts/intuos5-s.svg000066400000000000000000000101031421725554000221030ustar00rootroot00000000000000 Wacom Intuos5 S B C D E F G CCW CW A libwacom-libwacom-2.2.0/data/layouts/kamvas-pro-13.svg000066400000000000000000000040021421725554000225370ustar00rootroot00000000000000 Huion Kamvas Pro 13 A B C D E libwacom-libwacom-2.2.0/data/layouts/mobilestudio-pro-13.svg000066400000000000000000000132771421725554000237720ustar00rootroot00000000000000 Wacom MobileStudio Pro 13 CW CCW A B C D E F G H I J K libwacom-libwacom-2.2.0/data/layouts/mobilestudio-pro-16.svg000066400000000000000000000151601421725554000237660ustar00rootroot00000000000000 Wacom MobileStudio Pro 16 CW CCW A B C D E F G H I J K L M libwacom-libwacom-2.2.0/data/layouts/xp-pen-star03.svg000066400000000000000000000064771421725554000226010ustar00rootroot00000000000000 XP-Pen Star 03 A B C D E F G H libwacom-libwacom-2.2.0/data/letsketch-wp9620.tablet000066400000000000000000000004411421725554000221500ustar00rootroot00000000000000# LetSketch # WP9620 # # HID Descriptor: # https://github.com/linuxwacom/wacom-hid-descriptors/issues/171 [Device] Name=LetSketch LetSketch ModelName=WP9620 DeviceMatch=usb:6161:4d15 PairedIDs= Class=Bamboo Width=8 Height=6 IntegratedIn= [Features] Stylus=true Reversible=true Buttons=0 libwacom-libwacom-2.2.0/data/libwacom.stylus000066400000000000000000000304301421725554000211030ustar00rootroot00000000000000# Some generic fallback styli [0xfffff] Name=General Pen PairedStylusIds=0xffffe; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0xffffe] Name=General Pen Eraser PairedStylusIds=0xfffff; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0xffffd] Name=General Pen with no Eraser Buttons=2 Axes=Pressure; Type=General [0x1] # Lenovo ; VID_NONE | 0x0000 | BAT_SWAP Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x11] # Lenovo ; VID_NONE | 0x0000 | BAT_CHRG Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x19] # Lenovo ; VID_LENOVO | 0x60A8 | BAT_SWAP | BAT_HID Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x21] # HP ; VID_NONE | 0x0000 | BAT_SWAP # Huawei ; VID_NONE | 0x0000 | BAT_SWAP # Lenovo ; VID_NONE | 0x0000 | BAT_SWAP Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x31] # Dell ; VID_BROADCOM | 0x81B9 | BAT_SWAP # HP ; VID_CHICONY | 0xB4A3 | BAT_SWAP | BAT_HID Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x39] # Huawei ; VID_HUAWEI | 0x1091 | BAT_SWAP ("Huawei MatePen" / AF61) Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x49] # Wacom ; VID_WACOM | 0x035F | BAT_SWAP | BAT_GATT | BAT_SHARED | LONGPRESS ("Wacom Bamboo Ink" / CS321A) Name=Bamboo Ink Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x71] # Wacom ; VID_WACOM | 0x035F | BAT_SWAP | BAT_GATT | BAT_SHARED | LONGPRESS ("Wacom Bamboo Ink" / CS321A1) Name=Bamboo Ink Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x221] # HP ; VID_CHICONY | 0xB4A3 | BAT_SWAP | BAT_HID # Lenovo ; VID_NONE | 0x0000 | BAT_SWAP Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x231] # Dell ; VID_BROADCOM | 0x81C6 | BAT_SWAP | LONGPRESS (Dell PN557W) # HP ; VID_CHICONY | 0xB4A3 | BAT_SWAP | BAT_HID Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x271] # Wacom ; VID_NONE | 0x0000 | BAT_SWAP ("Wacom Bamboo Ink" / CS323A) Name=Bamboo Ink Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x421] # HP ; VID_NONE | 0x0000 | BAT_SWAP Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x431] # Dell ; VID_BROADCOM | 0x81B9 | BAT_SWAP Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x621] # Lenovo ; VID_NONE | 0x0000 | BAT_SWAP Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x631] # Dell ; VID_NONE | 0x0000 | BAT_SWAP | LONGPRESS (Dell PN557W) Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Pressure Type=Mobile [0x8051] # Google ; VID_NONE | 0x0000 | BAT_SWAP ("Google Pixelbook Pen" / C0B) Name=AES Pen Group=isdv4-aes Buttons=0 EraserType=Button Axes=Tilt;Pressure Type=Mobile [0x805B] # Dell ; VID_BROADCOM | 0x81D5 | BAT_SWAP | BAT_GATT | BAT_SHARED | LONGPRESS (Dell PN579X) # Lenovo ; VID_LENOVO | 0x60C5 | BAT_SWAP | BAT_GATT | BAT_SHARED # Toshiba; VID_NONE | 0x0000 | BAT_SWAP Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Tilt;Pressure Type=Mobile [0x806B] # HP ; VID_CHICONY | 0x1728 | BAT_CHRG | BAT_PROX | BAT_SHARED | LONGPRESS | PROX ("HP Rechargeable Active Pen" / HP Active Pen G2 / 4KL69AA) # Huawei ; VID_NONE | 0x0000 | BAT_SWAP # Lenovo ; VID_LENOVO | 0x60C2 | BAT_CHRG | BAT_GATT | BAT_SHARED Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Tilt;Pressure Type=Mobile [0x807B] # Wacom ; VID_WACOM | 0x0397 | BAT_CHRG | BAT_GATT | BAT_SHARED | LONGPRESS ("Wacom Bamboo Ink Plus" / CS322A) Name=Bamboo Ink Plus Group=isdv4-aes Buttons=1 EraserType=Button Axes=Tilt;Pressure Type=Mobile [0x826B] # HP ; VID_CHICONY | 0x1728 | BAT_CHRG | BAT_PROX | BAT_SHARED | LONGPRESS | PROX ("HP Active Pen G3" / L08263-003 / L57042-001) Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Tilt;Pressure Type=Mobile [0x846B] # HP ; VID_CHICONY | 0x1850 | BAT_CHRG | BAT_GATT | BAT_SHARED | LONGPRESS | PROX ("HP Rechargeable Active Pen G3" / HP Active Pen G3 / 6SG43AA) Name=AES Pen Group=isdv4-aes Buttons=1 EraserType=Button Axes=Tilt;Pressure Type=Mobile # Inking pen have no eraser [0x812] # Intuos and Intuos2 Name=Inking Pen Group=intuos Buttons=0 Axes=Tilt;Pressure;Distance; Type=Inking [0x801] # Intuos3 and Cintiq 21UX Name=Inking Pen Group=intuos3 Buttons=0 Axes=Tilt;Pressure;Distance; Type=Inking [0x20802] # Intuos4, 5 and Cintiq 21UX2, 22HD, 24HD Name=Inking Pen Buttons=0 Axes=Tilt;Pressure;Distance; Type=Inking [0x120802] # Intuos4, 5 and Cintiq 21UX2, 22HD, 24HD Name=Inking Pen Group=intuos5 Buttons=0 Axes=Tilt;Pressure;Distance; Type=Inking # Regular pen has eraser [0x822] # Intuos and Intuos2 Name=Classic Pen Group=intuos PairedStylusIds=0x82a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x8e2] # Intuos P/PT 2 Name=Intuos Pen Group=intuospt Buttons=2 Axes=Pressure;Distance; Type=General [0x862] # Intuos P/PT 2 Name=Intuos Pen Group=intuospt3 Buttons=2 Axes=Pressure;Distance; Type=General # Superseded by 0x842 for the MobileStudio Pro # [0x842] # Intuos2 # Name=Designer Pen # PairedStylusIds=0x84a; [0x842] # MobileStudio Pro Name=Pro Pen 2 Group=mobilestudio PairedStylusIds=0x84a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x80842] # MobileStudio Pro Name=Pro Pen 3D Group=mobilestudio Buttons=3 Axes=Tilt;Pressure;Distance; Type=3D [0x852] # Intuos2 Name=Grip Pen Group=intuos2 PairedStylusIds=0x85a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x823] # Intuos3 and Cintiq 21UX Name=Grip Pen Group=intuos3 PairedStylusIds=0x82b; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x813] # Intuos3 and Cintiq 21UX Name=Classic Pen Group=intuos3 PairedStylusIds=0x81b; Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x885] # Intuos3 and Cintiq 21UX Name=6D Art Pen Group=intuos3 Buttons=0 Axes=Tilt;Pressure;Distance;RotationZ; Type=Marker [0x802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Group=intuos4 PairedStylusIds=0x80a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x804] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Art Pen Group=intuos4 PairedStylusIds=0x80c; Buttons=2 Axes=Tilt;Pressure;Distance;RotationZ; Type=Marker [0x100804] # Intuos4, 5 and Cintiq 21UX2, 22HD, 24HD Name=Art Pen Group=intuos5 PairedStylusIds=0x10080c; Buttons=2 Axes=Tilt;Pressure;Distance;RotationZ; Type=Marker [0x100802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Group=intuos5 PairedStylusIds=0x10080a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x100842] # MobileStudio Pro, Cintiq Pro, Intuos Pro Name=Pro Pen Slim Group=mobilestudio PairedStylusIds=0x10084a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x40802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen PairedStylusIds=0x4080a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x140802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen Group=intuos5 PairedStylusIds=0x14080a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x160802] # Cintiq 13HD Pro Pen Name=Pro Pen Group=intuos5 PairedStylusIds=0x16080a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x180802] # DTH2242 Pen Name=Pen Group=dth2242 PairedStylusIds=0x18080a; Buttons=2 Axes=Tilt;Pressure;Distance; Type=General # Stroke pen has no eraser [0x832] #Intuos and Intuos2 Name=Stroke Pen Group=intuos Buttons=0 Axes=Tilt;Pressure;Distance; Type=Stroke # Erasers [0x82a] # Intuos and Intuos2 Name=Classic Pen Eraser Group=intuos PairedStylusIds=0x822; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x84a] # MobileStudio Pro Name=Pro Pen 2 Eraser Group=mobilestudio PairedStylusIds=0x842; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x85a] # Intuos2 Name=Grip Pen Eraser Group=intuos2 PairedStylusIds=0x852; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x91a] # Intuos2 Name=Airbrush Pen Eraser Group=intuos2 PairedStylusIds=0x912; EraserType=Invert Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0xd1a] # Intuos Name=Airbrush Pen Eraser Group=intuos-airbrush PairedStylusIds=0xd12; EraserType=Invert Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0x82b] # Intuos3 and Cintiq 21UX Name=Grip Pen Eraser Group=intuos3 PairedStylusIds=0x823; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x81b] # Intuos3 and Cintiq 21UX Name=Classic Pen Eraser Group=intuos3 PairedStylusIds=0x813; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x91b] # Intuos3 and Cintiq 21UX Name=Airbrush Pen Eraser Group=intuos3 PairedStylusIds=0x913; EraserType=Invert Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0x80c] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Art Pen Eraser Group=intuos4 PairedStylusIds=0x804; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=Marker [0x80a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Eraser Group=intuos4 PairedStylusIds=0x802; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x4080a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen Eraser PairedStylusIds=0x40802; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x14080a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen Eraser Group=intuos5 PairedStylusIds=0x140802; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x10080c] # Intuos4, 5 and 13HD, 24HD Art Pen Name=Art Pen Eraser Group=intuos5 PairedStylusIds=0x100804; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=Marker [0x10080a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Eraser Group=intuos5 PairedStylusIds=0x100802; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x10084a] # MobileStudio Pro, Cintiq Pro, Intuos Pro Name=Pro Pen Slim Group=mobilestudio PairedStylusIds=0x100842; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x16080a] # Cintiq 13HD Name=Pro Pen Eraser Group=intuos5 PairedStylusIds=0x160802; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x18080a] # DTH2242 Eraser Name=Pen Eraser Group=dth2242 PairedStylusIds=0x180802; EraserType=Invert Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x10090a] # Intuos4, 5 and Cintiq 13HD, 22HD, 24HD Airbrush Eraser Name=Airbrush Pen Eraser Group=intuos5 PairedStylusIds=0x100902; EraserType=Invert Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0x90a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Airbrush Pen Eraser Group=intuos4 PairedStylusIds=0x902; EraserType=Invert Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush # Airbrush pen has eraser [0xd12] # Intuos Name=Airbrush Pen Group=intuos-airbrush PairedStylusIds=0xd1a; Buttons=1 Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush [0x912] # Intuos2 Name=Airbrush Pen Group=intuos2 PairedStylusIds=0x91a; Buttons=1 Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush [0x913] # Intuos3 and Cintiq 21UX Name=Airbrush Pen Group=intuos3 PairedStylusIds=0x91b; Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0x902] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Airbrush Pen Group=intuos4 PairedStylusIds=0x90a; Buttons=1 Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush [0x100902] # Intuos4, 5 and Cintiq 13HD, 21UX2, 22HD, 24HD Name=Airbrush Pen Group=intuos5 PairedStylusIds=0x10090a; Buttons=1 Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush # Puck devices [0x096] # Intuos and Intuos2 Name=Lens Cursor Group=intuos Axes=Distance; Type=Puck HasLens=true HasWheel=false Buttons=5 [0x097] # Intuos3 Name=Lens Cursor Group=intuos3-pucks Axes=Distance; Type=Puck HasLens=true HasWheel=false Buttons=5 [0x006] # Intuos4 and Intuos5 Name=Lens Cursor Group=intuos4-lens Axes=Distance; Type=Puck HasLens=true HasWheel=false Buttons=5 [0x094] # Intuos and Intuos2 Name=4D Mouse Group=intuos Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=false Buttons=5 [0x007] # Intuos3 Name=2D Mouse Group=intuos2 Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=true Buttons=3 [0x017] # Intuos3 Name=Mouse Group=intuos3-pucks Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=true Buttons=5 [0x806] # Intuos4 and Intuos5 Name=Five Button Mouse Group=intuos4-puck Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=true Buttons=5 libwacom-libwacom-2.2.0/data/mobilestudio-pro-13-2.tablet000066400000000000000000000025471421725554000231030ustar00rootroot00000000000000# Wacom # MobileStudio Pro 13 # DTH-W1321 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # | | # I | | # J G H | DISPLAY | # K | | # | | # D | | # E | | # F | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons H, I, J, K are on a circle # [Device] Name=Wacom MobileStudio Pro 13 ModelName=DTH-W1321 Class=Cintiq DeviceMatch=usb:056a:0398 PairedID=usb:056a:039a Width=12 Height=7 Layout=mobilestudio-pro-13.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=11 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=H;I;J;K libwacom-libwacom-2.2.0/data/mobilestudio-pro-13.tablet000066400000000000000000000025471421725554000227440ustar00rootroot00000000000000# Wacom # MobileStudio Pro 13 # DTH-W1320 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # | | # I | | # J G H | DISPLAY | # K | | # | | # D | | # E | | # F | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons H, I, J, K are on a circle # [Device] Name=Wacom MobileStudio Pro 13 ModelName=DTH-W1320 Class=Cintiq DeviceMatch=usb:056a:034d PairedID=usb:056a:034a Width=12 Height=7 Layout=mobilestudio-pro-13.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=11 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=H;I;J;K libwacom-libwacom-2.2.0/data/mobilestudio-pro-16-2.tablet000066400000000000000000000026651421725554000231070ustar00rootroot00000000000000# Wacom # MobileStudio Pro 16 # DTH-W1621 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # | | # K | | # L I J | DISPLAY | # M | | # | | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons J, K, L, M are on a circle # [Device] Name=Wacom MobileStudio Pro 16 ModelName=DTH-W1621 Class=Cintiq DeviceMatch=usb:056a:0399 PairedID=usb:056a:039b Width=14 Height=8 Layout=mobilestudio-pro-16.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=13 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=J;K;L;M libwacom-libwacom-2.2.0/data/mobilestudio-pro-16-3.tablet000066400000000000000000000026651421725554000231100ustar00rootroot00000000000000# Wacom # MobileStudio Pro 16 # DTH-W1620 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # | | # K | | # L I J | DISPLAY | # M | | # | | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons J, K, L, M are on a circle # [Device] Name=Wacom MobileStudio Pro 16 ModelName=DTH-W1620 Class=Cintiq DeviceMatch=usb:056a:03aa PairedID=usb:056a:03ac Width=14 Height=8 Layout=mobilestudio-pro-16.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=13 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=J;K;L;M libwacom-libwacom-2.2.0/data/mobilestudio-pro-16.tablet000066400000000000000000000026651421725554000227500ustar00rootroot00000000000000# Wacom # MobileStudio Pro 16 # DTH-W1620 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # | | # K | | # L I J | DISPLAY | # M | | # | | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons J, K, L, M are on a circle # [Device] Name=Wacom MobileStudio Pro 16 ModelName=DTH-W1620 Class=Cintiq DeviceMatch=usb:056a:034e PairedID=usb:056a:034b Width=14 Height=8 Layout=mobilestudio-pro-16.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=13 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=J;K;L;M libwacom-libwacom-2.2.0/data/n-trig-pen.tablet000066400000000000000000000006231421725554000211770ustar00rootroot00000000000000# USB tablet PC models: HP TouchSmart TX2z, Dell Latitude XT, and Dell Latitude XT2 # # stylus with two buttons and no eraser; 4FGT touchscreen # # HP Screen size 10.2 x 6.4; 12.1" diagonal # Dell Screen size 10.3 x 6.4; 12.1" diagonal [Device] Name=N-Trig Pen ModelName= DeviceMatch=usb:1b96:0001 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/one-by-wacom-m-p.tablet000066400000000000000000000005541421725554000222060ustar00rootroot00000000000000# Wacom # One by Wacom (medium) # CTL-671 # # third generation BambooPT # # stylus with two buttons and no eraser # Pen active area: 8.5 x 5.34in [Device] Name=One by Wacom (medium) ModelName=CTL-671 DeviceMatch=usb:056a:0301 Class=Bamboo Width=9 Height=5 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/one-by-wacom-m-p2.tablet000066400000000000000000000006161421725554000222670ustar00rootroot00000000000000# Wacom # One by Wacom (medium) # CTL-672 # # third generation BambooPT; Second-generation "One by Wacom" # # stylus with two buttons and no eraser # Pen active area: 8.5 x 5.31in [Device] Name=One by Wacom (medium) ModelName=CTL-672 DeviceMatch=usb:056a:037b Class=Bamboo Width=9 Height=5 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/one-by-wacom-s-p.tablet000066400000000000000000000005521421725554000222120ustar00rootroot00000000000000# Wacom # One by Wacom (small) # CTL-471 # # third generation BambooPT # # stylus with two buttons and no eraser # Pen active area: 5.8 x 3.63in [Device] Name=One by Wacom (small) ModelName=CTL-471 DeviceMatch=usb:056a:0300 Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/one-by-wacom-s-p2.tablet000066400000000000000000000006151421725554000222740ustar00rootroot00000000000000# Wacom # One by Wacom (small) # CTL-472 # # third generation BambooPT; Second-generation "One by Wacom" # # stylus with two buttons and no eraser # Pen active area: 5.98 x 3.74in [Device] Name=One by Wacom (small) ModelName=CTL-472 DeviceMatch=usb:056a:037a Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/serial-wacf004.tablet000066400000000000000000000002471421725554000216420ustar00rootroot00000000000000[Device] Name=Wacom Serial Tablet WACf004 ModelName= DeviceMatch=serial:0000:0000 Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/surface-go-2.tablet000066400000000000000000000004751421725554000214160ustar00rootroot00000000000000# This is for the Microsoft Surface Go 2 # # Elan I2C sensor # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/192 # sysinfo.43RvL0wF2a [Device] Name=Microsoft Surface Go 2 Class=ISDV4 DeviceMatch=i2c:04f3:2a1c Width=10 Height=7 IntegratedIn=Display;System; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/surface-go.tablet000066400000000000000000000004421421725554000212510ustar00rootroot00000000000000# This is for the Microsoft Surface Go # # Elan I2C sensor # # https://github.com/linuxwacom/wacom-hid-descriptors/issues/51 [Device] Name=Microsoft Surface Go Class=ISDV4 DeviceMatch=i2c:04f3:261a Width=8 Height=5 IntegratedIn=Display;System; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-2.2.0/data/volito-4x5.tablet000066400000000000000000000002741421725554000211530ustar00rootroot00000000000000# Wacom # Volito 4x5 # FT-0405 [Device] Name=Wacom Volito 4x5 ModelName=FT-0405 DeviceMatch=usb:056a:0060 Class=Graphire Width=5 Height=4 Styli=0xffffd; [Features] Stylus=true Buttons=0 libwacom-libwacom-2.2.0/data/wacom-one.tablet000066400000000000000000000004561421725554000211100ustar00rootroot00000000000000# Wacom # Wacom One Pen Display 13 # DTC133 [Device] Name=Wacom One Pen Display 13 ModelName=DTC133 Class=PenDisplay DeviceMatch=usb:056a:03a6;usb:056a:03bd Width=11 Height=6 # No pad buttons, so no layout IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-2.2.0/data/wacom.example000066400000000000000000000162651421725554000205160ustar00rootroot00000000000000# Example model file description for a tablet # # The .tablet file must have a name matching the device, usually # the lowercase version of -.tablet. See existing data files # for guidance, Wacom devices can skip the vendor name. # # In most cases, a tablet data file can be autogenerated, see the README # in the wacom-hid-descriptors repository: # https://github.com/linuxwacom/wacom-hid-descriptors/ # # In 90% of remaining cases we already ship a file for a device that is # similar to the new one to be added. The best approach is to copy that file # and change it. This example file here describes all possible keys. # # To test a new file, copy it into /usr/share/libwacom/ and run # libwacom-list-local-devices. This should show your device with all # information from this file. # # The file should start with a pseudo-drawing of the device that illustrates # where the buttons are. See the data/intuos5-m.tablet file for a full # example: # # Wacom # Intuos5 M # PTK-650 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # [Device] # The name is the vendor and product name announced by the kernel. This # filename is shown as device name by tools like libinput record, # evemu-record or evtest. Name=Wacom Intuos4 6x9 # The unique model name for this device where it differs significantly from # the Name. For example, Wacom has several devices named Wacom Intuos Pro # but they all have a unique model name (e.g. PTH-660). # Leave blank where the device name is sufficient to identify. ModelName= # DeviceMatch includes the bus (usb, bluetooth, serial), the vendor ID and # product ID. This is the connector used, not whatever name the kernel # might give it, so some "Wacom Serial" builtin devices will be USB # as that's how they're connected. # # For example: # $ lsusb | grep Wacom # Bus 002 Device 003: ID 056a:00bc Wacom Co., Ltd Intuos4 6x9 # will give you the device match below. # # You can find a full list of known Device IDs at: # https://github.com/linuxwacom/input-wacom/wiki/Device-IDs # # Do not add 0x in front of the hex numbers, make sure to pad each ID # so it has exactly 4 digits. hex letters must be lowercase. DeviceMatch=usb:056a:00bc # Paired PID includes the match line of any device that share the same # physical device but has different product or vendor ids (e.g. the touch # device on the 24HDT). The format of the match line is identical to # DeviceMatch but only one value is permitted. # Note: the PIDs listed may not be libwacom devices themselves. PairedIDs=usb:056a:0335 # Class of the tablet. Valid classes include Intuos3, Intuos4, Graphire, Bamboo, Cintiq # If unsure, or not applicable (the tablet isn't stand-alone for example). # # The class is deprecated as of v1.4. For non-Wacom devices, set to Bamboo # for external tablets and ISDV4 for built-in ones. Class=Bamboo # (Optional) Width in inches, as advertised by the manufacturer Width=9 # (Optional) Height in inches, as advertised by the manufacturer Height=6 # Integration flags. Set to Display where the device is an external monitor # (e.g. Cintiq) or Display;System where the device is built into the display # of the system itself (i.e. part of a laptop). Leave empty for external # tablets. # Note, if unspecified, the integration flags will be taken from the kernel. IntegratedIn=Display;System # Filename of the SVG representing this tablet. Only needed for tablets with # pad buttons. Layout=bamboo-16fg-m-pt.svg # Styli # # This is a list of stylus IDs supported by the tablet. Non-Wacom devices # usually do not support specific stylus IDs and default to the generic # pens. If the stylus has an eraser: # Styli=0xffffe;0xfffff; # If the stylus does not have an eraser: # Styli=0xffffd # # For Wacom devices this is needed only for the professional series devices, # i.e. Intuos Pro and Cintiq. # # In general, differently sized models of the same range support the same # styli, so you can copy/paste the list from another definition. # # After that, you can try piecing the stylus list from the names of the # styli in libwacom.stylus, using the Wacom webshop as a reference # (how many supported styli, what do they look like, etc.) # # Finally, if you cannot find any information about the styli supported # by your device, you will need to gather the "Wacom Serial IDs", # and getting each stylus in proximity of the tablet. Styli=0x802;0x804;0x40802;0x80c;0x80a;0x4080a;0x90a;0x20802;0x902; # Optional features that this tablet supports # Some features are dependent on the actual tool used, e.g. not all styli # have an eraser and some styli have additional custom axes (e.g. the # airbrush pen). These features describe those available on the tablet. # # Features not set in a file default to false/0 [Features] # This tablet supports styli (and erasers, if present on the actual stylus) Stylus=true # Whether the tablet can be used left-handed. # This is only for asymmetrical stand-alone tablets. The tablet # is deemed reversible if the tablet can be turned 180 degrees # so buttons are placed on the other side. The Intuos4 tablet # is a great example of that. Reversible=true # This tablet supports touch. Touch=false # This tablet provides a hardware touch switch. TouchSwitch=false # This tablet has a touch ring (Intuos4 and Cintiq 24HD) # A touch ring is a circular button that responds to touch # (rather than clicks): # http://intuos.wacom.com/americas/touch-ring.php Ring=true # This tablet has a second touch ring (Cintiq 24HD) Ring2=false # This tablet's number of strips, default is zero NumStrips=1 # Number of buttons on the tablet Buttons=9 # Metadata about the buttons on the tablet # Buttons are "numbered" using upper-case letters [Buttons] # Location of the buttons Left=A;B Right=C;D Top= Bottom= # The evdev codes for the buttons in order A, B, C, ... # The code must be defined for all buttons or this line is ignored EvdevCodes=0x110;0x112;0x111;0x113 ##################### # ADVANCED FEATURES # ##################### # Those are only needed for a few professional tablets # for which the values have already been filled in. # Which buttons have OLEDs associated to them # Only the Intuos4 devices had this. # http://101.wacom.com/i4settings/images/expresskeys-feature.jpg OLEDs=B;C;D;E;F;G;H;I # The location of the various rings, if associated with a button # or buttons. # For example, a single button in the middle of the touchring, like # on the Intuos4 tablets. You will need to mention the number of modes # that the button allows if there isn't one button per mode. Ring=A RingNumModes=4 # Or the 2nd touchring associated with 3 buttons like the Cintiq24HD Ring2=I;J;K # Implied, as we have 3 buttons for that ring Ring2NumModes=3 # If the touchstrips have mode toggling through a button # like on the Cintiq 21UX2 Touchstrip=A Touchstrip2=J # We assume the same number of modes for each of the touchstrips # if there is more than one StripsNumModes=4 libwacom-libwacom-2.2.0/data/waltop-slim-tablet-12-1.tablet000066400000000000000000000012041421725554000233120ustar00rootroot00000000000000# Waltop # Slim Tablet 12.1" # # Also known/rebranded as: Genius G-Pen F610, Trust Slimline Widescreen Tablet, Medion Graphics Pad MD 85637 # guess: VisTablet Original 12", Adesso CyberTablet Z12, Adesso CT-Z12A, PenPower Tooya Pro, Aiptek Slim 12.1 Inch, Aiptek SlimTablet 600u Premium II, NGS Slim Pro, iVistaTablet Slim 12.1, PENTAGRAM ThinType P 2006 # According to https://digimend.github.io/tablets/Waltop_Slim_Tablet_12.1_inch/ # # [Device] Name=Waltop Slim Tablet 12.1" ModelName= DeviceMatch=usb:172f:0031 Class=Bamboo Width=10 Height=6 Styli=0xffffd; [Features] Stylus=true Reversible=false Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/xp-pen-g430.tablet000066400000000000000000000002751421725554000211040ustar00rootroot00000000000000# XP-Pen # G430 # [Device] Name=XP-Pen G430 ModelName= DeviceMatch=usb:28bd:0075 Class=Bamboo Width=4 Height=3 Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/xp-pen-g640.tablet000066400000000000000000000003271421725554000211050ustar00rootroot00000000000000# XP-Pen # Start G640 # [Device] Name=XP-Pen Star G640 ModelName= DeviceMatch=usb:28bd:0914;usb:28bd:0094 Class=Bamboo Width=6 Height=4 Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-2.2.0/data/xp-pen-star03.tablet000066400000000000000000000006611421725554000215420ustar00rootroot00000000000000# XP-Pen # Star 03 # [Device] Name=XP-Pen Star 03 ModelName= DeviceMatch=usb:5543:0081:UC-Logic TABLET 1060N Pen;usb:5543:0081:UC-Logic TABLET 1060N Pad;usb:28bd:0907:UGTABLET 10 inch PenTablet Class=Bamboo Width=10 Height=6 IntegratedIn= Layout=xp-pen-star03.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=8 [Buttons] Left=A;B;C;D;E;F;G;H EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107 libwacom-libwacom-2.2.0/doc/000077500000000000000000000000001421725554000156555ustar00rootroot00000000000000libwacom-libwacom-2.2.0/doc/doxygen-awesome.css000066400000000000000000000755711421725554000215210ustar00rootroot00000000000000/** Doxygen Awesome https://github.com/jothepro/doxygen-awesome-css MIT License Copyright (c) 2021 jothepro Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ :root { /* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */ --primary-color: #1982d2; --primary-dark-color: #00559f; --primary-light-color: #7aabd6; --primary-lighter-color: #cae1f1; --primary-lightest-color: #e9f1f8; /* page base colors */ --page-background-color: white; --page-foreground-color: #2c3e50; --page-secondary-foreground-color: #67727e; /* color for all separators on the website: hr, borders, ... */ --separator-color: #dedede; /* border radius for all rounded components. Will affect many components, like dropdowns, memitems, codeblocks, ... */ --border-radius-large: 8px; --border-radius-small: 4px; --border-radius-medium: 6px; /* default spacings. Most compontest reference these values for spacing, to provide uniform spacing on the page. */ --spacing-small: 5px; --spacing-medium: 10px; --spacing-large: 16px; /* default box shadow used for raising an element above the normal content. Used in dropdowns, Searchresult, ... */ --box-shadow: 0 2px 10px 0 rgba(0,0,0,.1); --odd-color: rgba(0,0,0,.03); /* font-families. will affect all text on the website * font-family: the normal font for text, headlines, menus * font-family-monospace: used for preformatted text in memtitle, code, fragments */ --font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif; --font-family-monospace: source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace; /* font sizes */ --page-font-size: 15.6px; --navigation-font-size: 14.4px; --code-font-size: 14.4px; /* affects code, fragment */ --title-font-size: 22px; /* content text properties. These only affect the page content, not the navigation or any other ui elements */ --content-line-height: 27px; /* The content is centered and constraint in it's width. To make the content fill the whole page, set the variable to auto.*/ --content-maxwidth: 900px; /* colors for various content boxes: @warning, @note, @deprecated @bug */ --warning-color: #fca49b; --warning-color-dark: #b61825; --warning-color-darker: #75070f; --note-color: rgba(255,229,100,.3); --note-color-dark: #c39900; --note-color-darker: #8d7400; --deprecated-color: rgb(214, 216, 224); --deprecated-color-dark: #5b6269; --deprecated-color-darker: #43454a; --bug-color: rgb(246, 208, 178); --bug-color-dark: #a53a00; --bug-color-darker: #5b1d00; --invariant-color: #b7f8d0; --invariant-color-dark: #00ba44; --invariant-color-darker: #008622; /* blockquote colors */ --blockquote-background: #f5f5f5; --blockquote-foreground: #727272; /* table colors */ --tablehead-background: #f1f1f1; --tablehead-foreground: var(--page-foreground-color); /* menu-display: block | none * Visibility of the top navigation on screens >= 768px. On smaller screen the menu is always visible. * `GENERATE_TREEVIEW` MUST be enabled! */ --menu-display: block; --menu-focus-foreground: var(--page-background-color); --menu-focus-background: var(--primary-color); --menu-selected-background: rgba(0,0,0,.05); --header-background: var(--page-background-color); --header-foreground: var(--page-foreground-color); /* searchbar colors */ --searchbar-background: var(--side-nav-background); --searchbar-foreground: var(--page-foreground-color); /* searchbar size * (`searchbar-width` is only applied on screens >= 768px. * on smaller screens the searchbar will always fill the entire screen width) */ --searchbar-height: 33px; --searchbar-width: 210px; /* code block colors */ --code-background: #f5f5f5; --code-foreground: var(--page-foreground-color); /* fragment colors */ --fragment-background: #282c34; --fragment-foreground: #ffffff; --fragment-keyword: #cc99cd; --fragment-keywordtype: #ab99cd; --fragment-keywordflow: #e08000; --fragment-token: #7ec699; --fragment-comment: #999999; --fragment-link: #98c0e3; --fragment-preprocessor: #65cabe; --fragment-linenumber-color: #cccccc; --fragment-linenumber-background: #35393c; --fragment-linenumber-border: #1f1f1f; --fragment-lineheight: 20px; /* sidebar navigation (treeview) colors */ --side-nav-background: #fbfbfb; --side-nav-foreground: var(--page-foreground-color); --side-nav-arrow-color: var(--page-background-color); /* height of an item in any tree / collapsable table */ --tree-item-height: 30px; } @media screen and (max-width: 767px) { :root { --page-font-size: 16px; --navigation-font-size: 16px; --code-font-size: 15px; /* affects code, fragment */ --title-font-size: 22px; } } @media (prefers-color-scheme: dark) { :root { --primary-color: #00559f; --primary-dark-color: #1982d2; --primary-light-color: #4779ac; --primary-lighter-color: #191e21; --primary-lightest-color: #191a1c; --box-shadow: 0 2px 10px 0 rgba(0,0,0,.35); --odd-color: rgba(0,0,0,.1); --menu-selected-background: rgba(0,0,0,.4); --page-background-color: #1C1D1F; --page-foreground-color: #d2dbde; --page-secondary-foreground-color: #859399; --separator-color: #000000; --side-nav-background: #252628; --code-background: #2a2c2f; --tablehead-background: #2a2c2f; --blockquote-background: #1f2022; --blockquote-foreground: #77848a; --warning-color: #b61825; --warning-color-dark: #510a02; --warning-color-darker: #f5b1aa; --note-color: rgb(255, 183, 0); --note-color-dark: #9f7300; --note-color-darker: #fff6df; --deprecated-color: rgb(88, 90, 96); --deprecated-color-dark: #262e37; --deprecated-color-darker: #a0a5b0; --bug-color: rgb(248, 113, 0); --bug-color-dark: #812a00; --bug-color-darker: #ffd3be; } } body { color: var(--page-foreground-color); background-color: var(--page-background-color); font-size: var(--page-font-size); } body, table, div, p, dl, #nav-tree .label, .title, .sm-dox a, .sm-dox a:hover, .sm-dox a:focus, #projectname, .SelectItem, #MSearchField, .navpath li.navelem a, .navpath li.navelem a:hover { font-family: var(--font-family); } h1, h2, h3, h4, h5 { margin-top: .9em; font-weight: 600; line-height: initial; } p, div, table, dl { font-size: var(--page-font-size); } a, a.el:visited, a.el:hover, a.el:focus, a.el:active { color: var(--primary-dark-color); } /* Title and top navigation */ #top { background: var(--header-background); border-bottom: 1px solid var(--separator-color); } @media screen and (min-width: 768px) { #top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; } } #main-nav { flex-grow: 5; padding: var(--spacing-small) var(--spacing-medium); } #titlearea { width: auto; padding: var(--spacing-medium) var(--spacing-large); background: none; color: var(--header-foreground); border-bottom: none; } @media screen and (max-width: 767px) { #titlearea { padding-bottom: var(--spacing-small); } } #titlearea table tbody tr { height: auto !important; } #projectname { font-size: var(--title-font-size); font-weight: 600; } #projectnumber { font-family: inherit; font-size: 60%; } #projectbrief { font-family: inherit; font-size: 80%; } #projectlogo { vertical-align: middle; } #projectlogo img { max-height: calc(var(--title-font-size) * 2); margin-right: var(--spacing-small); } .sm-dox, .tabs, .tabs2, .tabs3 { background: none; padding: 0; } .tabs, .tabs2, .tabs3 { border-bottom: 1px solid var(--separator-color); margin-bottom: -1px; } @media screen and (max-width: 767px) { .sm-dox a span.sub-arrow { background: var(--code-background); } } @media screen and (min-width: 768px) { .sm-dox li, .tablist li { display: var(--menu-display); } .sm-dox a span.sub-arrow { border-color: var(--header-foreground) transparent transparent transparent; } .sm-dox a:hover span.sub-arrow { border-color: var(--menu-focus-foreground) transparent transparent transparent; } .sm-dox ul a span.sub-arrow { border-color: transparent transparent transparent var(--header-foreground); } .sm-dox ul a:hover span.sub-arrow { border-color: transparent transparent transparent var(--menu-focus-foreground); } } .sm-dox ul { background: var(--page-background-color); box-shadow: var(--box-shadow); border: 1px solid var(--separator-color); border-radius: var(--border-radius-medium) !important; padding: var(--spacing-small); animation: ease-out 150ms slideInMenu; } @keyframes slideInMenu { from { opacity: 0; transform: translate(0px, -2px); } to { opacity: 1; transform: translate(0px, 0px); } } .sm-dox ul a { color: var(--page-foreground-color); background: var(--page-background-color); font-size: var(--navigation-font-size); } .sm-dox>li>ul:after { border-bottom-color: var(--page-background-color) !important; } .sm-dox>li>ul:before { border-bottom-color: var(--separator-color) !important; } .sm-dox ul a:hover, .sm-dox ul a:active, .sm-dox ul a:focus { font-size: var(--navigation-font-size); color: var(--menu-focus-foreground); text-shadow: none; background-color: var(--menu-focus-background); border-radius: var(--border-radius-small) !important; } .sm-dox a, .sm-dox a:focus, .tablist li, .tablist li a, .tablist li.current a { text-shadow: none; background: transparent; background-image: none !important; color: var(--header-foreground); font-weight: normal; font-size: var(--navigation-font-size); } .sm-dox a:focus { outline: auto; } .sm-dox a:hover, .sm-dox a:active, .tablist li a:hover { text-shadow: none; font-weight: normal; background: var(--menu-focus-background); color: var(--menu-focus-foreground); border-radius: var(--border-radius-small) !important; font-size: var(--navigation-font-size); } .tablist li.current { border-radius: var(--border-radius-small); background: var(--menu-selected-background); } .tablist li { margin: var(--spacing-small) 0 var(--spacing-small) var(--spacing-small); } .tablist a { padding: 0 var(--spacing-large); } /* Search box */ #MSearchBox { height: var(--searchbar-height); background: var(--searchbar-background); border-radius: var(--searchbar-height); border: 1px solid var(--separator-color); overflow: hidden; width: var(--searchbar-width); position: relative; box-shadow: none; display: block; margin-top: 0; } .left #MSearchSelect { left: 0; } .tabs .left #MSearchSelect { padding-left: 0; } .tabs #MSearchBox { position: absolute; right: var(--spacing-medium); } @media screen and (max-width: 767px) { .tabs #MSearchBox { position: relative; right: 0; margin-left: var(--spacing-medium); margin-top: 0; } } #MSearchSelectWindow, #MSearchResultsWindow { z-index: 9999; } #MSearchBox.MSearchBoxActive { border-color: var(--primary-color); box-shadow: inset 0 0 0 1px var(--primary-color); } #main-menu > li:last-child { margin-right: 0; } @media screen and (max-width: 767px) { #main-menu > li:last-child { height: 50px; } } #MSearchField { font-size: var(--navigation-font-size); height: calc(var(--searchbar-height) - 2px); background: transparent; width: calc(var(--searchbar-width) - 64px); } .MSearchBoxActive #MSearchField { color: var(--searchbar-foreground); } #MSearchSelect { top: calc(calc(var(--searchbar-height) / 2) - 11px); } .left #MSearchSelect { padding-left: 8px; } #MSearchBox span.left, #MSearchBox span.right { background: none; } #MSearchBox span.right { padding-top: calc(calc(var(--searchbar-height) / 2) - 12px); } .tabs #MSearchBox span.right { top: calc(calc(var(--searchbar-height) / 2) - 12px); } @keyframes slideInSearchResults { from { opacity: 0; transform: translate(0, 15px); } to { opacity: 1; transform: translate(0, 20px); } } #MSearchResultsWindow { left: auto !important; right: var(--spacing-medium); border-radius: var(--border-radius-large); border: 1px solid var(--separator-color); transform: translate(0, 20px); box-shadow: var(--box-shadow); animation: ease-out 280ms slideInSearchResults; background: var(--page-background-color); } iframe#MSearchResults { background: var(--page-background-color); margin: 4px; } #MSearchSelectWindow { border: 1px solid var(--separator-color); border-radius: var(--border-radius-medium); box-shadow: var(--box-shadow); background: var(--page-background-color); } #MSearchSelectWindow a.SelectItem { font-size: var(--navigation-font-size); line-height: var(--content-line-height); margin: 0 var(--spacing-small); border-radius: var(--border-radius-small); color: var(--page-foreground-color); } #MSearchSelectWindow a.SelectItem:hover { background: var(--menu-focus-background); color: var(--menu-focus-foreground); } @media screen and (max-width: 767px) { #MSearchBox { margin-top: var(--spacing-medium); margin-bottom: var(--spacing-medium); width: calc(100vw - 30px); } #main-menu > li:last-child { float: none !important; } #MSearchField { width: calc(100vw - 95px); } @keyframes slideInSearchResultsMobile { from { opacity: 0; transform: translate(0, 15px); } to { opacity: 1; transform: translate(0, 20px); } } #MSearchResultsWindow { left: var(--spacing-medium) !important; right: var(--spacing-medium); overflow: auto; transform: translate(0, 20px); animation: ease-out 280ms slideInSearchResultsMobile; } } /* Tree view */ #side-nav { padding: 0 !important; background: var(--side-nav-background); } @media screen and (max-width: 767px) { #side-nav { display: none; } #doc-content { margin-left: 0 !important; height: auto !important; padding-bottom: calc(2 * var(--spacing-large)); } } #nav-tree { background: transparent; } #nav-tree .label { font-size: var(--navigation-font-size); } #nav-tree .item { height: var(--tree-item-height); line-height: var(--tree-item-height); } #nav-sync { top: 12px !important; right: 12px; } #nav-tree .selected { text-shadow: none; background-image: none; background-color: transparent; box-shadow: inset 4px 0 0 0 var(--primary-dark-color); } #nav-tree a { color: var(--side-nav-foreground); } #nav-tree a:focus { outline-style: auto; } .arrow { color: var(--primary-light-color); font-family: serif; height: auto; text-align: right; } #nav-tree .arrow { opacity: 0; } #nav-tree div.item:hover .arrow, #nav-tree a:focus .arrow { opacity: 1; } #nav-tree .selected a { color: var(--primary-dark-color); font-weight: bolder; } .ui-resizable-e { background: var(--separator-color); width: 1px; } /* Contents */ div.header { border-bottom: 1px solid var(--separator-color); background-color: var(--page-background-color); background-image: none; } div.contents, div.header .title, div.header .summary { max-width: var(--content-maxwidth); } div.contents, div.header .title { line-height: initial; margin: calc(var(--spacing-medium) + .2em) auto var(--spacing-medium) auto; } div.header .summary { margin: var(--spacing-medium) auto 0 auto; } div.headertitle { padding: 0; } div.header .title { font-weight: 600; font-size: 210%; padding: var(--spacing-medium) var(--spacing-large); word-break: break-word; } div.header .summary { width: auto; display: block; float: none; padding: 0 var(--spacing-large); } td.memSeparator { border-color: var(--separator-color); } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background: var(--code-background); } .mdescRight { color: var(--page-secondary-foreground-color); } span.mlabel { background: var(--primary-color); border: none; padding: 4px 9px; border-radius: 12px; margin-right: var(--spacing-medium); } span.mlabel:last-of-type { margin-right: 2px; } div.contents { padding: 0 var(--spacing-large); } div.contents p, div.contents li { line-height: var(--content-line-height); } div.contents div.dyncontent { margin: var(--spacing-medium) 0; } @media (prefers-color-scheme: dark) { div.contents div.dyncontent img { filter: hue-rotate(180deg) invert(); } } h2.groupheader { border-bottom: 1px solid var(--separator-color); color: var(--page-foreground-color); } blockquote { padding: var(--spacing-small) var(--spacing-medium); background: var(--blockquote-background); color: var(--blockquote-foreground); border-left: 2px solid var(--blockquote-foreground); margin: 0; } blockquote p { margin: var(--spacing-small) 0 var(--spacing-medium) 0; } .paramname { color: var(--primary-dark-color); } .glow { text-shadow: 0 0 15px var(--primary-light-color) !important; } .alphachar a { color: var(--page-foreground-color); } /* Table of Contents */ div.toc { background-color: var(--side-nav-background); border: 1px solid var(--separator-color); border-radius: var(--border-radius-medium); box-shadow: var(--box-shadow); padding: 0 var(--spacing-large); margin: 0 0 var(--spacing-medium) var(--spacing-medium); } div.toc h3 { color: var(--side-nav-foreground); font-size: var(--navigation-font-size); margin: var(--spacing-large) 0; } div.toc li { font-size: var(--navigation-font-size); padding: 0; background: none; } div.toc li:before { content: '↓'; font-weight: 800; font-family: var(--font-family); margin-right: var(--spacing-small); color: var(--side-nav-foreground); opacity: .4; } div.toc ul li.level1 { margin: 0; } div.toc ul li.level2, div.toc ul li.level3 { margin-top: 0; } @media screen and (max-width: 767px) { div.toc { float: none; width: auto; margin: 0 0 var(--spacing-medium) 0; } } /* Code & Fragments */ code, div.fragment, pre.fragment { border-radius: var(--border-radius-small); border: none; overflow: hidden; } code { display: inline; background: var(--code-background); color: var(--code-foreground); padding: 2px 6px; word-break: break-word; } div.fragment, pre.fragment { margin: var(--spacing-medium) 0; padding: 14px 16px; background: var(--fragment-background); color: var(--fragment-foreground); overflow-x: auto; } @media screen and (max-width: 767px) { div.fragment, pre.fragment { border-top-right-radius: 0; border-bottom-right-radius: 0; } .contents > div.fragment, .textblock > div.fragment, .textblock > pre.fragment { margin: var(--spacing-medium) calc(0px - var(--spacing-large)); border-radius: 0; } .textblock li > .fragment { margin: var(--spacing-medium) calc(0px - var(--spacing-large)); } .memdoc li > .fragment { margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); } .memdoc > div.fragment, .memdoc > pre.fragment, dl dd > div.fragment, dl dd pre.fragment { margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); border-radius: 0; } } code, code a, pre.fragment, div.fragment, div.fragment .line, div.fragment span, div.fragment .line a, div.fragment .line span { font-family: var(--font-family-monospace); font-size: var(--code-font-size) !important; } div.line:after { margin-right: var(--spacing-medium); } div.fragment .line, pre.fragment { white-space: pre; word-wrap: initial; line-height: var(--fragment-lineheight); } div.fragment span.keyword { color: var(--fragment-keyword); } div.fragment span.keywordtype { color: var(--fragment-keywordtype); } div.fragment span.keywordflow { color: var(--fragment-keywordflow); } div.fragment span.stringliteral { color: var(--fragment-token) } div.fragment span.comment { color: var(--fragment-comment); } div.fragment a.code { color: var(--fragment-link); } div.fragment span.preprocessor { color: var(--fragment-preprocessor); } div.fragment span.lineno { display: inline-block; width: 27px; border-right: none; background: var(--fragment-linenumber-background); color: var(--fragment-linenumber-color); } div.fragment span.lineno a { background: none; color: var(--fragment-link); } div.fragment .line:first-child .lineno { box-shadow: -999999px 0px 0 999999px var(--fragment-linenumber-background), -999998px 0px 0 999999px var(--fragment-linenumber-border); } /* dl warning, attention, note, deprecated, bug, ... */ dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug, dl.invariant, dl.pre { padding: var(--spacing-medium); margin: var(--spacing-medium) 0; color: var(--page-background-color); overflow: hidden; margin-left: 0; border-radius: var(--border-radius-small); } dl.section dd { margin-bottom: 2px; } dl.warning, dl.attention { background: var(--warning-color); border-left: 8px solid var(--warning-color-dark); color: var(--warning-color-darker); } dl.warning dt, dl.attention dt { color: var(--warning-color-dark); } dl.note { background: var(--note-color); border-left: 8px solid var(--note-color-dark); color: var(--note-color-darker); } dl.note dt { color: var(--note-color-dark); } dl.bug { background: var(--bug-color); border-left: 8px solid var(--bug-color-dark); color: var(--bug-color-darker); } dl.bug dt a { color: var(--bug-color-dark) !important; } dl.deprecated { background: var(--deprecated-color); border-left: 8px solid var(--deprecated-color-dark); color: var(--deprecated-color-darker); } dl.deprecated dt a { color: var(--deprecated-color-dark) !important; } dl.section dd, dl.bug dd, dl.deprecated dd { margin-inline-start: 0px; } dl.invariant, dl.pre { background: var(--invariant-color); border-left: 8px solid var(--invariant-color-dark); color: var(--invariant-color-darker); } /* memitem */ div.memdoc, div.memproto, h2.memtitle { box-shadow: none; background-image: none; border: none; } div.memdoc { padding: 0 var(--spacing-medium); background: var(--page-background-color); } h2.memtitle, div.memitem { border: 1px solid var(--separator-color); } div.memproto, h2.memtitle { background: var(--code-background); text-shadow: none; } h2.memtitle { font-weight: 500; font-family: monospace, fixed; border-bottom: none; border-top-left-radius: var(--border-radius-medium); border-top-right-radius: var(--border-radius-medium); word-break: break-all; } a:target + h2.memtitle, a:target + h2.memtitle + div.memitem { border-color: var(--primary-light-color); } a:target + h2.memtitle { box-shadow: -3px -3px 3px 0 var(--primary-lightest-color), 3px -3px 3px 0 var(--primary-lightest-color); } a:target + h2.memtitle + div.memitem { box-shadow: 0 0 10px 0 var(--primary-lighter-color); } div.memitem { border-top-right-radius: var(--border-radius-medium); border-bottom-right-radius: var(--border-radius-medium); border-bottom-left-radius: var(--border-radius-medium); overflow: hidden; display: block !important; } div.memdoc { border-radius: 0; } div.memproto { border-radius: 0 var(--border-radius-small) 0 0; overflow: auto; border-bottom: 1px solid var(--separator-color); padding: var(--spacing-medium); margin-bottom: -1px; } div.memtitle { border-top-right-radius: var(--border-radius-medium); border-top-left-radius: var(--border-radius-medium); } div.memproto table.memname { font-family: monospace, fixed; color: var(--page-foreground-color); } table.mlabels, table.mlabels > tbody { display: block; } td.mlabels-left { width: auto; } table.mlabels > tbody > tr:first-child { display: flex; justify-content: space-between; flex-wrap: wrap; } .memname, .memitem span.mlabels { margin: 0 } /* reflist */ dl.reflist { border-radius: var(--border-radius-medium); border: 1px solid var(--separator-color); overflow: hidden; padding: 0; } dl.reflist dt, dl.reflist dd { box-shadow: none; text-shadow: none; background-image: none; border: none; padding: 12px; } dl.reflist dt { border-radius: 0; background: var(--code-background); border-bottom: 1px solid var(--separator-color); color: var(--page-foreground-color) } dl.reflist dd { background: none; } /* Table */ table.markdownTable, table.fieldtable { width: 100%; border: 1px solid var(--separator-color); margin: var(--spacing-medium) 0; } table.fieldtable { box-shadow: none; border-radius: var(--border-radius-small); } th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { background: var(--tablehead-background); color: var(--tablehead-foreground); font-weight: 600; } table.markdownTable td, table.markdownTable th, table.fieldtable dt { border: 1px solid var(--separator-color); padding: var(--spacing-small) var(--spacing-medium); } table.fieldtable th { font-size: var(--page-font-size); font-weight: 600; background-image: none; background-color: var(--tablehead-background); color: var(--tablehead-foreground); border-bottom: 1px solid var(--separator-color); } .fieldtable td.fieldtype, .fieldtable td.fieldname { border-bottom: 1px solid var(--separator-color); border-right: 1px solid var(--separator-color); } .fieldtable td.fielddoc { border-bottom: 1px solid var(--separator-color); } .memberdecls td.glow, .fieldtable tr.glow { background-color: var(--primary-light-color); box-shadow: 0 0 15px var(--primary-lighter-color); } table.memberdecls { display: block; overflow-x: auto; overflow-y: hidden; } /* Horizontal Rule */ hr { margin-top: var(--spacing-large); margin-bottom: var(--spacing-large); border-top:1px solid var(--separator-color); } .contents hr { box-shadow: var(--content-maxwidth) 0 0 0 var(--separator-color), calc(0px - var(--content-maxwidth)) 0 0 0 var(--separator-color); } .contents img { max-width: 100%; } /* Directories */ div.directory { border-top: 1px solid var(--separator-color); border-bottom: 1px solid var(--separator-color); width: auto; } table.directory { font-family: var(--font-family); font-size: var(--page-font-size); font-weight: normal; } .directory td.entry { padding: var(--spacing-small); display: flex; align-items: center; } .directory tr.even { background-color: var(--odd-color); } .icona { width: auto; height: auto; margin: 0 var(--spacing-small); } .icon { background: var(--primary-dark-color); width: 18px; height: 18px; line-height: 18px; } .iconfopen, .icondoc, .iconfclosed { background-position: center; margin-bottom: 0; } .icondoc { filter: saturate(0.2); } @media screen and (max-width: 767px) { div.directory { margin-left: calc(0px - var(--spacing-medium)); margin-right: calc(0px - var(--spacing-medium)); } } @media (prefers-color-scheme: dark) { .iconfopen, .iconfclosed { filter: hue-rotate(180deg) invert(); } } /* Class list */ .classindex dl.odd { background: var(--odd-color); border-radius: var(--border-radius-small); } @media screen and (max-width: 767px) { .classindex { margin: 0 calc(0px - var(--spacing-small)); } } /* Footer and nav-path */ #nav-path { margin-bottom: -1px; width: 100%; } #nav-path ul { background-image: none; background: var(--page-background-color); border: none; border-top: 1px solid var(--separator-color); border-bottom: 1px solid var(--separator-color); font-size: var(--navigation-font-size); } img.footer { width: 60px; } .navpath li.footer { color: var(--page-secondary-foreground-color); } address.footer { margin-bottom: var(--spacing-large); } #nav-path li.navelem { background-image: none; display: flex; align-items: center; } .navpath li.navelem a { text-shadow: none; display: inline-block; color: var(--primary-dark-color) } li.navelem { padding: 0; margin-left: -8px; } li.navelem:first-child { margin-left: var(--spacing-large); } li.navelem:first-child:before { display: none; } #nav-path li.navelem:after { content: ''; border: 5px solid var(--page-background-color); border-bottom-color: transparent; border-right-color: transparent; border-top-color: transparent; transform: scaleY(4.2); z-index: 10; margin-left: 6px; } #nav-path li.navelem:before { content: ''; border: 5px solid var(--separator-color); border-bottom-color: transparent; border-right-color: transparent; border-top-color: transparent; transform: scaleY(3.2); margin-right: var(--spacing-small); } @media (prefers-color-scheme: dark) { #nav-path li.navelem:after { text-shadow: 3px 0 0 var(--separator-color), 8px 0 6px rgba(0,0,0,0.4); } } .navpath li.navelem a:hover { color: var(--primary-color); } libwacom-libwacom-2.2.0/doc/doxygen.conf.in000066400000000000000000000010121421725554000206000ustar00rootroot00000000000000PROJECT_NAME = libwacom PROJECT_BRIEF = "Wacom model identification library" JAVADOC_AUTOBRIEF = YES TAB_SIZE = 8 OPTIMIZE_OUTPUT_FOR_C = YES EXTRACT_ALL = YES QUIET = YES HTML_TIMESTAMP = YES MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ GENERATE_LATEX = NO INPUT = @TOPSRCDIR@/libwacom/libwacom.h HTML_EXTRA_STYLESHEET = @TOPSRCDIR@/doc/doxygen-awesome.css GENERATE_TREEVIEW = YES libwacom-libwacom-2.2.0/include/000077500000000000000000000000001421725554000165335ustar00rootroot00000000000000libwacom-libwacom-2.2.0/include/linux/000077500000000000000000000000001421725554000176725ustar00rootroot00000000000000libwacom-libwacom-2.2.0/include/linux/input-event-codes.h000066400000000000000000000570301421725554000234210ustar00rootroot00000000000000/* * Input event codes * * *** IMPORTANT *** * This file is not only included from C-code but also from devicetree source * files. As such this file MUST only contain comments and defines. * * Copyright (c) 1999-2002 Vojtech Pavlik * Copyright (c) 2015 Hans de Goede * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. */ #ifndef _UAPI_INPUT_EVENT_CODES_H #define _UAPI_INPUT_EVENT_CODES_H /* * Device properties and quirks */ #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ #define INPUT_PROP_MAX 0x1f #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) /* * Event types */ #define EV_SYN 0x00 #define EV_KEY 0x01 #define EV_REL 0x02 #define EV_ABS 0x03 #define EV_MSC 0x04 #define EV_SW 0x05 #define EV_LED 0x11 #define EV_SND 0x12 #define EV_REP 0x14 #define EV_FF 0x15 #define EV_PWR 0x16 #define EV_FF_STATUS 0x17 #define EV_MAX 0x1f #define EV_CNT (EV_MAX+1) /* * Synchronization events. */ #define SYN_REPORT 0 #define SYN_CONFIG 1 #define SYN_MT_REPORT 2 #define SYN_DROPPED 3 #define SYN_MAX 0xf #define SYN_CNT (SYN_MAX+1) /* * Keys and buttons * * Most of the keys/buttons are modeled after USB HUT 1.12 * (see http://www.usb.org/developers/hidpage). * Abbreviations in the comments: * AC - Application Control * AL - Application Launch Button * SC - System Control */ #define KEY_RESERVED 0 #define KEY_ESC 1 #define KEY_1 2 #define KEY_2 3 #define KEY_3 4 #define KEY_4 5 #define KEY_5 6 #define KEY_6 7 #define KEY_7 8 #define KEY_8 9 #define KEY_9 10 #define KEY_0 11 #define KEY_MINUS 12 #define KEY_EQUAL 13 #define KEY_BACKSPACE 14 #define KEY_TAB 15 #define KEY_Q 16 #define KEY_W 17 #define KEY_E 18 #define KEY_R 19 #define KEY_T 20 #define KEY_Y 21 #define KEY_U 22 #define KEY_I 23 #define KEY_O 24 #define KEY_P 25 #define KEY_LEFTBRACE 26 #define KEY_RIGHTBRACE 27 #define KEY_ENTER 28 #define KEY_LEFTCTRL 29 #define KEY_A 30 #define KEY_S 31 #define KEY_D 32 #define KEY_F 33 #define KEY_G 34 #define KEY_H 35 #define KEY_J 36 #define KEY_K 37 #define KEY_L 38 #define KEY_SEMICOLON 39 #define KEY_APOSTROPHE 40 #define KEY_GRAVE 41 #define KEY_LEFTSHIFT 42 #define KEY_BACKSLASH 43 #define KEY_Z 44 #define KEY_X 45 #define KEY_C 46 #define KEY_V 47 #define KEY_B 48 #define KEY_N 49 #define KEY_M 50 #define KEY_COMMA 51 #define KEY_DOT 52 #define KEY_SLASH 53 #define KEY_RIGHTSHIFT 54 #define KEY_KPASTERISK 55 #define KEY_LEFTALT 56 #define KEY_SPACE 57 #define KEY_CAPSLOCK 58 #define KEY_F1 59 #define KEY_F2 60 #define KEY_F3 61 #define KEY_F4 62 #define KEY_F5 63 #define KEY_F6 64 #define KEY_F7 65 #define KEY_F8 66 #define KEY_F9 67 #define KEY_F10 68 #define KEY_NUMLOCK 69 #define KEY_SCROLLLOCK 70 #define KEY_KP7 71 #define KEY_KP8 72 #define KEY_KP9 73 #define KEY_KPMINUS 74 #define KEY_KP4 75 #define KEY_KP5 76 #define KEY_KP6 77 #define KEY_KPPLUS 78 #define KEY_KP1 79 #define KEY_KP2 80 #define KEY_KP3 81 #define KEY_KP0 82 #define KEY_KPDOT 83 #define KEY_ZENKAKUHANKAKU 85 #define KEY_102ND 86 #define KEY_F11 87 #define KEY_F12 88 #define KEY_RO 89 #define KEY_KATAKANA 90 #define KEY_HIRAGANA 91 #define KEY_HENKAN 92 #define KEY_KATAKANAHIRAGANA 93 #define KEY_MUHENKAN 94 #define KEY_KPJPCOMMA 95 #define KEY_KPENTER 96 #define KEY_RIGHTCTRL 97 #define KEY_KPSLASH 98 #define KEY_SYSRQ 99 #define KEY_RIGHTALT 100 #define KEY_LINEFEED 101 #define KEY_HOME 102 #define KEY_UP 103 #define KEY_PAGEUP 104 #define KEY_LEFT 105 #define KEY_RIGHT 106 #define KEY_END 107 #define KEY_DOWN 108 #define KEY_PAGEDOWN 109 #define KEY_INSERT 110 #define KEY_DELETE 111 #define KEY_MACRO 112 #define KEY_MUTE 113 #define KEY_VOLUMEDOWN 114 #define KEY_VOLUMEUP 115 #define KEY_POWER 116 /* SC System Power Down */ #define KEY_KPEQUAL 117 #define KEY_KPPLUSMINUS 118 #define KEY_PAUSE 119 #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ #define KEY_KPCOMMA 121 #define KEY_HANGEUL 122 #define KEY_HANGUEL KEY_HANGEUL #define KEY_HANJA 123 #define KEY_YEN 124 #define KEY_LEFTMETA 125 #define KEY_RIGHTMETA 126 #define KEY_COMPOSE 127 #define KEY_STOP 128 /* AC Stop */ #define KEY_AGAIN 129 #define KEY_PROPS 130 /* AC Properties */ #define KEY_UNDO 131 /* AC Undo */ #define KEY_FRONT 132 #define KEY_COPY 133 /* AC Copy */ #define KEY_OPEN 134 /* AC Open */ #define KEY_PASTE 135 /* AC Paste */ #define KEY_FIND 136 /* AC Search */ #define KEY_CUT 137 /* AC Cut */ #define KEY_HELP 138 /* AL Integrated Help Center */ #define KEY_MENU 139 /* Menu (show menu) */ #define KEY_CALC 140 /* AL Calculator */ #define KEY_SETUP 141 #define KEY_SLEEP 142 /* SC System Sleep */ #define KEY_WAKEUP 143 /* System Wake Up */ #define KEY_FILE 144 /* AL Local Machine Browser */ #define KEY_SENDFILE 145 #define KEY_DELETEFILE 146 #define KEY_XFER 147 #define KEY_PROG1 148 #define KEY_PROG2 149 #define KEY_WWW 150 /* AL Internet Browser */ #define KEY_MSDOS 151 #define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ #define KEY_SCREENLOCK KEY_COFFEE #define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ #define KEY_DIRECTION KEY_ROTATE_DISPLAY #define KEY_CYCLEWINDOWS 154 #define KEY_MAIL 155 #define KEY_BOOKMARKS 156 /* AC Bookmarks */ #define KEY_COMPUTER 157 #define KEY_BACK 158 /* AC Back */ #define KEY_FORWARD 159 /* AC Forward */ #define KEY_CLOSECD 160 #define KEY_EJECTCD 161 #define KEY_EJECTCLOSECD 162 #define KEY_NEXTSONG 163 #define KEY_PLAYPAUSE 164 #define KEY_PREVIOUSSONG 165 #define KEY_STOPCD 166 #define KEY_RECORD 167 #define KEY_REWIND 168 #define KEY_PHONE 169 /* Media Select Telephone */ #define KEY_ISO 170 #define KEY_CONFIG 171 /* AL Consumer Control Configuration */ #define KEY_HOMEPAGE 172 /* AC Home */ #define KEY_REFRESH 173 /* AC Refresh */ #define KEY_EXIT 174 /* AC Exit */ #define KEY_MOVE 175 #define KEY_EDIT 176 #define KEY_SCROLLUP 177 #define KEY_SCROLLDOWN 178 #define KEY_KPLEFTPAREN 179 #define KEY_KPRIGHTPAREN 180 #define KEY_NEW 181 /* AC New */ #define KEY_REDO 182 /* AC Redo/Repeat */ #define KEY_F13 183 #define KEY_F14 184 #define KEY_F15 185 #define KEY_F16 186 #define KEY_F17 187 #define KEY_F18 188 #define KEY_F19 189 #define KEY_F20 190 #define KEY_F21 191 #define KEY_F22 192 #define KEY_F23 193 #define KEY_F24 194 #define KEY_PLAYCD 200 #define KEY_PAUSECD 201 #define KEY_PROG3 202 #define KEY_PROG4 203 #define KEY_DASHBOARD 204 /* AL Dashboard */ #define KEY_SUSPEND 205 #define KEY_CLOSE 206 /* AC Close */ #define KEY_PLAY 207 #define KEY_FASTFORWARD 208 #define KEY_BASSBOOST 209 #define KEY_PRINT 210 /* AC Print */ #define KEY_HP 211 #define KEY_CAMERA 212 #define KEY_SOUND 213 #define KEY_QUESTION 214 #define KEY_EMAIL 215 #define KEY_CHAT 216 #define KEY_SEARCH 217 #define KEY_CONNECT 218 #define KEY_FINANCE 219 /* AL Checkbook/Finance */ #define KEY_SPORT 220 #define KEY_SHOP 221 #define KEY_ALTERASE 222 #define KEY_CANCEL 223 /* AC Cancel */ #define KEY_BRIGHTNESSDOWN 224 #define KEY_BRIGHTNESSUP 225 #define KEY_MEDIA 226 #define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video outputs (Monitor/LCD/TV-out/etc) */ #define KEY_KBDILLUMTOGGLE 228 #define KEY_KBDILLUMDOWN 229 #define KEY_KBDILLUMUP 230 #define KEY_SEND 231 /* AC Send */ #define KEY_REPLY 232 /* AC Reply */ #define KEY_FORWARDMAIL 233 /* AC Forward Msg */ #define KEY_SAVE 234 /* AC Save */ #define KEY_DOCUMENTS 235 #define KEY_BATTERY 236 #define KEY_BLUETOOTH 237 #define KEY_WLAN 238 #define KEY_UWB 239 #define KEY_UNKNOWN 240 #define KEY_VIDEO_NEXT 241 /* drive next video source */ #define KEY_VIDEO_PREV 242 /* drive previous video source */ #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ #define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual brightness control is off, rely on ambient */ #define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO #define KEY_DISPLAY_OFF 245 /* display device to off state */ #define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ #define KEY_WIMAX KEY_WWAN #define KEY_RFKILL 247 /* Key that controls all radios */ #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ /* Code 255 is reserved for special needs of AT keyboard driver */ #define BTN_MISC 0x100 #define BTN_0 0x100 #define BTN_1 0x101 #define BTN_2 0x102 #define BTN_3 0x103 #define BTN_4 0x104 #define BTN_5 0x105 #define BTN_6 0x106 #define BTN_7 0x107 #define BTN_8 0x108 #define BTN_9 0x109 #define BTN_MOUSE 0x110 #define BTN_LEFT 0x110 #define BTN_RIGHT 0x111 #define BTN_MIDDLE 0x112 #define BTN_SIDE 0x113 #define BTN_EXTRA 0x114 #define BTN_FORWARD 0x115 #define BTN_BACK 0x116 #define BTN_TASK 0x117 #define BTN_JOYSTICK 0x120 #define BTN_TRIGGER 0x120 #define BTN_THUMB 0x121 #define BTN_THUMB2 0x122 #define BTN_TOP 0x123 #define BTN_TOP2 0x124 #define BTN_PINKIE 0x125 #define BTN_BASE 0x126 #define BTN_BASE2 0x127 #define BTN_BASE3 0x128 #define BTN_BASE4 0x129 #define BTN_BASE5 0x12a #define BTN_BASE6 0x12b #define BTN_DEAD 0x12f #define BTN_GAMEPAD 0x130 #define BTN_SOUTH 0x130 #define BTN_A BTN_SOUTH #define BTN_EAST 0x131 #define BTN_B BTN_EAST #define BTN_C 0x132 #define BTN_NORTH 0x133 #define BTN_X BTN_NORTH #define BTN_WEST 0x134 #define BTN_Y BTN_WEST #define BTN_Z 0x135 #define BTN_TL 0x136 #define BTN_TR 0x137 #define BTN_TL2 0x138 #define BTN_TR2 0x139 #define BTN_SELECT 0x13a #define BTN_START 0x13b #define BTN_MODE 0x13c #define BTN_THUMBL 0x13d #define BTN_THUMBR 0x13e #define BTN_DIGI 0x140 #define BTN_TOOL_PEN 0x140 #define BTN_TOOL_RUBBER 0x141 #define BTN_TOOL_BRUSH 0x142 #define BTN_TOOL_PENCIL 0x143 #define BTN_TOOL_AIRBRUSH 0x144 #define BTN_TOOL_FINGER 0x145 #define BTN_TOOL_MOUSE 0x146 #define BTN_TOOL_LENS 0x147 #define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ #define BTN_TOUCH 0x14a #define BTN_STYLUS 0x14b #define BTN_STYLUS2 0x14c #define BTN_TOOL_DOUBLETAP 0x14d #define BTN_TOOL_TRIPLETAP 0x14e #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ #define BTN_WHEEL 0x150 #define BTN_GEAR_DOWN 0x150 #define BTN_GEAR_UP 0x151 #define KEY_OK 0x160 #define KEY_SELECT 0x161 #define KEY_GOTO 0x162 #define KEY_CLEAR 0x163 #define KEY_POWER2 0x164 #define KEY_OPTION 0x165 #define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ #define KEY_TIME 0x167 #define KEY_VENDOR 0x168 #define KEY_ARCHIVE 0x169 #define KEY_PROGRAM 0x16a /* Media Select Program Guide */ #define KEY_CHANNEL 0x16b #define KEY_FAVORITES 0x16c #define KEY_EPG 0x16d #define KEY_PVR 0x16e /* Media Select Home */ #define KEY_MHP 0x16f #define KEY_LANGUAGE 0x170 #define KEY_TITLE 0x171 #define KEY_SUBTITLE 0x172 #define KEY_ANGLE 0x173 #define KEY_ZOOM 0x174 #define KEY_MODE 0x175 #define KEY_KEYBOARD 0x176 #define KEY_SCREEN 0x177 #define KEY_PC 0x178 /* Media Select Computer */ #define KEY_TV 0x179 /* Media Select TV */ #define KEY_TV2 0x17a /* Media Select Cable */ #define KEY_VCR 0x17b /* Media Select VCR */ #define KEY_VCR2 0x17c /* VCR Plus */ #define KEY_SAT 0x17d /* Media Select Satellite */ #define KEY_SAT2 0x17e #define KEY_CD 0x17f /* Media Select CD */ #define KEY_TAPE 0x180 /* Media Select Tape */ #define KEY_RADIO 0x181 #define KEY_TUNER 0x182 /* Media Select Tuner */ #define KEY_PLAYER 0x183 #define KEY_TEXT 0x184 #define KEY_DVD 0x185 /* Media Select DVD */ #define KEY_AUX 0x186 #define KEY_MP3 0x187 #define KEY_AUDIO 0x188 /* AL Audio Browser */ #define KEY_VIDEO 0x189 /* AL Movie Browser */ #define KEY_DIRECTORY 0x18a #define KEY_LIST 0x18b #define KEY_MEMO 0x18c /* Media Select Messages */ #define KEY_CALENDAR 0x18d #define KEY_RED 0x18e #define KEY_GREEN 0x18f #define KEY_YELLOW 0x190 #define KEY_BLUE 0x191 #define KEY_CHANNELUP 0x192 /* Channel Increment */ #define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ #define KEY_FIRST 0x194 #define KEY_LAST 0x195 /* Recall Last */ #define KEY_AB 0x196 #define KEY_NEXT 0x197 #define KEY_RESTART 0x198 #define KEY_SLOW 0x199 #define KEY_SHUFFLE 0x19a #define KEY_BREAK 0x19b #define KEY_PREVIOUS 0x19c #define KEY_DIGITS 0x19d #define KEY_TEEN 0x19e #define KEY_TWEN 0x19f #define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ #define KEY_GAMES 0x1a1 /* Media Select Games */ #define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ #define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ #define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ #define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ #define KEY_EDITOR 0x1a6 /* AL Text Editor */ #define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ #define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ #define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ #define KEY_DATABASE 0x1aa /* AL Database App */ #define KEY_NEWS 0x1ab /* AL Newsreader */ #define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ #define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ #define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ #define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ #define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ #define KEY_LOGOFF 0x1b1 /* AL Logoff */ #define KEY_DOLLAR 0x1b2 #define KEY_EURO 0x1b3 #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ #define KEY_FRAMEFORWARD 0x1b5 #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ #define KEY_IMAGES 0x1ba /* AL Image Browser */ #define KEY_DEL_EOL 0x1c0 #define KEY_DEL_EOS 0x1c1 #define KEY_INS_LINE 0x1c2 #define KEY_DEL_LINE 0x1c3 #define KEY_FN 0x1d0 #define KEY_FN_ESC 0x1d1 #define KEY_FN_F1 0x1d2 #define KEY_FN_F2 0x1d3 #define KEY_FN_F3 0x1d4 #define KEY_FN_F4 0x1d5 #define KEY_FN_F5 0x1d6 #define KEY_FN_F6 0x1d7 #define KEY_FN_F7 0x1d8 #define KEY_FN_F8 0x1d9 #define KEY_FN_F9 0x1da #define KEY_FN_F10 0x1db #define KEY_FN_F11 0x1dc #define KEY_FN_F12 0x1dd #define KEY_FN_1 0x1de #define KEY_FN_2 0x1df #define KEY_FN_D 0x1e0 #define KEY_FN_E 0x1e1 #define KEY_FN_F 0x1e2 #define KEY_FN_S 0x1e3 #define KEY_FN_B 0x1e4 #define KEY_BRL_DOT1 0x1f1 #define KEY_BRL_DOT2 0x1f2 #define KEY_BRL_DOT3 0x1f3 #define KEY_BRL_DOT4 0x1f4 #define KEY_BRL_DOT5 0x1f5 #define KEY_BRL_DOT6 0x1f6 #define KEY_BRL_DOT7 0x1f7 #define KEY_BRL_DOT8 0x1f8 #define KEY_BRL_DOT9 0x1f9 #define KEY_BRL_DOT10 0x1fa #define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ #define KEY_NUMERIC_1 0x201 /* and other keypads */ #define KEY_NUMERIC_2 0x202 #define KEY_NUMERIC_3 0x203 #define KEY_NUMERIC_4 0x204 #define KEY_NUMERIC_5 0x205 #define KEY_NUMERIC_6 0x206 #define KEY_NUMERIC_7 0x207 #define KEY_NUMERIC_8 0x208 #define KEY_NUMERIC_9 0x209 #define KEY_NUMERIC_STAR 0x20a #define KEY_NUMERIC_POUND 0x20b #define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ #define KEY_NUMERIC_B 0x20d #define KEY_NUMERIC_C 0x20e #define KEY_NUMERIC_D 0x20f #define KEY_CAMERA_FOCUS 0x210 #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ #define KEY_TOUCHPAD_ON 0x213 #define KEY_TOUCHPAD_OFF 0x214 #define KEY_CAMERA_ZOOMIN 0x215 #define KEY_CAMERA_ZOOMOUT 0x216 #define KEY_CAMERA_UP 0x217 #define KEY_CAMERA_DOWN 0x218 #define KEY_CAMERA_LEFT 0x219 #define KEY_CAMERA_RIGHT 0x21a #define KEY_ATTENDANT_ON 0x21b #define KEY_ATTENDANT_OFF 0x21c #define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ #define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ #define BTN_DPAD_UP 0x220 #define BTN_DPAD_DOWN 0x221 #define BTN_DPAD_LEFT 0x222 #define BTN_DPAD_RIGHT 0x223 #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ #define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ #define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ #define KEY_APPSELECT 0x244 /* AL Select Task/Application */ #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ #define KEY_KBDINPUTASSIST_PREV 0x260 #define KEY_KBDINPUTASSIST_NEXT 0x261 #define KEY_KBDINPUTASSIST_PREVGROUP 0x262 #define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 #define KEY_KBDINPUTASSIST_ACCEPT 0x264 #define KEY_KBDINPUTASSIST_CANCEL 0x265 /* Diagonal movement keys */ #define KEY_RIGHT_UP 0x266 #define KEY_RIGHT_DOWN 0x267 #define KEY_LEFT_UP 0x268 #define KEY_LEFT_DOWN 0x269 #define KEY_ROOT_MENU 0x26a /* Show Device's Root Menu */ /* Show Top Menu of the Media (e.g. DVD) */ #define KEY_MEDIA_TOP_MENU 0x26b #define KEY_NUMERIC_11 0x26c #define KEY_NUMERIC_12 0x26d /* * Toggle Audio Description: refers to an audio service that helps blind and * visually impaired consumers understand the action in a program. Note: in * some countries this is referred to as "Video Description". */ #define KEY_AUDIO_DESC 0x26e #define KEY_3D_MODE 0x26f #define KEY_NEXT_FAVORITE 0x270 #define KEY_STOP_RECORD 0x271 #define KEY_PAUSE_RECORD 0x272 #define KEY_VOD 0x273 /* Video on Demand */ #define KEY_UNMUTE 0x274 #define KEY_FASTREVERSE 0x275 #define KEY_SLOWREVERSE 0x276 /* * Control a data application associated with the currently viewed channel, * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) */ #define KEY_DATA 0x277 #define KEY_ONSCREEN_KEYBOARD 0x278 #define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0 #define BTN_TRIGGER_HAPPY2 0x2c1 #define BTN_TRIGGER_HAPPY3 0x2c2 #define BTN_TRIGGER_HAPPY4 0x2c3 #define BTN_TRIGGER_HAPPY5 0x2c4 #define BTN_TRIGGER_HAPPY6 0x2c5 #define BTN_TRIGGER_HAPPY7 0x2c6 #define BTN_TRIGGER_HAPPY8 0x2c7 #define BTN_TRIGGER_HAPPY9 0x2c8 #define BTN_TRIGGER_HAPPY10 0x2c9 #define BTN_TRIGGER_HAPPY11 0x2ca #define BTN_TRIGGER_HAPPY12 0x2cb #define BTN_TRIGGER_HAPPY13 0x2cc #define BTN_TRIGGER_HAPPY14 0x2cd #define BTN_TRIGGER_HAPPY15 0x2ce #define BTN_TRIGGER_HAPPY16 0x2cf #define BTN_TRIGGER_HAPPY17 0x2d0 #define BTN_TRIGGER_HAPPY18 0x2d1 #define BTN_TRIGGER_HAPPY19 0x2d2 #define BTN_TRIGGER_HAPPY20 0x2d3 #define BTN_TRIGGER_HAPPY21 0x2d4 #define BTN_TRIGGER_HAPPY22 0x2d5 #define BTN_TRIGGER_HAPPY23 0x2d6 #define BTN_TRIGGER_HAPPY24 0x2d7 #define BTN_TRIGGER_HAPPY25 0x2d8 #define BTN_TRIGGER_HAPPY26 0x2d9 #define BTN_TRIGGER_HAPPY27 0x2da #define BTN_TRIGGER_HAPPY28 0x2db #define BTN_TRIGGER_HAPPY29 0x2dc #define BTN_TRIGGER_HAPPY30 0x2dd #define BTN_TRIGGER_HAPPY31 0x2de #define BTN_TRIGGER_HAPPY32 0x2df #define BTN_TRIGGER_HAPPY33 0x2e0 #define BTN_TRIGGER_HAPPY34 0x2e1 #define BTN_TRIGGER_HAPPY35 0x2e2 #define BTN_TRIGGER_HAPPY36 0x2e3 #define BTN_TRIGGER_HAPPY37 0x2e4 #define BTN_TRIGGER_HAPPY38 0x2e5 #define BTN_TRIGGER_HAPPY39 0x2e6 #define BTN_TRIGGER_HAPPY40 0x2e7 /* We avoid low common keys in module aliases so they don't get huge. */ #define KEY_MIN_INTERESTING KEY_MUTE #define KEY_MAX 0x2ff #define KEY_CNT (KEY_MAX+1) /* * Relative axes */ #define REL_X 0x00 #define REL_Y 0x01 #define REL_Z 0x02 #define REL_RX 0x03 #define REL_RY 0x04 #define REL_RZ 0x05 #define REL_HWHEEL 0x06 #define REL_DIAL 0x07 #define REL_WHEEL 0x08 #define REL_MISC 0x09 #define REL_MAX 0x0f #define REL_CNT (REL_MAX+1) /* * Absolute axes */ #define ABS_X 0x00 #define ABS_Y 0x01 #define ABS_Z 0x02 #define ABS_RX 0x03 #define ABS_RY 0x04 #define ABS_RZ 0x05 #define ABS_THROTTLE 0x06 #define ABS_RUDDER 0x07 #define ABS_WHEEL 0x08 #define ABS_GAS 0x09 #define ABS_BRAKE 0x0a #define ABS_HAT0X 0x10 #define ABS_HAT0Y 0x11 #define ABS_HAT1X 0x12 #define ABS_HAT1Y 0x13 #define ABS_HAT2X 0x14 #define ABS_HAT2Y 0x15 #define ABS_HAT3X 0x16 #define ABS_HAT3Y 0x17 #define ABS_PRESSURE 0x18 #define ABS_DISTANCE 0x19 #define ABS_TILT_X 0x1a #define ABS_TILT_Y 0x1b #define ABS_TOOL_WIDTH 0x1c #define ABS_VOLUME 0x20 #define ABS_MISC 0x28 #define ABS_MT_SLOT 0x2f /* MT slot being modified */ #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ #define ABS_MT_POSITION_X 0x35 /* Center X touch position */ #define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ #define ABS_MAX 0x3f #define ABS_CNT (ABS_MAX+1) /* * Switch events */ #define SW_LID 0x00 /* set = lid shut */ #define SW_TABLET_MODE 0x01 /* set = tablet mode */ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" set = radio enabled */ #define SW_RADIO SW_RFKILL_ALL /* deprecated */ #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ #define SW_DOCK 0x05 /* set = plugged into dock */ #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ #define SW_LINEIN_INSERT 0x0d /* set = inserted */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_MAX 0x0f #define SW_CNT (SW_MAX+1) /* * Misc events */ #define MSC_SERIAL 0x00 #define MSC_PULSELED 0x01 #define MSC_GESTURE 0x02 #define MSC_RAW 0x03 #define MSC_SCAN 0x04 #define MSC_TIMESTAMP 0x05 #define MSC_MAX 0x07 #define MSC_CNT (MSC_MAX+1) /* * LEDs */ #define LED_NUML 0x00 #define LED_CAPSL 0x01 #define LED_SCROLLL 0x02 #define LED_COMPOSE 0x03 #define LED_KANA 0x04 #define LED_SLEEP 0x05 #define LED_SUSPEND 0x06 #define LED_MUTE 0x07 #define LED_MISC 0x08 #define LED_MAIL 0x09 #define LED_CHARGING 0x0a #define LED_MAX 0x0f #define LED_CNT (LED_MAX+1) /* * Autorepeat values */ #define REP_DELAY 0x00 #define REP_PERIOD 0x01 #define REP_MAX 0x01 #define REP_CNT (REP_MAX+1) /* * Sounds */ #define SND_CLICK 0x00 #define SND_BELL 0x01 #define SND_TONE 0x02 #define SND_MAX 0x07 #define SND_CNT (SND_MAX+1) #endif libwacom-libwacom-2.2.0/libwacom/000077500000000000000000000000001421725554000167055ustar00rootroot00000000000000libwacom-libwacom-2.2.0/libwacom/libwacom-database.c000066400000000000000000000711111421725554000224110ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #include "config.h" #define _GNU_SOURCE 1 #include "libwacomint.h" #include "util-strings.h" #include #include #include #include #include #include #include #include #define TABLET_SUFFIX ".tablet" #define STYLUS_SUFFIX ".stylus" #define FEATURES_GROUP "Features" #define DEVICE_GROUP "Device" #define BUTTONS_GROUP "Buttons" static WacomClass libwacom_class_string_to_enum(const char *class) { if (class == NULL || *class == '\0') return WCLASS_UNKNOWN; if (g_str_equal(class, "Intuos3")) return WCLASS_INTUOS3; if (g_str_equal(class, "Intuos4")) return WCLASS_INTUOS4; if (g_str_equal(class, "Intuos5")) return WCLASS_INTUOS5; if (g_str_equal(class, "Cintiq")) return WCLASS_CINTIQ; if (g_str_equal(class, "Bamboo")) return WCLASS_BAMBOO; if (g_str_equal(class, "Graphire")) return WCLASS_GRAPHIRE; if (g_str_equal(class, "Intuos")) return WCLASS_INTUOS; if (g_str_equal(class, "Intuos2")) return WCLASS_INTUOS2; if (g_str_equal(class, "ISDV4")) return WCLASS_ISDV4; if (g_str_equal(class, "PenDisplay")) return WCLASS_PEN_DISPLAYS; if (g_str_equal(class, "Remote")) return WCLASS_REMOTE; return WCLASS_UNKNOWN; } static WacomStylusType type_from_str (const char *type) { if (type == NULL) return WSTYLUS_UNKNOWN; if (g_str_equal(type, "General")) return WSTYLUS_GENERAL; if (g_str_equal(type, "Inking")) return WSTYLUS_INKING; if (g_str_equal(type, "Airbrush")) return WSTYLUS_AIRBRUSH; if (g_str_equal(type, "Classic")) return WSTYLUS_CLASSIC; if (g_str_equal(type, "Marker")) return WSTYLUS_MARKER; if (g_str_equal(type, "Stroke")) return WSTYLUS_STROKE; if (g_str_equal(type, "Puck")) return WSTYLUS_PUCK; if (g_str_equal(type, "3D")) return WSTYLUS_3D; if (g_str_equal(type, "Mobile")) return WSTYLUS_MOBILE; return WSTYLUS_UNKNOWN; } static WacomEraserType eraser_type_from_str (const char *type) { if (type == NULL) return WACOM_ERASER_NONE; if (g_str_equal(type, "None")) return WACOM_ERASER_NONE; if (g_str_equal(type, "Invert")) return WACOM_ERASER_INVERT; if (g_str_equal(type, "Button")) return WACOM_ERASER_BUTTON; return WACOM_ERASER_UNKNOWN; } WacomBusType bus_from_str (const char *str) { if (g_str_equal(str, "usb")) return WBUSTYPE_USB; if (g_str_equal(str, "serial")) return WBUSTYPE_SERIAL; if (g_str_equal(str, "bluetooth")) return WBUSTYPE_BLUETOOTH; if (g_str_equal(str, "i2c")) return WBUSTYPE_I2C; return WBUSTYPE_UNKNOWN; } const char * bus_to_str (WacomBusType bus) { switch (bus) { case WBUSTYPE_UNKNOWN: g_assert_not_reached(); break; case WBUSTYPE_USB: return "usb"; case WBUSTYPE_SERIAL: return "serial"; case WBUSTYPE_BLUETOOTH: return "bluetooth"; case WBUSTYPE_I2C: return "i2c"; } g_assert_not_reached (); } char * make_match_string (const char *name, WacomBusType bus, int vendor_id, int product_id) { return g_strdup_printf("%s:%04x:%04x%s%s", bus_to_str (bus), vendor_id, product_id, name ? ":" : "", name ? name : ""); } static gboolean match_from_string(const char *str, WacomBusType *bus, int *vendor_id, int *product_id, char **name) { int rc = 1, len = 0; char busstr[64]; rc = sscanf(str, "%63[^:]:%x:%x:%n", busstr, vendor_id, product_id, &len); if (len > 0) { /* Grumble grumble scanf handling of %n */ *name = g_strdup(str+len); } else if (rc == 3) { *name = NULL; } else { return FALSE; } *bus = bus_from_str (busstr); return TRUE; } static WacomMatch * libwacom_match_from_string(const char *matchstr) { char *name = NULL; int vendor_id, product_id; WacomBusType bus; WacomMatch *match; if (matchstr == NULL) return NULL; if (g_str_equal(matchstr, GENERIC_DEVICE_MATCH)) { name = NULL; bus = WBUSTYPE_UNKNOWN; vendor_id = 0; product_id = 0; } else if (!match_from_string(matchstr, &bus, &vendor_id, &product_id, &name)) { DBG("failed to match '%s' for product/vendor IDs. Skipping.\n", matchstr); return NULL; } match = libwacom_match_new(name, bus, vendor_id, product_id); free(name); return match; } static gboolean libwacom_matchstr_to_paired(WacomDevice *device, const char *matchstr) { char *name = NULL; int vendor_id, product_id; WacomBusType bus; g_return_val_if_fail(device->paired == NULL, FALSE); if (!match_from_string(matchstr, &bus, &vendor_id, &product_id, &name)) { DBG("failed to match '%s' for product/vendor IDs. Ignoring.\n", matchstr); return FALSE; } device->paired = libwacom_match_new(name, bus, vendor_id, product_id); free(name); return TRUE; } static void libwacom_parse_stylus_keyfile(WacomDeviceDatabase *db, const char *path) { GKeyFile *keyfile; GError *error = NULL; char **groups; gboolean rc; guint i; keyfile = g_key_file_new(); rc = g_key_file_load_from_file(keyfile, path, G_KEY_FILE_NONE, &error); g_assert (rc); groups = g_key_file_get_groups (keyfile, NULL); for (i = 0; groups[i]; i++) { WacomStylus *stylus; GError *error = NULL; char *type; int id; char **string_list; if (!safe_atoi_base (groups[i], &id, 16)) { g_warning ("Failed to parse stylus ID '%s'", groups[i]); continue; } stylus = g_new0 (WacomStylus, 1); stylus->refcnt = 1; stylus->id = id; stylus->name = g_key_file_get_string(keyfile, groups[i], "Name", NULL); stylus->group = g_key_file_get_string(keyfile, groups[i], "Group", NULL); type = g_key_file_get_string(keyfile, groups[i], "EraserType", NULL); stylus->eraser_type = eraser_type_from_str (type); g_free (type); string_list = g_key_file_get_string_list (keyfile, groups[i], "PairedStylusIds", NULL, NULL); stylus->paired_ids = g_array_new (FALSE, FALSE, sizeof(int)); if (string_list) { guint j; for (j = 0; string_list[j]; j++) { int val; if (safe_atoi_base (string_list[j], &val, 16)) { g_array_append_val (stylus->paired_ids, val); } else { g_warning ("Stylus %s (%s) Ignoring invalid PairedId value\n", stylus->name, groups[i]); } } g_strfreev (string_list); } stylus->has_lens = g_key_file_get_boolean(keyfile, groups[i], "HasLens", &error); if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE) g_warning ("Stylus %s (%s) %s\n", stylus->name, groups[i], error->message); g_clear_error (&error); stylus->has_wheel = g_key_file_get_boolean(keyfile, groups[i], "HasWheel", &error); if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE) g_warning ("Stylus %s (%s) %s\n", stylus->name, groups[i], error->message); g_clear_error (&error); stylus->num_buttons = g_key_file_get_integer(keyfile, groups[i], "Buttons", &error); if (stylus->num_buttons == 0 && error != NULL) { stylus->num_buttons = -1; g_clear_error (&error); } string_list = g_key_file_get_string_list (keyfile, groups[i], "Axes", NULL, NULL); if (string_list) { WacomAxisTypeFlags axes = WACOM_AXIS_TYPE_NONE; guint j; for (j = 0; string_list[j]; j++) { WacomAxisTypeFlags flag = WACOM_AXIS_TYPE_NONE; if (g_str_equal(string_list[j], "Tilt")) { flag = WACOM_AXIS_TYPE_TILT; } else if (g_str_equal(string_list[j], "RotationZ")) { flag = WACOM_AXIS_TYPE_ROTATION_Z; } else if (g_str_equal(string_list[j], "Distance")) { flag = WACOM_AXIS_TYPE_DISTANCE; } else if (g_str_equal(string_list[j], "Pressure")) { flag = WACOM_AXIS_TYPE_PRESSURE; } else if (g_str_equal(string_list[j], "Slider")) { flag = WACOM_AXIS_TYPE_SLIDER; } else { g_warning ("Invalid axis %s for stylus ID %s\n", string_list[j], groups[i]); } if (axes & flag) g_warning ("Duplicate axis %s for stylus ID %s\n", string_list[j], groups[i]); axes |= flag; } stylus->axes = axes; g_strfreev (string_list); } type = g_key_file_get_string(keyfile, groups[i], "Type", NULL); stylus->type = type_from_str (type); g_free (type); if (g_hash_table_lookup (db->stylus_ht, GINT_TO_POINTER (id)) != NULL) g_warning ("Duplicate definition for stylus ID '%#x'", id); g_hash_table_insert (db->stylus_ht, GINT_TO_POINTER (id), stylus); } g_strfreev (groups); if (keyfile) g_key_file_free (keyfile); } static void libwacom_setup_paired_attributes(WacomDeviceDatabase *db) { GHashTableIter iter; gpointer key, value; g_hash_table_iter_init(&iter, db->stylus_ht); while (g_hash_table_iter_next (&iter, &key, &value)) { WacomStylus *stylus = value; const int* ids; int count; int i; ids = libwacom_stylus_get_paired_ids(stylus, &count); for (i = 0; i < count; i++) { const WacomStylus *pair; pair = libwacom_stylus_get_for_id(db, ids[i]); if (pair == NULL) { g_warning("Paired stylus '0x%x' not found, ignoring.", ids[i]); continue; } if (libwacom_stylus_is_eraser(pair)) { stylus->has_eraser = true; } } } } static const struct { const char *key; WacomButtonFlags flag; } options[] = { { "Left", WACOM_BUTTON_POSITION_LEFT }, { "Right", WACOM_BUTTON_POSITION_RIGHT }, { "Top", WACOM_BUTTON_POSITION_TOP }, { "Bottom", WACOM_BUTTON_POSITION_BOTTOM }, { "Ring", WACOM_BUTTON_RING_MODESWITCH }, { "Ring2", WACOM_BUTTON_RING2_MODESWITCH }, { "Touchstrip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH }, { "Touchstrip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH }, { "OLEDs", WACOM_BUTTON_OLED } }; static const struct { const char *key; WacomStatusLEDs value; } supported_leds[] = { { "Ring", WACOM_STATUS_LED_RING }, { "Ring2", WACOM_STATUS_LED_RING2 }, { "Touchstrip", WACOM_STATUS_LED_TOUCHSTRIP }, { "Touchstrip2", WACOM_STATUS_LED_TOUCHSTRIP2 } }; static const struct { const char *key; WacomIntegrationFlags value; } integration_flags[] = { { "Display", WACOM_DEVICE_INTEGRATED_DISPLAY }, { "System", WACOM_DEVICE_INTEGRATED_SYSTEM } }; static void libwacom_parse_buttons_key(WacomDevice *device, GKeyFile *keyfile, const char *key, WacomButtonFlags flag) { guint i; char **vals; vals = g_key_file_get_string_list (keyfile, BUTTONS_GROUP, key, NULL, NULL); if (vals == NULL) return; for (i = 0; vals[i] != NULL; i++) { char val; WacomButton *button; val = *vals[i]; if (strlen (vals[i]) > 1 || val < 'A' || val > 'Z') { g_warning ("Ignoring value '%s' in key '%s'", vals[i], key); continue; } button = g_hash_table_lookup(device->buttons, GINT_TO_POINTER(val)); if (!button) { button = g_new0(WacomButton, 1); g_hash_table_insert(device->buttons, GINT_TO_POINTER(val), button); } button->flags |= flag; } g_strfreev (vals); } static void reset_code(gpointer key, gpointer value, gpointer user_data) { WacomButton *button = value; button->code = 0; } static inline bool set_button_codes_from_string(WacomDevice *device, char **strvals) { bool success = false; assert(strvals); for (guint i = 0; i < g_hash_table_size(device->buttons); i++) { char key = 'A' + i; int code; WacomButton *button = g_hash_table_lookup(device->buttons, GINT_TO_POINTER(key)); if (!button) { g_error("%s: Button %c is not defined, ignoring all codes\n", device->name, key); goto out; } if (!strvals[i]) { g_error ("%s: Missing EvdevCode for button %d, ignoring all codes\n", device->name, i); goto out; } if (!safe_atoi_base (strvals[i], &code, 16) || code < BTN_MISC || code >= BTN_DIGI) { g_warning ("%s: Invalid EvdevCode %s for button %c, ignoring all codes\n", device->name, strvals[i], key); goto out; } button->code = code; } success = true; out: if (!success) g_hash_table_foreach(device->buttons, reset_code, NULL); return success; } static inline void set_button_codes_from_heuristics(WacomDevice *device) { for (char key = 'A'; key <= 'Z'; key++) { int code = 0; WacomButton *button; button = g_hash_table_lookup(device->buttons, GINT_TO_POINTER(key)); if (!button) continue; if (device->cls == WCLASS_BAMBOO || device->cls == WCLASS_GRAPHIRE) { switch (key) { case 'A': code = BTN_LEFT; break; case 'B': code = BTN_RIGHT; break; case 'C': code = BTN_FORWARD; break; case 'D': code = BTN_BACK; break; default: break; } } else { /* Assume traditional ExpressKey ordering */ switch (key) { case 'A': code = BTN_0; break; case 'B': code = BTN_1; break; case 'C': code = BTN_2; break; case 'D': code = BTN_3; break; case 'E': code = BTN_4; break; case 'F': code = BTN_5; break; case 'G': code = BTN_6; break; case 'H': code = BTN_7; break; case 'I': code = BTN_8; break; case 'J': code = BTN_9; break; case 'K': code = BTN_A; break; case 'L': code = BTN_B; break; case 'M': code = BTN_C; break; case 'N': code = BTN_X; break; case 'O': code = BTN_Y; break; case 'P': code = BTN_Z; break; case 'Q': code = BTN_BASE; break; case 'R': code = BTN_BASE2; break; default: break; } } if (code == 0) g_warning ("Unable to determine evdev code for button %c (%s)", key, device->name); button->code = code; } } static void libwacom_parse_button_codes(WacomDevice *device, GKeyFile *keyfile) { char **vals; vals = g_key_file_get_string_list(keyfile, BUTTONS_GROUP, "EvdevCodes", NULL, NULL); if (!vals || !set_button_codes_from_string(device, vals)) set_button_codes_from_heuristics(device); g_strfreev (vals); } static int libwacom_parse_num_modes (WacomDevice *device, GKeyFile *keyfile, const char *key, WacomButtonFlags flag) { GHashTableIter iter; int num; gpointer k, v; num = g_key_file_get_integer (keyfile, BUTTONS_GROUP, key, NULL); if (num > 0) return num; g_hash_table_iter_init(&iter, device->buttons); while (g_hash_table_iter_next(&iter, &k, &v)) { WacomButton *button = v; if (button->flags & flag) num++; } return num; } static void libwacom_parse_buttons(WacomDevice *device, GKeyFile *keyfile) { guint i; for (i = 0; i < G_N_ELEMENTS (options); i++) libwacom_parse_buttons_key(device, keyfile, options[i].key, options[i].flag); libwacom_parse_button_codes(device, keyfile); device->ring_num_modes = libwacom_parse_num_modes(device, keyfile, "RingNumModes", WACOM_BUTTON_RING_MODESWITCH); device->ring2_num_modes = libwacom_parse_num_modes(device, keyfile, "Ring2NumModes", WACOM_BUTTON_RING2_MODESWITCH); device->strips_num_modes = libwacom_parse_num_modes(device, keyfile, "StripsNumModes", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH); } static int styli_id_sort(gconstpointer pa, gconstpointer pb) { const int *a = pa, *b = pb; return *a > *b ? 1 : *a == *b ? 0 : -1; } static void libwacom_parse_styli_list(WacomDeviceDatabase *db, WacomDevice *device, char **ids) { GArray *array; guint i; array = g_array_new (FALSE, FALSE, sizeof(int)); for (i = 0; ids[i]; i++) { const char *id = ids[i]; if (g_str_has_prefix(id, "0x")) { int int_value; if (safe_atoi_base (ids[i], &int_value, 16)) { g_array_append_val (array, int_value); } } else if (g_str_has_prefix(id, "@")) { const char *group = &id[1]; GHashTableIter iter; gpointer key, value; g_hash_table_iter_init(&iter, db->stylus_ht); while (g_hash_table_iter_next (&iter, &key, &value)) { WacomStylus *stylus = value; if (stylus->group && g_str_equal(group, stylus->group)) { g_array_append_val (array, stylus->id); } } } else { g_warning ("Invalid prefix for '%s'!", id); } } /* Using groups means we don't get the styli in ascending order. Sort it so the output is predictable */ g_array_sort(array, styli_id_sort); device->styli = array; } static WacomDevice* libwacom_parse_tablet_keyfile(WacomDeviceDatabase *db, const char *datadir, const char *filename) { WacomDevice *device = NULL; GKeyFile *keyfile; GError *error = NULL; gboolean rc; char *path; char *layout; char *class; char *paired; char **string_list; bool success = FALSE; int num_buttons; keyfile = g_key_file_new(); path = g_build_filename (datadir, filename, NULL); rc = g_key_file_load_from_file(keyfile, path, G_KEY_FILE_NONE, &error); if (!rc) { DBG("%s: %s\n", path, error->message); goto out; } device = g_new0 (WacomDevice, 1); device->refcnt = 1; device->matches = g_array_new(TRUE, TRUE, sizeof(WacomMatch*)); string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "DeviceMatch", NULL, NULL); if (!string_list) { DBG("Missing DeviceMatch= line in '%s'\n", path); goto out; } else { guint i; guint nmatches = 0; for (i = 0; string_list[i]; i++) { WacomMatch *m = libwacom_match_from_string(string_list[i]); if (!m) { DBG("'%s' is an invalid DeviceMatch in '%s'\n", string_list[i], path); continue; } libwacom_add_match(device, m); nmatches++; /* set default to first entry */ if (nmatches == 1) libwacom_set_default_match(device, m); libwacom_match_unref(m); } g_strfreev (string_list); if (nmatches == 0) goto out; } paired = g_key_file_get_string(keyfile, DEVICE_GROUP, "PairedID", NULL); if (paired) { libwacom_matchstr_to_paired(device, paired); g_free(paired); } device->name = g_key_file_get_string(keyfile, DEVICE_GROUP, "Name", NULL); device->model_name = g_key_file_get_string(keyfile, DEVICE_GROUP, "ModelName", NULL); /* ModelName= would give us the empty string, let's make it NULL * instead */ if (device->model_name && strlen(device->model_name) == 0) { free(device->model_name); device->model_name = NULL; } device->width = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Width", NULL); device->height = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Height", NULL); device->integration_flags = WACOM_DEVICE_INTEGRATED_UNSET; string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "IntegratedIn", NULL, NULL); if (string_list) { guint i, n; gboolean found; device->integration_flags = WACOM_DEVICE_INTEGRATED_NONE; for (i = 0; string_list[i]; i++) { found = FALSE; for (n = 0; n < G_N_ELEMENTS (integration_flags); n++) { if (g_str_equal(string_list[i], integration_flags[n].key)) { device->integration_flags |= integration_flags[n].value; found = TRUE; break; } } if (!found) g_warning ("Unrecognized integration flag '%s'", string_list[i]); } g_strfreev (string_list); } layout = g_key_file_get_string(keyfile, DEVICE_GROUP, "Layout", NULL); if (layout) { /* For the layout, we store the full path to the SVG layout */ device->layout = g_build_filename (datadir, "layouts", layout, NULL); g_free (layout); } class = g_key_file_get_string(keyfile, DEVICE_GROUP, "Class", NULL); device->cls = libwacom_class_string_to_enum(class); g_free(class); string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "Styli", NULL, NULL); if (string_list) { libwacom_parse_styli_list(db, device, string_list); g_strfreev (string_list); } else { int fallback_eraser = WACOM_ERASER_FALLBACK_ID; int fallback_stylus = WACOM_STYLUS_FALLBACK_ID; device->styli = g_array_new(FALSE, FALSE, sizeof(int)); g_array_append_val(device->styli, fallback_eraser); g_array_append_val(device->styli, fallback_stylus); } /* Features */ if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Stylus", NULL)) device->features |= FEATURE_STYLUS; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Touch", NULL)) device->features |= FEATURE_TOUCH; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Ring", NULL)) device->features |= FEATURE_RING; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Ring2", NULL)) device->features |= FEATURE_RING2; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Reversible", NULL)) device->features |= FEATURE_REVERSIBLE; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "TouchSwitch", NULL)) device->features |= FEATURE_TOUCHSWITCH; if (device->integration_flags != WACOM_DEVICE_INTEGRATED_UNSET && device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY && device->features & FEATURE_REVERSIBLE) g_warning ("Tablet '%s' is both reversible and integrated in screen. This is impossible", libwacom_get_match(device)); if (!(device->features & FEATURE_RING) && (device->features & FEATURE_RING2)) g_warning ("Tablet '%s' has Ring2 but no Ring. This is impossible", libwacom_get_match(device)); if (!(device->features & FEATURE_TOUCH) && (device->features & FEATURE_TOUCHSWITCH)) g_warning ("Tablet '%s' has touch switch but no touch tool. This is impossible", libwacom_get_match(device)); device->num_strips = g_key_file_get_integer(keyfile, FEATURES_GROUP, "NumStrips", NULL); num_buttons = g_key_file_get_integer(keyfile, FEATURES_GROUP, "Buttons", &error); if (num_buttons == 0 && g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) { g_warning ("Tablet '%s' has no buttons defined, do something!", libwacom_get_match(device)); g_clear_error (&error); } device->buttons = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free); if (num_buttons > 0) libwacom_parse_buttons(device, keyfile); device->status_leds = g_array_new (FALSE, FALSE, sizeof(WacomStatusLEDs)); string_list = g_key_file_get_string_list(keyfile, FEATURES_GROUP, "StatusLEDs", NULL, NULL); if (string_list) { guint i, n; for (i = 0; string_list[i]; i++) { for (n = 0; n < G_N_ELEMENTS (supported_leds); n++) { if (g_str_equal(string_list[i], supported_leds[n].key)) { g_array_append_val (device->status_leds, supported_leds[n].value); break; } } } g_strfreev (string_list); } success = TRUE; out: if (path) g_free(path); if (keyfile) g_key_file_free(keyfile); if (error) g_error_free(error); if (!success) device = libwacom_unref(device); return device; } static bool has_suffix(const char *name, const char *suffix) { size_t len = strlen(name); size_t suffix_len = strlen(suffix); if (!name || name[0] == '.') return 0; if (len <= suffix_len) return false; return g_str_equal(&name[len - suffix_len], suffix); } static int is_tablet_file(const struct dirent *entry) { return has_suffix(entry->d_name, TABLET_SUFFIX); } static int is_stylus_file(const struct dirent *entry) { return has_suffix(entry->d_name, STYLUS_SUFFIX); } static bool load_tablet_files(WacomDeviceDatabase *db, const char *datadir) { DIR *dir; struct dirent *file; bool success = false; GHashTable *keyset = NULL; dir = opendir(datadir); if (!dir) return errno == ENOENT; /* non-existing directory is ok */ /* A set of all matches for duplicate detection. We allow duplicates * across data directories, but we don't allow for duplicates * within the same data directory. */ keyset = g_hash_table_new_full (g_str_hash, g_str_equal, free, NULL); if (!keyset) goto out; while ((file = readdir(dir))) { WacomDevice *d; guint idx = 0; if (!is_tablet_file(file)) continue; d = libwacom_parse_tablet_keyfile(db, datadir, file->d_name); if (!d) continue; if (d->matches->len == 0) { g_critical("Device '%s' has no matches defined\n", libwacom_get_name(d)); goto out; } /* Note: we may change the array while iterating over it */ while (idx < d->matches->len) { WacomMatch *match = g_array_index(d->matches, WacomMatch*, idx); const char *matchstr; matchstr = libwacom_match_get_match_string(match); /* no duplicate matches allowed within the same * directory */ if (g_hash_table_contains(keyset, matchstr)) { g_critical("Duplicate match of '%s' on device '%s'.", matchstr, libwacom_get_name(d)); goto out; } g_hash_table_add(keyset, g_strdup(matchstr)); /* We already have an entry for this match in the database, * that takes precedence. Remove the current match * from the new tablet - that's fine because we * haven't exposed the tablet yet. */ if (g_hash_table_lookup(db->device_ht, matchstr)) { libwacom_remove_match(d, match); continue; } g_hash_table_insert(db->device_ht, g_strdup (matchstr), d); libwacom_ref(d); idx++; } libwacom_unref(d); } success = true; out: if (keyset) g_hash_table_destroy(keyset); closedir(dir); return success; } static void stylus_destroy(void *data) { libwacom_stylus_unref((WacomStylus*)data); } static bool load_stylus_files(WacomDeviceDatabase *db, const char *datadir) { DIR *dir; struct dirent *file; dir = opendir(datadir); if (!dir) return errno == ENOENT; /* non-existing directory is ok */ while ((file = readdir(dir))) { char *path; if (!is_stylus_file(file)) continue; path = g_build_filename (datadir, file->d_name, NULL); libwacom_parse_stylus_keyfile(db, path); g_free(path); } closedir(dir); return true; } static WacomDeviceDatabase * database_new_for_paths (size_t npaths, const char **datadirs) { WacomDeviceDatabase *db; size_t n; const char **datadir; db = g_new0 (WacomDeviceDatabase, 1); db->device_ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) libwacom_destroy); db->stylus_ht = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) stylus_destroy); for (datadir = datadirs, n = npaths; n--; datadir++) { if (!load_stylus_files(db, *datadir)) goto error; } for (datadir = datadirs, n = npaths; n--; datadir++) { if (!load_tablet_files(db, *datadir)) goto error; } /* If we couldn't load _anything_ then something's wrong */ if (g_hash_table_size (db->stylus_ht) == 0 || g_hash_table_size (db->device_ht) == 0) goto error; libwacom_setup_paired_attributes(db); return db; error: libwacom_database_destroy(db); return NULL; } LIBWACOM_EXPORT WacomDeviceDatabase * libwacom_database_new_for_path (const char *datadir) { return database_new_for_paths(1, &datadir); } LIBWACOM_EXPORT WacomDeviceDatabase * libwacom_database_new (void) { const char *datadir[] = { ETCDIR, DATADIR, }; return database_new_for_paths (2, datadir); } LIBWACOM_EXPORT void libwacom_database_destroy(WacomDeviceDatabase *db) { if (db->device_ht) g_hash_table_destroy(db->device_ht); if (db->stylus_ht) g_hash_table_destroy(db->stylus_ht); g_free (db); } static gint device_compare(gconstpointer pa, gconstpointer pb) { const WacomDevice *a = pa, *b = pb; int cmp; cmp = libwacom_get_vendor_id(a) - libwacom_get_vendor_id(b); if (cmp == 0) cmp = libwacom_get_product_id(a) - libwacom_get_product_id(b); if (cmp == 0) cmp = g_strcmp0(libwacom_get_name(a), libwacom_get_name(b)); return cmp; } static void ht_copy_key(gpointer key, gpointer value, gpointer user_data) { g_hash_table_add((GHashTable*)user_data, value); } LIBWACOM_EXPORT WacomDevice** libwacom_list_devices_from_database(const WacomDeviceDatabase *db, WacomError *error) { GList *cur, *devices = NULL; WacomDevice **list, **p; GHashTable *ht = NULL; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } /* Devices may be present more than one in the device_ht, so let's * use a temporary hashtable like a set to filter duplicates */ ht = g_hash_table_new (g_direct_hash, g_direct_equal); if (!ht) goto error; g_hash_table_foreach (db->device_ht, ht_copy_key, ht); devices = g_hash_table_get_keys (ht); list = calloc (g_list_length (devices) + 1, sizeof (WacomDevice *)); if (!list) goto error; devices = g_list_sort (devices, device_compare); for (p = list, cur = devices; cur; cur = g_list_next (cur)) *p++ = (WacomDevice *) cur->data; g_list_free (devices); g_hash_table_destroy (ht); return list; error: libwacom_error_set(error, WERROR_BAD_ALLOC, "Memory allocation failed"); if (ht) g_hash_table_destroy (ht); if (devices) g_list_free (devices); return NULL; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/libwacom/libwacom-error.c000066400000000000000000000042201421725554000217730ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #include "config.h" #define _GNU_SOURCE #include "libwacomint.h" #include #include #include LIBWACOM_EXPORT WacomError* libwacom_error_new(void) { WacomError *error = malloc(sizeof(*error)); error->code = WERROR_NONE; error->msg = NULL; return error; } LIBWACOM_EXPORT void libwacom_error_free(WacomError **error) { free((*error)->msg); free(*error); *error = NULL; } LIBWACOM_EXPORT enum WacomErrorCode libwacom_error_get_code(WacomError *error) { return error->code; } LIBWACOM_EXPORT const char* libwacom_error_get_message(WacomError *error) { return error->msg; } __attribute__ ((format (printf, 3, 4))) void libwacom_error_set(WacomError *error, enum WacomErrorCode code, const char *msg, ...) { if (!error) return; error->code = code; if (msg) { va_list ap; va_start(ap, msg); if (vasprintf(&error->msg, msg, ap) == -1) error->msg = NULL; va_end(ap); } } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/libwacom/libwacom.c000066400000000000000000001113051421725554000206470ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #include "config.h" #include "libwacomint.h" #include #include #include #include #include #include #include #if !HAVE_G_MEMDUP2 #define g_memdup2 g_memdup #endif static const WacomDevice * libwacom_get_device(const WacomDeviceDatabase *db, const char *match) { return (WacomDevice *) g_hash_table_lookup (db->device_ht, match); } static gboolean is_tablet (GUdevDevice *device) { return g_udev_device_get_property_as_boolean (device, "ID_INPUT_TABLET"); } static gboolean is_touchpad (GUdevDevice *device) { return g_udev_device_get_property_as_boolean (device, "ID_INPUT_TOUCHPAD"); } static gboolean is_tablet_or_touchpad (GUdevDevice *device) { return is_touchpad (device) || is_tablet (device); } /* Overriding SUBSYSTEM isn't allowed in udev (works sometimes, but not * always). For evemu devices we need to set custom properties to make them * detected by libwacom. */ static char * get_uinput_subsystem (GUdevDevice *device) { const char *bus_str; GUdevDevice *parent; bus_str = NULL; parent = g_object_ref (device); while (parent && !g_udev_device_get_property_as_boolean (parent, "UINPUT_DEVICE")) { GUdevDevice *old_parent = parent; parent = g_udev_device_get_parent (old_parent); g_object_unref (old_parent); } if (parent) { bus_str = g_udev_device_get_property (parent, "UINPUT_SUBSYSTEM"); g_object_unref (parent); } return bus_str ? g_strdup (bus_str) : NULL; } static gboolean get_bus_vid_pid (GUdevDevice *device, WacomBusType *bus, int *vendor_id, int *product_id, WacomError *error) { GUdevDevice *parent; const char *product_str; gchar **splitted_product = NULL; unsigned int bus_id; gboolean retval = FALSE; /* Parse that: * E: PRODUCT=5/56a/81/100 * into: * vendor 0x56a * product 0x81 */ parent = g_object_ref (device); product_str = g_udev_device_get_property (device, "PRODUCT"); while (!product_str && parent) { GUdevDevice *old_parent = parent; parent = g_udev_device_get_parent (old_parent); if (parent) product_str = g_udev_device_get_property (parent, "PRODUCT"); g_object_unref (old_parent); } if (!product_str) /* PRODUCT not found, hoping the old method will work */ goto out; splitted_product = g_strsplit (product_str, "/", 4); if (g_strv_length (splitted_product) != 4) { libwacom_error_set(error, WERROR_UNKNOWN_MODEL, "Unable to parse model identification"); goto out; } bus_id = (int)strtoul (splitted_product[0], NULL, 16); *vendor_id = (int)strtol (splitted_product[1], NULL, 16); *product_id = (int)strtol (splitted_product[2], NULL, 16); switch (bus_id) { case 3: *bus = WBUSTYPE_USB; retval = TRUE; break; case 5: *bus = WBUSTYPE_BLUETOOTH; retval = TRUE; break; case 24: *bus = WBUSTYPE_I2C; retval = TRUE; break; } out: if (splitted_product) g_strfreev (splitted_product); if (parent) g_object_unref (parent); return retval; } static char * get_bus (GUdevDevice *device) { const char *subsystem; char *bus_str; GUdevDevice *parent; bus_str = get_uinput_subsystem (device); if (bus_str) return bus_str; subsystem = g_udev_device_get_subsystem (device); parent = g_object_ref (device); while (parent && subsystem && (g_str_equal(subsystem, "input") || g_str_equal (subsystem, "hid"))) { GUdevDevice *old_parent = parent; parent = g_udev_device_get_parent (old_parent); if (parent) subsystem = g_udev_device_get_subsystem (parent); g_object_unref (old_parent); } if (parent) { if (subsystem && (g_str_equal(subsystem, "tty") || g_str_equal(subsystem, "serio"))) bus_str = g_strdup ("serial"); else bus_str = g_strdup (subsystem); g_object_unref (parent); } else bus_str = strdup("unknown"); return bus_str; } static GUdevDevice * client_query_by_subsystem_and_device_file (GUdevClient *client, const char *subsystem, const char *path) { GList *l, *devices; GUdevDevice *ret = NULL; devices = g_udev_client_query_by_subsystem (client, subsystem); for (l = devices; l != NULL; l = l->next) { if (!ret && g_strcmp0 (g_udev_device_get_device_file (l->data), path) == 0) ret = g_object_ref (l->data); g_object_unref (l->data); } g_list_free (devices); return ret; } static gboolean get_device_info (const char *path, int *vendor_id, int *product_id, char **name, WacomBusType *bus, WacomIntegrationFlags *integration_flags, WacomError *error) { GUdevClient *client; GUdevDevice *device; const char * const subsystems[] = { "input", NULL }; gboolean retval; char *bus_str; const char *devname; retval = FALSE; /* The integration flags from device info are unset by default */ *integration_flags = WACOM_DEVICE_INTEGRATED_UNSET; *name = NULL; bus_str = NULL; client = g_udev_client_new (subsystems); device = client_query_by_subsystem_and_device_file (client, subsystems[0], path); if (device == NULL) device = g_udev_client_query_by_device_file (client, path); if (device == NULL) { libwacom_error_set(error, WERROR_INVALID_PATH, "Could not find device '%s' in udev", path); goto out; } /* Touchpads are only for the "Finger" part of Bamboo devices */ if (!is_tablet_or_touchpad(device)) { GUdevDevice *parent; parent = g_udev_device_get_parent(device); if (!parent || !is_tablet_or_touchpad(parent)) { libwacom_error_set(error, WERROR_INVALID_PATH, "Device '%s' is not a tablet", path); g_object_unref (parent); goto out; } g_object_unref (parent); } /* Is the device integrated in display? */ devname = g_udev_device_get_name (device); if (devname != NULL) { char *sysfs_path, *contents; sysfs_path = g_build_filename ("/sys/class/input", devname, "device/properties", NULL); if (g_file_get_contents (sysfs_path, &contents, NULL, NULL)) { int flag; flag = atoi(contents); flag &= (1 << INPUT_PROP_DIRECT) | (1 << INPUT_PROP_POINTER); /* * To ensure we are dealing with a screen tablet, need * to check that it has DIRECT and non-POINTER (DIRECT * alone is not sufficient since it's set for drawing * tablets as well) */ if (flag == (1 << INPUT_PROP_DIRECT)) *integration_flags = WACOM_DEVICE_INTEGRATED_DISPLAY; else *integration_flags = WACOM_DEVICE_INTEGRATED_NONE; g_free (contents); } g_free (sysfs_path); } *name = g_strdup (g_udev_device_get_sysfs_attr (device, "name")); /* Try getting the name from the parent if that fails */ if (*name == NULL) { GUdevDevice *parent; parent = g_udev_device_get_parent (device); if (!parent) goto out; *name = g_strdup (g_udev_device_get_sysfs_attr (parent, "name")); g_object_unref (parent); } /* Parse the PRODUCT attribute (for Bluetooth, USB, I2C) */ retval = get_bus_vid_pid (device, bus, vendor_id, product_id, error); if (retval) goto out; bus_str = get_bus (device); *bus = bus_from_str (bus_str); if (*bus == WBUSTYPE_SERIAL) { if (is_touchpad (device)) goto out; /* The serial bus uses 0:0 as the vid/pid */ *vendor_id = 0; *product_id = 0; retval = TRUE; } else { libwacom_error_set(error, WERROR_UNKNOWN_MODEL, "Unsupported bus '%s'", bus_str); } out: if (bus_str != NULL) g_free (bus_str); if (retval == FALSE) g_free (*name); if (device != NULL) g_object_unref (device); if (client != NULL) g_object_unref (client); return retval; } static WacomDevice * libwacom_copy(const WacomDevice *device) { WacomDevice *d; GHashTableIter iter; gpointer k, v; d = g_new0 (WacomDevice, 1); g_atomic_int_inc(&d->refcnt); d->name = g_strdup (device->name); d->model_name = g_strdup (device->model_name); d->width = device->width; d->height = device->height; d->integration_flags = device->integration_flags; d->layout = g_strdup(device->layout); d->matches = g_array_sized_new(TRUE, TRUE, sizeof(WacomDevice*), device->matches->len); for (guint i = 0; i < device->matches->len; i++) { WacomMatch *m = g_array_index(device->matches, WacomMatch*, i); libwacom_match_ref(m); g_array_append_val(d->matches, m); } d->match = libwacom_match_ref(device->match); if (device->paired) d->paired = libwacom_match_ref(device->paired); d->cls = device->cls; d->num_strips = device->num_strips; d->features = device->features; d->strips_num_modes = device->strips_num_modes; d->ring_num_modes = device->ring_num_modes; d->ring2_num_modes = device->ring2_num_modes; d->styli = g_array_sized_new(FALSE, FALSE, sizeof(int), device->styli->len); for (guint i = 0; i < device->styli->len; i++) { int id = g_array_index(device->styli, int, i); g_array_append_val(d->styli, id); } d->status_leds = g_array_sized_new(FALSE, FALSE, sizeof(WacomStatusLEDs), device->status_leds->len); for (guint i = 0; i < device->status_leds->len; i++) { g_array_append_val(d->status_leds, g_array_index(device->status_leds, WacomStatusLEDs, i)); } d->buttons = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free); g_hash_table_iter_init(&iter, device->buttons); while (g_hash_table_iter_next(&iter, &k, &v)) { WacomButton *a = v; WacomButton *b = g_memdup2(a, sizeof(WacomButton)); g_hash_table_insert(d->buttons, k, b); } return d; } static bool match_is_equal(const WacomMatch *a, const WacomMatch *b) { return g_str_equal(a->match, b->match); } static bool matches_are_equal(const WacomDevice *a, const WacomDevice *b) { const WacomMatch **ma, **mb, **match_a, **match_b; ma = libwacom_get_matches(a); mb = libwacom_get_matches(b); for (match_a = ma; *match_a; match_a++) { int found = 0; for (match_b = mb; !found && *match_b; match_b++) { if (match_is_equal(*match_a, *match_b)) found = 1; } if (!found) return false; } return true; } /* Compare layouts based on file name, stripping the full path */ static gboolean libwacom_same_layouts (const WacomDevice *a, const WacomDevice *b) { gchar *file1, *file2; gboolean rc; /* Conveniently handle the null case */ if (a->layout == b->layout) return TRUE; file1 = NULL; file2 = NULL; if (a->layout != NULL) file1 = g_path_get_basename (a->layout); if (b->layout != NULL) file2 = g_path_get_basename (b->layout); rc = (g_strcmp0 (file1, file2) == 0); g_free (file1); g_free (file2); return rc; } LIBWACOM_EXPORT int libwacom_compare(const WacomDevice *a, const WacomDevice *b, WacomCompareFlags flags) { GHashTableIter iter; gpointer k, v; g_return_val_if_fail(a || b, 0); if (!a || !b) return 1; if (a == b) return 0; if (!g_str_equal(a->name, b->name)) return 1; if (a->width != b->width || a->height != b->height) return 1; if (!libwacom_same_layouts (a, b)) return 1; if (a->integration_flags != b->integration_flags) return 1; if (a->cls != b->cls) return 1; if (a->num_strips != b->num_strips) return 1; if (a->features != b->features) return 1; if (a->strips_num_modes != b->strips_num_modes) return 1; if (a->ring_num_modes != b->ring_num_modes) return 1; if (a->ring2_num_modes != b->ring2_num_modes) return 1; if (g_hash_table_size(a->buttons) != g_hash_table_size(b->buttons)) return 1; if (a->styli->len != b->styli->len) return 1; if (memcmp(a->styli->data, b->styli->data, sizeof(int) * a->styli->len) != 0) return 1; if (a->status_leds->len != b->status_leds->len) return 1; if (memcmp(a->status_leds->data, b->status_leds->data, sizeof(WacomStatusLEDs) * a->status_leds->len) != 0) return 1; g_hash_table_iter_init(&iter, a->buttons); while (g_hash_table_iter_next(&iter, &k, &v)) { WacomButton *ba = v; WacomButton *bb = g_hash_table_lookup(b->buttons, k); if (!bb || ba->flags != bb->flags || ba->code != bb->code) return 1; } if ((a->paired == NULL && b->paired != NULL) || (a->paired != NULL && b->paired == NULL) || (a->paired && b->paired && !match_is_equal(a->paired, b->paired))) return 1; if ((flags & WCOMPARE_MATCHES) && !matches_are_equal(a, b)) return 1; else if (!match_is_equal(a->match, b->match)) return 1; return 0; } static const WacomDevice * libwacom_new (const WacomDeviceDatabase *db, const char *name, int vendor_id, int product_id, WacomBusType bus, WacomError *error) { const WacomDevice *device; char *match; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } match = make_match_string(name, bus, vendor_id, product_id); device = libwacom_get_device(db, match); g_free (match); return device; } LIBWACOM_EXPORT WacomDevice* libwacom_new_from_path(const WacomDeviceDatabase *db, const char *path, WacomFallbackFlags fallback, WacomError *error) { int vendor_id, product_id; WacomBusType bus; const WacomDevice *device; WacomDevice *ret = NULL; WacomIntegrationFlags integration_flags; char *name, *match_name; WacomMatch *match; switch (fallback) { case WFALLBACK_NONE: case WFALLBACK_GENERIC: break; default: libwacom_error_set(error, WERROR_BUG_CALLER, "invalid fallback flags"); return NULL; } if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } if (!path) { libwacom_error_set(error, WERROR_INVALID_PATH, "path is NULL"); return NULL; } if (!get_device_info (path, &vendor_id, &product_id, &name, &bus, &integration_flags, error)) return NULL; match_name = name; device = libwacom_new (db, match_name, vendor_id, product_id, bus, error); if (device == NULL) { match_name = NULL; device = libwacom_new (db, match_name, vendor_id, product_id, bus, error); } if (device == NULL) { if (fallback == WFALLBACK_NONE) goto out; /* WFALLBACK_GENERIC */ device = libwacom_get_device(db, "generic"); if (device == NULL) goto out; ret = libwacom_copy(device); if (name != NULL) { g_free (ret->name); ret->name = g_strdup(name); } } else { ret = libwacom_copy(device); } /* for multiple-match devices, set to the one we requested */ match = libwacom_match_new(match_name, bus, vendor_id, product_id); libwacom_set_default_match(ret, match); libwacom_match_unref(match); /* if unset, use the kernel flags. Could be unset as well. */ if (device && ret->integration_flags == WACOM_DEVICE_INTEGRATED_UNSET) ret->integration_flags = integration_flags; out: g_free (name); if (ret == NULL) libwacom_error_set(error, WERROR_UNKNOWN_MODEL, "unknown model"); return ret; } LIBWACOM_EXPORT WacomDevice* libwacom_new_from_usbid(const WacomDeviceDatabase *db, int vendor_id, int product_id, WacomError *error) { const WacomDevice *device; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } device = libwacom_new(db, NULL, vendor_id, product_id, WBUSTYPE_USB, error); if (!device) device = libwacom_new(db, NULL, vendor_id, product_id, WBUSTYPE_I2C, error); if (!device) device = libwacom_new(db, NULL, vendor_id, product_id, WBUSTYPE_BLUETOOTH, error); if (device) return libwacom_copy(device); libwacom_error_set(error, WERROR_UNKNOWN_MODEL, NULL); return NULL; } LIBWACOM_EXPORT WacomDevice* libwacom_new_from_name(const WacomDeviceDatabase *db, const char *name, WacomError *error) { const WacomDevice *device; GList *keys, *l; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } g_return_val_if_fail(name != NULL, NULL); device = NULL; keys = g_hash_table_get_values (db->device_ht); for (l = keys; l; l = l->next) { WacomDevice *d = l->data; if (g_str_equal(d->name, name)) { device = d; break; } } g_list_free (keys); if (device) return libwacom_copy(device); libwacom_error_set(error, WERROR_UNKNOWN_MODEL, NULL); return NULL; } static void print_styli_for_device (int fd, const WacomDevice *device) { int nstyli; const int *styli; int i; unsigned idx = 0; char buf[1024] = {0}; if (!libwacom_has_stylus(device)) return; styli = libwacom_get_supported_styli(device, &nstyli); for (i = 0; i < nstyli; i++) { /* 20 digits for a stylus are enough, right */ assert(idx < sizeof(buf) - 20); idx += snprintf(buf + idx, 20, "%#x;", styli[i]); } dprintf(fd, "Styli=%s\n", buf); } static void print_layout_for_device (int fd, const WacomDevice *device) { const char *layout_filename; gchar *base_name; layout_filename = libwacom_get_layout_filename(device); if (layout_filename) { base_name = g_path_get_basename (layout_filename); dprintf(fd, "Layout=%s\n", base_name); g_free (base_name); } } static void print_supported_leds (int fd, const WacomDevice *device) { char *leds_name[] = { "Ring;", "Ring2;", "Touchstrip;", "Touchstrip2;" }; int num_leds; const WacomStatusLEDs *status_leds; char buf[256] = {0}; bool have_led = false; status_leds = libwacom_get_status_leds(device, &num_leds); snprintf(buf, sizeof(buf), "%s%s%s%s", num_leds > 0 ? leds_name[status_leds[0]] : "", num_leds > 1 ? leds_name[status_leds[1]] : "", num_leds > 2 ? leds_name[status_leds[2]] : "", num_leds > 3 ? leds_name[status_leds[3]] : ""); have_led = num_leds > 0; dprintf(fd, "%sStatusLEDs=%s\n", have_led ? "" : "# ", buf); } static void print_button_flag_if(int fd, const WacomDevice *device, const char *label, int flag) { int nbuttons = libwacom_get_num_buttons(device); char buf[nbuttons * 2 + 1]; int idx = 0; char b; bool have_flag = false; for (b = 'A'; b < 'A' + nbuttons; b++) { if (libwacom_get_button_flag(device, b) & flag) { buf[idx++] = b; buf[idx++] = ';'; have_flag = true; } } buf[idx] = '\0'; dprintf(fd, "%s%s=%s\n", have_flag ? "" : "# ", label, buf); } static void print_button_evdev_codes(int fd, const WacomDevice *device) { int nbuttons = libwacom_get_num_buttons(device); char b; char buf[1024] = {0}; unsigned idx = 0; for (b = 'A'; b < 'A' + nbuttons; b++) { assert(idx < sizeof(buf) - 30); idx += snprintf(buf + idx, 30, "0x%x;", libwacom_get_button_evdev_code(device, b)); } dprintf(fd, "EvdevCodes=%s\n", buf); } static void print_buttons_for_device (int fd, const WacomDevice *device) { int nbuttons = libwacom_get_num_buttons(device); if (nbuttons == 0) return; dprintf(fd, "[Buttons]\n"); print_button_flag_if(fd, device, "Left", WACOM_BUTTON_POSITION_LEFT); print_button_flag_if(fd, device, "Right", WACOM_BUTTON_POSITION_RIGHT); print_button_flag_if(fd, device, "Top", WACOM_BUTTON_POSITION_TOP); print_button_flag_if(fd, device, "Bottom", WACOM_BUTTON_POSITION_BOTTOM); print_button_flag_if(fd, device, "Touchstrip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH); print_button_flag_if(fd, device, "Touchstrip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH); print_button_flag_if(fd, device, "OLEDs", WACOM_BUTTON_OLED); print_button_flag_if(fd, device, "Ring", WACOM_BUTTON_RING_MODESWITCH); print_button_flag_if(fd, device, "Ring2", WACOM_BUTTON_RING2_MODESWITCH); print_button_evdev_codes(fd, device); dprintf(fd, "RingNumModes=%d\n", libwacom_get_ring_num_modes(device)); dprintf(fd, "Ring2NumModes=%d\n", libwacom_get_ring2_num_modes(device)); dprintf(fd, "StripsNumModes=%d\n", libwacom_get_strips_num_modes(device)); dprintf(fd, "\n"); } static void print_integrated_flags_for_device (int fd, const WacomDevice *device) { /* * If flag is WACOM_DEVICE_INTEGRATED_UNSET, the info is not provided * by the tablet database but deduced otherwise (e.g. from sysfs device * properties on Linux) */ if (device->integration_flags == WACOM_DEVICE_INTEGRATED_UNSET) return; dprintf(fd, "IntegratedIn="); if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY) dprintf(fd, "Display;"); if (device->integration_flags & WACOM_DEVICE_INTEGRATED_SYSTEM) dprintf(fd, "System;"); dprintf(fd, "\n"); } static void print_match(int fd, const WacomMatch *match) { const char *name = libwacom_match_get_name(match); WacomBusType type = libwacom_match_get_bustype(match); int vendor = libwacom_match_get_vendor_id(match); int product = libwacom_match_get_product_id(match); const char *bus_name; switch(type) { case WBUSTYPE_BLUETOOTH: bus_name = "bluetooth"; break; case WBUSTYPE_USB: bus_name = "usb"; break; case WBUSTYPE_SERIAL: bus_name = "serial"; break; case WBUSTYPE_I2C: bus_name = "i2c"; break; case WBUSTYPE_UNKNOWN: bus_name = "unknown"; break; default: g_assert_not_reached(); break; } dprintf(fd, "%s:%04x:%04x", bus_name, vendor, product); if (name) dprintf(fd, ":%s", name); dprintf(fd, ";"); } LIBWACOM_EXPORT void libwacom_print_device_description(int fd, const WacomDevice *device) { const WacomMatch **match; WacomClass class; const char *class_name; class = device->cls; switch(class) { case WCLASS_UNKNOWN: class_name = "Unknown"; break; case WCLASS_INTUOS3: class_name = "Intuos3"; break; case WCLASS_INTUOS4: class_name = "Intuos4"; break; case WCLASS_INTUOS5: class_name = "Intuos5"; break; case WCLASS_CINTIQ: class_name = "Cintiq"; break; case WCLASS_BAMBOO: class_name = "Bamboo"; break; case WCLASS_GRAPHIRE: class_name = "Graphire";break; case WCLASS_ISDV4: class_name = "ISDV4"; break; case WCLASS_INTUOS: class_name = "Intuos"; break; case WCLASS_INTUOS2: class_name = "Intuos2"; break; case WCLASS_PEN_DISPLAYS: class_name = "PenDisplay"; break; case WCLASS_REMOTE: class_name = "Remote"; break; default: g_assert_not_reached(); break; } dprintf(fd, "[Device]\n"); dprintf(fd, "Name=%s\n", libwacom_get_name(device)); dprintf(fd, "ModelName=%s\n", libwacom_get_model_name(device) ? libwacom_get_model_name(device) : ""); dprintf(fd, "DeviceMatch="); for (match = libwacom_get_matches(device); *match; match++) print_match(fd, *match); dprintf(fd, "\n"); if (libwacom_get_paired_device(device)) { dprintf(fd, "PairedID="); print_match(fd, libwacom_get_paired_device(device)); dprintf(fd, "\n"); } dprintf(fd, "Class=%s\n", class_name); dprintf(fd, "Width=%d\n", libwacom_get_width(device)); dprintf(fd, "Height=%d\n", libwacom_get_height(device)); print_integrated_flags_for_device(fd, device); print_layout_for_device(fd, device); print_styli_for_device(fd, device); dprintf(fd, "\n"); dprintf(fd, "[Features]\n"); dprintf(fd, "Reversible=%s\n", libwacom_is_reversible(device) ? "true" : "false"); dprintf(fd, "Stylus=%s\n", libwacom_has_stylus(device) ? "true" : "false"); dprintf(fd, "Ring=%s\n", libwacom_has_ring(device) ? "true" : "false"); dprintf(fd, "Ring2=%s\n", libwacom_has_ring2(device) ? "true" : "false"); dprintf(fd, "Touch=%s\n", libwacom_has_touch(device) ? "true" : "false"); dprintf(fd, "TouchSwitch=%s\n", libwacom_has_touchswitch(device)? "true" : "false"); print_supported_leds(fd, device); dprintf(fd, "NumStrips=%d\n", libwacom_get_num_strips(device)); dprintf(fd, "Buttons=%d\n", libwacom_get_num_buttons(device)); dprintf(fd, "\n"); print_buttons_for_device(fd, device); } WacomDevice * libwacom_ref(WacomDevice *device) { assert(device->refcnt >= 1); g_atomic_int_inc(&device->refcnt); return device; } WacomDevice * libwacom_unref(WacomDevice *device) { if (device == NULL) return NULL; assert(device->refcnt >= 1); if (!g_atomic_int_dec_and_test(&device->refcnt)) return NULL; g_free (device->name); g_free (device->model_name); g_free (device->layout); if (device->paired) libwacom_match_unref(device->paired); for (guint i = 0; i < device->matches->len; i++) libwacom_match_unref(g_array_index(device->matches, WacomMatch*, i)); g_array_free (device->matches, TRUE); libwacom_match_unref(device->match); g_array_free (device->styli, TRUE); g_array_free (device->status_leds, TRUE); if (device->buttons) g_hash_table_destroy (device->buttons); g_free (device); return NULL; } LIBWACOM_EXPORT void libwacom_destroy(WacomDevice *device) { libwacom_unref(device); } WacomMatch* libwacom_match_ref(WacomMatch *match) { g_atomic_int_inc(&match->refcnt); return match; } WacomMatch* libwacom_match_unref(WacomMatch *match) { if (match == NULL || !g_atomic_int_dec_and_test(&match->refcnt)) return NULL; g_free (match->match); g_free (match->name); g_free (match); return NULL; } WacomMatch* libwacom_match_new(const char *name, WacomBusType bus, int vendor_id, int product_id) { WacomMatch *match; char *newmatch; match = g_malloc(sizeof(*match)); match->refcnt = 1; if (name == NULL && bus == WBUSTYPE_UNKNOWN && vendor_id == 0 && product_id == 0) newmatch = g_strdup("generic"); else newmatch = make_match_string(name, bus, vendor_id, product_id); match->match = newmatch; match->name = g_strdup(name); match->bus = bus; match->vendor_id = vendor_id; match->product_id = product_id; return match; } void libwacom_add_match(WacomDevice *device, WacomMatch *newmatch) { for (guint i = 0; i < device->matches->len; i++) { WacomMatch *m = g_array_index(device->matches, WacomMatch *, i); const char *matchstr = libwacom_match_get_match_string(m); if (g_str_equal(matchstr, newmatch->match)) { return; } } libwacom_match_ref(newmatch); g_array_append_val(device->matches, newmatch); } void libwacom_set_default_match(WacomDevice *device, WacomMatch *newmatch) { for (guint i = 0; i < device->matches->len; i++) { WacomMatch *m = g_array_index(device->matches, WacomMatch *, i); if (match_is_equal(m, newmatch)) { libwacom_match_unref(device->match); device->match = libwacom_match_ref(m); return; } } g_return_if_reached(); } void libwacom_remove_match(WacomDevice *device, WacomMatch *to_remove) { for (guint i= 0; i < device->matches->len; i++) { WacomMatch *m = g_array_index(device->matches, WacomMatch*, i); if (match_is_equal(m, to_remove)) { WacomMatch *dflt = device->match; /* remove from list */ g_array_remove_index(device->matches, i); /* now reset the default match if needed */ if (match_is_equal(dflt, to_remove)) { WacomMatch *first = g_array_index(device->matches, WacomMatch*, 0); libwacom_set_default_match(device, first); } libwacom_match_unref(to_remove); break; } } } LIBWACOM_EXPORT int libwacom_get_vendor_id(const WacomDevice *device) { g_return_val_if_fail(device->match, -1); return device->match->vendor_id; } LIBWACOM_EXPORT const char* libwacom_get_name(const WacomDevice *device) { return device->name; } LIBWACOM_EXPORT const char* libwacom_get_model_name(const WacomDevice *device) { return device->model_name; } LIBWACOM_EXPORT const char* libwacom_get_layout_filename(const WacomDevice *device) { return device->layout; } LIBWACOM_EXPORT int libwacom_get_product_id(const WacomDevice *device) { g_return_val_if_fail(device->match, -1); return device->match->product_id; } LIBWACOM_EXPORT const char* libwacom_get_match(const WacomDevice *device) { g_return_val_if_fail(device->match, NULL); return device->match->match; } LIBWACOM_EXPORT const WacomMatch** libwacom_get_matches(const WacomDevice *device) { return (const WacomMatch**)device->matches->data; } LIBWACOM_EXPORT const WacomMatch* libwacom_get_paired_device(const WacomDevice *device) { return (const WacomMatch*)device->paired; } LIBWACOM_EXPORT int libwacom_get_width(const WacomDevice *device) { return device->width; } LIBWACOM_EXPORT int libwacom_get_height(const WacomDevice *device) { return device->height; } LIBWACOM_EXPORT WacomClass libwacom_get_class(const WacomDevice *device) { return device->cls; } LIBWACOM_EXPORT int libwacom_has_stylus(const WacomDevice *device) { return !!(device->features & FEATURE_STYLUS); } LIBWACOM_EXPORT int libwacom_has_touch(const WacomDevice *device) { return !!(device->features & FEATURE_TOUCH); } LIBWACOM_EXPORT int libwacom_get_num_buttons(const WacomDevice *device) { return g_hash_table_size(device->buttons); } LIBWACOM_EXPORT const int * libwacom_get_supported_styli(const WacomDevice *device, int *num_styli) { *num_styli = device->styli->len; return (const int *)device->styli->data; } LIBWACOM_EXPORT int libwacom_has_ring(const WacomDevice *device) { return !!(device->features & FEATURE_RING); } LIBWACOM_EXPORT int libwacom_has_ring2(const WacomDevice *device) { return !!(device->features & FEATURE_RING2); } LIBWACOM_EXPORT int libwacom_get_ring_num_modes(const WacomDevice *device) { return device->ring_num_modes; } LIBWACOM_EXPORT int libwacom_get_ring2_num_modes(const WacomDevice *device) { return device->ring2_num_modes; } LIBWACOM_EXPORT int libwacom_get_num_strips(const WacomDevice *device) { return device->num_strips; } LIBWACOM_EXPORT int libwacom_get_strips_num_modes(const WacomDevice *device) { return device->strips_num_modes; } LIBWACOM_EXPORT const WacomStatusLEDs * libwacom_get_status_leds(const WacomDevice *device, int *num_leds) { *num_leds = device->status_leds->len; return (const WacomStatusLEDs*)device->status_leds->data; } static const struct { WacomButtonFlags button_flags; WacomStatusLEDs status_leds; } button_status_leds[] = { { WACOM_BUTTON_RING_MODESWITCH, WACOM_STATUS_LED_RING }, { WACOM_BUTTON_RING2_MODESWITCH, WACOM_STATUS_LED_RING2 }, { WACOM_BUTTON_TOUCHSTRIP_MODESWITCH, WACOM_STATUS_LED_TOUCHSTRIP }, { WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH, WACOM_STATUS_LED_TOUCHSTRIP2 } }; LIBWACOM_EXPORT int libwacom_get_button_led_group (const WacomDevice *device, char button) { WacomButton *b = g_hash_table_lookup(device->buttons, GINT_TO_POINTER(button)); if (!(b->flags & WACOM_BUTTON_MODESWITCH)) return -1; for (guint led_index = 0; led_index < device->status_leds->len; led_index++) { guint n; for (n = 0; n < G_N_ELEMENTS (button_status_leds); n++) { WacomStatusLEDs led = g_array_index(device->status_leds, WacomStatusLEDs, led_index); if ((b->flags & button_status_leds[n].button_flags) && (led == button_status_leds[n].status_leds)) { return led_index; } } } return WACOM_STATUS_LED_UNAVAILABLE; } LIBWACOM_EXPORT int libwacom_is_builtin(const WacomDevice *device) { return !!(libwacom_get_integration_flags (device) & WACOM_DEVICE_INTEGRATED_DISPLAY); } LIBWACOM_EXPORT int libwacom_is_reversible(const WacomDevice *device) { return !!(device->features & FEATURE_REVERSIBLE); } LIBWACOM_EXPORT int libwacom_has_touchswitch(const WacomDevice *device) { return !!(device->features & FEATURE_TOUCHSWITCH); } LIBWACOM_EXPORT WacomIntegrationFlags libwacom_get_integration_flags (const WacomDevice *device) { /* "unset" is for internal use only */ if (device->integration_flags == WACOM_DEVICE_INTEGRATED_UNSET) return WACOM_DEVICE_INTEGRATED_NONE; return device->integration_flags; } LIBWACOM_EXPORT WacomBusType libwacom_get_bustype(const WacomDevice *device) { g_return_val_if_fail(device->match, -1); return device->match->bus; } LIBWACOM_EXPORT WacomButtonFlags libwacom_get_button_flag(const WacomDevice *device, char button) { WacomButton *b = g_hash_table_lookup(device->buttons, GINT_TO_POINTER(button)); return b ? b->flags : WACOM_BUTTON_NONE; } LIBWACOM_EXPORT int libwacom_get_button_evdev_code(const WacomDevice *device, char button) { WacomButton *b = g_hash_table_lookup(device->buttons, GINT_TO_POINTER(button)); return b ? b->code : 0; } LIBWACOM_EXPORT const WacomStylus *libwacom_stylus_get_for_id (const WacomDeviceDatabase *db, int id) { return g_hash_table_lookup (db->stylus_ht, GINT_TO_POINTER(id)); } LIBWACOM_EXPORT int libwacom_stylus_get_id (const WacomStylus *stylus) { return stylus->id; } LIBWACOM_EXPORT const char * libwacom_stylus_get_name (const WacomStylus *stylus) { return stylus->name; } LIBWACOM_EXPORT const int * libwacom_stylus_get_paired_ids(const WacomStylus *stylus, int *num_paired_ids) { if (num_paired_ids) *num_paired_ids = stylus->paired_ids->len; return (const int*)stylus->paired_ids->data; } LIBWACOM_EXPORT int libwacom_stylus_get_num_buttons (const WacomStylus *stylus) { if (stylus->num_buttons == -1) { g_warning ("Stylus '0x%x' has no number of buttons defined, falling back to 2", stylus->id); return 2; } return stylus->num_buttons; } LIBWACOM_EXPORT int libwacom_stylus_has_eraser (const WacomStylus *stylus) { return stylus->has_eraser; } LIBWACOM_EXPORT int libwacom_stylus_is_eraser (const WacomStylus *stylus) { return libwacom_stylus_get_eraser_type(stylus) != WACOM_ERASER_NONE; } LIBWACOM_EXPORT int libwacom_stylus_has_lens (const WacomStylus *stylus) { return stylus->has_lens; } LIBWACOM_EXPORT int libwacom_stylus_has_wheel (const WacomStylus *stylus) { return stylus->has_wheel; } LIBWACOM_EXPORT WacomAxisTypeFlags libwacom_stylus_get_axes (const WacomStylus *stylus) { return stylus->axes; } LIBWACOM_EXPORT WacomStylusType libwacom_stylus_get_type (const WacomStylus *stylus) { if (stylus->type == WSTYLUS_UNKNOWN) { g_warning ("Stylus '0x%x' has no type defined, falling back to 'General'", stylus->id); return WSTYLUS_GENERAL; } return stylus->type; } LIBWACOM_EXPORT WacomEraserType libwacom_stylus_get_eraser_type (const WacomStylus *stylus) { return stylus->eraser_type; } LIBWACOM_EXPORT void libwacom_print_stylus_description (int fd, const WacomStylus *stylus) { const char *type; WacomAxisTypeFlags axes; const int *paired_ids; int count; int i; dprintf(fd, "[%#x]\n", libwacom_stylus_get_id(stylus)); dprintf(fd, "Name=%s\n", libwacom_stylus_get_name(stylus)); dprintf(fd, "Buttons=%d\n", libwacom_stylus_get_num_buttons(stylus)); dprintf(fd, "PairedIds="); paired_ids = libwacom_stylus_get_paired_ids(stylus, &count); for (i = 0; i < count; i++) { dprintf(fd, "%#x;", paired_ids[i]); } dprintf(fd, "\n"); switch (libwacom_stylus_get_eraser_type(stylus)) { case WACOM_ERASER_UNKNOWN: type = "Unknown"; break; case WACOM_ERASER_NONE: type = "None"; break; case WACOM_ERASER_INVERT: type = "Invert"; break; case WACOM_ERASER_BUTTON: type = "Button"; break; default: g_assert_not_reached(); break; } dprintf(fd, "EraserType=%s\n", type); dprintf(fd, "HasLens=%s\n", libwacom_stylus_has_lens(stylus) ? "true" : "false"); dprintf(fd, "HasWheel=%s\n", libwacom_stylus_has_wheel(stylus) ? "true" : "false"); axes = libwacom_stylus_get_axes(stylus); dprintf(fd, "Axes="); if (axes & WACOM_AXIS_TYPE_TILT) dprintf(fd, "Tilt;"); if (axes & WACOM_AXIS_TYPE_ROTATION_Z) dprintf(fd, "RotationZ;"); if (axes & WACOM_AXIS_TYPE_DISTANCE) dprintf(fd, "Distance;"); if (axes & WACOM_AXIS_TYPE_PRESSURE) dprintf(fd, "Pressure;"); if (axes & WACOM_AXIS_TYPE_SLIDER) dprintf(fd, "Slider;"); dprintf(fd, "\n"); switch(libwacom_stylus_get_type(stylus)) { case WSTYLUS_UNKNOWN: type = "Unknown"; break; case WSTYLUS_GENERAL: type = "General"; break; case WSTYLUS_INKING: type = "Inking"; break; case WSTYLUS_AIRBRUSH: type = "Airbrush"; break; case WSTYLUS_CLASSIC: type = "Classic"; break; case WSTYLUS_MARKER: type = "Marker"; break; case WSTYLUS_STROKE: type = "Stroke"; break; case WSTYLUS_PUCK: type = "Puck"; break; case WSTYLUS_3D: type = "3D"; break; case WSTYLUS_MOBILE: type = "Mobile"; break; default: g_assert_not_reached(); break; } dprintf(fd, "Type=%s\n", type); } WacomStylus* libwacom_stylus_ref(WacomStylus *stylus) { g_atomic_int_inc(&stylus->refcnt); return stylus; } WacomStylus* libwacom_stylus_unref(WacomStylus *stylus) { if (!g_atomic_int_dec_and_test(&stylus->refcnt)) return NULL; g_free (stylus->name); g_free (stylus->group); if (stylus->paired_ids) g_array_free (stylus->paired_ids, TRUE); g_free (stylus); return NULL; } LIBWACOM_EXPORT const char * libwacom_match_get_name(const WacomMatch *match) { return match->name; } LIBWACOM_EXPORT WacomBusType libwacom_match_get_bustype(const WacomMatch *match) { return match->bus; } LIBWACOM_EXPORT uint32_t libwacom_match_get_product_id(const WacomMatch *match) { return match->product_id; } LIBWACOM_EXPORT uint32_t libwacom_match_get_vendor_id(const WacomMatch *match) { return match->vendor_id; } LIBWACOM_EXPORT const char* libwacom_match_get_match_string(const WacomMatch *match) { return match->match; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/libwacom/libwacom.h000066400000000000000000000577301421725554000206670ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ /** @cond hide_from_doxygen */ #ifndef _LIBWACOM_H_ #define _LIBWACOM_H_ /** @endcond */ #include #include #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301) #define LIBWACOM_DEPRECATED __attribute__((deprecated)) #else #define LIBWACOM_DEPRECATED #endif /* __GNUC__ */ /** @mainpage @section Introduction libwacom is a library to identify wacom tablets and their model-specific features. It provides easy access to information such as "is this a built-in on-screen tablet", "what is the size of this model", etc. @section Usage The usage of libwacom in an application could look like this:
      WacomDeviceDatabase *db;
      WacomDevice *device;
      WacomError *error;

      db = libwacom_database_new();
      error = libwacom_error_new();
      device = libwacom_new_from_path(db, "/dev/input/event0", WFALLBACK_NONE, error);
      if (!device)
           return; // should check for error here

      if (libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_SYSTEM)
           printf("This is a built-in device\n");

      libwacom_destroy(device);
      libwacom_database_destroy(db);
 
For a full API reference to see libwacom.h. @section Database libwacom comes with a database of models and their features in key-value format. If you cannot use libwacom, the files may be parsed directly. Note that the file format may change over time, especially in the beginning. */ /** * @defgroup context libwacom context * Functions to create and manage libwacom context. * * @defgroup devices libwacom devices * Functions to create and manage libwacom devices. * * @defgroup styli libwacom styli * Functions to create and manage libwacom styli. */ /** * @ingroup devices */ typedef struct _WacomDevice WacomDevice; /** * @ingroup devices */ typedef struct _WacomMatch WacomMatch; /** * @ingroup styli */ typedef struct _WacomStylus WacomStylus; /** * @ingroup context */ typedef struct _WacomError WacomError; /** * @ingroup context */ typedef struct _WacomDeviceDatabase WacomDeviceDatabase; /** * @ingroup styli */ #define WACOM_STYLUS_FALLBACK_ID 0xfffff /** * @ingroup styli */ #define WACOM_ERASER_FALLBACK_ID 0xffffe /** * Possible error codes. * * @ingroup context */ enum WacomErrorCode { WERROR_NONE, /**< No error has occured */ WERROR_BAD_ALLOC, /**< Allocation error */ WERROR_INVALID_PATH, /**< A path specified is invalid */ WERROR_INVALID_DB, /**< The passed DB is invalid */ WERROR_BAD_ACCESS, /**< Invalid permissions to access the path */ WERROR_UNKNOWN_MODEL, /**< Unsupported/unknown device */ WERROR_BUG_CALLER, /**< A bug in the caller */ }; /** * Bus types for tablets. * * @ingroup devices */ typedef enum { WBUSTYPE_UNKNOWN, /**< Unknown/unsupported bus type */ WBUSTYPE_USB, /**< USB tablet */ WBUSTYPE_SERIAL, /**< Serial tablet */ WBUSTYPE_BLUETOOTH, /**< Bluetooth tablet */ WBUSTYPE_I2C, /**< I2C tablet */ } WacomBusType; /** * Tablet integration. * * @ingroup devices */ typedef enum { WACOM_DEVICE_INTEGRATED_NONE = 0, WACOM_DEVICE_INTEGRATED_DISPLAY = (1 << 0), WACOM_DEVICE_INTEGRATED_SYSTEM = (1 << 1) } WacomIntegrationFlags; /** * Classes of devices. * * @deprecated This enum should no longer be used. The classes are not * fine-grained or reliable enough to be useful. * * @ingroup devices */ typedef enum { WCLASS_UNKNOWN, /**< Unknown/unsupported device class */ WCLASS_INTUOS3, /**< Any Intuos3 series */ WCLASS_INTUOS4, /**< Any Intuos4 series */ WCLASS_INTUOS5, /**< Any Intuos5 series */ WCLASS_CINTIQ, /**< Any Cintiq device */ WCLASS_BAMBOO, /**< Any Bamboo device */ WCLASS_GRAPHIRE, /**< Any Graphire device */ WCLASS_ISDV4, /**< Any serial ISDV4 device */ WCLASS_INTUOS, /**< Any Intuos series */ WCLASS_INTUOS2, /**< Any Intuos2 series */ WCLASS_PEN_DISPLAYS, /**< Any "interactive pen display" */ WCLASS_REMOTE, /**< Any Wacom Remote */ } WacomClass; /** * Class of stylus * * @ingroup styli */ typedef enum { WSTYLUS_UNKNOWN, WSTYLUS_GENERAL, WSTYLUS_INKING, WSTYLUS_AIRBRUSH, WSTYLUS_CLASSIC, WSTYLUS_MARKER, WSTYLUS_STROKE, WSTYLUS_PUCK, WSTYLUS_3D, WSTYLUS_MOBILE, } WacomStylusType; /** * Type of eraser on a stylus * * @ingroup styli */ typedef enum { WACOM_ERASER_UNKNOWN, WACOM_ERASER_NONE, /**< No eraser is present on the stylus */ WACOM_ERASER_INVERT, /**< Eraser is a separate tool on the opposite end of the stylus */ WACOM_ERASER_BUTTON, /**< Eraser is a button alongside any other stylus buttons */ } WacomEraserType; /** * Capabilities of the various tablet buttons * * @ingroup devices */ typedef enum { WACOM_BUTTON_NONE = 0, WACOM_BUTTON_POSITION_LEFT = (1 << 1), WACOM_BUTTON_POSITION_RIGHT = (1 << 2), WACOM_BUTTON_POSITION_TOP = (1 << 3), WACOM_BUTTON_POSITION_BOTTOM = (1 << 4), WACOM_BUTTON_RING_MODESWITCH = (1 << 5), WACOM_BUTTON_RING2_MODESWITCH = (1 << 6), WACOM_BUTTON_TOUCHSTRIP_MODESWITCH = (1 << 7), WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH = (1 << 8), WACOM_BUTTON_OLED = (1 << 9), WACOM_BUTTON_MODESWITCH = (WACOM_BUTTON_RING_MODESWITCH | WACOM_BUTTON_RING2_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH), WACOM_BUTTON_DIRECTION = (WACOM_BUTTON_POSITION_LEFT | WACOM_BUTTON_POSITION_RIGHT | WACOM_BUTTON_POSITION_TOP | WACOM_BUTTON_POSITION_BOTTOM), WACOM_BUTTON_RINGS_MODESWITCH = (WACOM_BUTTON_RING_MODESWITCH | WACOM_BUTTON_RING2_MODESWITCH), WACOM_BUTTON_TOUCHSTRIPS_MODESWITCH = (WACOM_BUTTON_TOUCHSTRIP_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH), } WacomButtonFlags; /** * Axis type for a stylus. Note that x/y is implied. * * @ingroup styli */ typedef enum { WACOM_AXIS_TYPE_NONE = 0, /** Tilt in x and y direction */ WACOM_AXIS_TYPE_TILT = (1 << 1), /** Rotation in the z-axis */ WACOM_AXIS_TYPE_ROTATION_Z = (1 << 2), /** Distance to surface */ WACOM_AXIS_TYPE_DISTANCE = (1 << 3), /** Tip pressure */ WACOM_AXIS_TYPE_PRESSURE = (1 << 4), /** A absolute-position slider like the wheel on the airbrush */ WACOM_AXIS_TYPE_SLIDER = (1 << 5), } WacomAxisTypeFlags; /** * @ingroup devices */ typedef enum { WFALLBACK_NONE = 0, WFALLBACK_GENERIC = 1 } WacomFallbackFlags; /** * @ingroup devices */ typedef enum { WCOMPARE_NORMAL = 0, /**< compare the device only */ WCOMPARE_MATCHES = (1 << 1), /**< compare all possible matches too */ } WacomCompareFlags; /** * @ingroup devices */ typedef enum { WACOM_STATUS_LED_UNAVAILABLE = -1, WACOM_STATUS_LED_RING = 0, WACOM_STATUS_LED_RING2 = 1, WACOM_STATUS_LED_TOUCHSTRIP = 2, WACOM_STATUS_LED_TOUCHSTRIP2 = 3 } WacomStatusLEDs; /** * Allocate a new structure for error reporting. * * @return A newly allocated error structure or NULL if the allocation * failed. * * @ingroup context */ WacomError* libwacom_error_new(void); /** * Free the error and associated memory. * Resets error to NULL. * * @param error A reference to a error struct. * @see libwacom_error_new * * @ingroup context */ void libwacom_error_free(WacomError **error); /** * @return The code for this error. * * @ingroup context */ enum WacomErrorCode libwacom_error_get_code(WacomError *error); /** * @return A human-readable message for this error * * @ingroup context */ const char* libwacom_error_get_message(WacomError *error); /** * Loads the Tablet and Stylus databases, to be used * in libwacom_new_*() functions. * * @return A new database or NULL on error. * * @ingroup context */ WacomDeviceDatabase* libwacom_database_new(void); /** * Loads the Tablet and Stylus databases, to be used * in libwacom_new_*() functions, from the prefix * path passes. This is only useful for diagnostics * applications. * * @return A new database or NULL on error. * * @ingroup context */ WacomDeviceDatabase* libwacom_database_new_for_path(const char *datadir); /** * Free all memory used by the database. * * @param db A Tablet and Stylus database. * * @ingroup context */ void libwacom_database_destroy(WacomDeviceDatabase *db); /** * Create a new device reference from the given device path. * In case of error, NULL is returned and the error is set to the * appropriate value. * * @param db A device database * @param path A device path in the form of e.g. /dev/input/event0 * @param fallback Whether we should create a generic if model is unknown * @param error If not NULL, set to the error if any occurs * * @return A new reference to this device or NULL on errror. * * @ingroup devices */ WacomDevice* libwacom_new_from_path(const WacomDeviceDatabase *db, const char *path, WacomFallbackFlags fallback, WacomError *error); /** * Create a new device reference from the given vendor/product IDs. * In case of error, NULL is returned and the error is set to the * appropriate value. * * @note The term "usbid" is misleading, this function will return * devices with matching ids on the USB, Bluetooth or i2c bus. * * @param db A device database * @param vendor_id The vendor ID of the device * @param product_id The product ID of the device * @param error If not NULL, set to the error if any occurs * * @return A new reference to this device or NULL on errror. * * @ingroup devices */ WacomDevice* libwacom_new_from_usbid(const WacomDeviceDatabase *db, int vendor_id, int product_id, WacomError *error); /** * Create a new device reference from the given name. * In case of error, NULL is returned and the error is set to the * appropriate value. * * @param db A device database * @param name The name identifying the device * @param error If not NULL, set to the error if any occurs * * @return A new reference to this device or NULL on error. * * @ingroup devices */ WacomDevice* libwacom_new_from_name(const WacomDeviceDatabase *db, const char *name, WacomError *error); /** * Returns the list of devices in the given database. * * @param db A device database * @param error If not NULL, set to the error if any occurs * * @return A NULL terminated list of pointers to all the devices inside the * database. * The content of the list is owned by the database and should not be * modified or freed. Use free() to free the list. * * @ingroup devices */ WacomDevice** libwacom_list_devices_from_database(const WacomDeviceDatabase *db, WacomError *error); /** * Print the description of this device to the given file. * * @param fd The file descriptor to print to * @param device The device to print the description for. * * @ingroup devices */ void libwacom_print_device_description (int fd, const WacomDevice *device); /** * Remove the device and free all memory and references to it. * * @param device The device to delete * * @ingroup devices */ void libwacom_destroy(WacomDevice *device); /** * Compare the two devices for equal-ness. * * @param a The first device * @param b The second device * @param flags Flags to dictate what constitutes a match * * @return 0 if the devices are identical, nonzero otherwise * * @ingroup devices */ int libwacom_compare(const WacomDevice *a, const WacomDevice *b, WacomCompareFlags flags); /** * @param device The tablet to query * @return The class of the device * * @deprecated This function should no longer be used. The classes are not * fine-grained or reliable enough to be useful. * * @ingroup devices */ LIBWACOM_DEPRECATED WacomClass libwacom_get_class(const WacomDevice *device); /** * @param device The tablet to query * @return The human-readable name for this device * * @ingroup devices */ const char* libwacom_get_name(const WacomDevice *device); /** * @param device The tablet to query * @return The vendor-specific model name (e.g. CTE-650 for a Bamboo Fun), or NULL if none is set * * @ingroup devices */ const char* libwacom_get_model_name(const WacomDevice *device); /** * @param device The tablet to query * @return The full filename including path to the SVG layout of the device * if available, or NULL otherwise * * @ingroup devices */ const char* libwacom_get_layout_filename(const WacomDevice *device); /** * @param device The tablet to query * @return The numeric vendor ID for this device * * @bug The return value is a signed int but libwacom_match_get_vendor_id() * returns an unsigned int. This may cause compiler warnings, but the * effective range for vendor IDs is 16-bit only anyway. * * @ingroup devices */ int libwacom_get_vendor_id(const WacomDevice *device); /** * @param device The tablet to query * @return The current match string used for this device (if set) or the first * match string in the tablet definition. * * @ingroup devices */ const char* libwacom_get_match(const WacomDevice *device); /** * @param device The tablet to query * @return A pointer to the null-terminated list of possible matches for this device. Do not * modify this pointer or any content! * * @ingroup devices */ const WacomMatch** libwacom_get_matches(const WacomDevice *device); /** * Return the match string of the paired device for this device. A paired * device is a device with a different match string but that shares the * physical device with this device. * * If the return value is NULL, no device is paired with this device or all * paired devices have the same WacomMatch as this device. * * The returned device may not be a libwacom device itself. * * @param device The tablet to query * @return A pointer to paired device for this device. Do not * modify this pointer or any content! * * @ingroup devices */ const WacomMatch* libwacom_get_paired_device(const WacomDevice *device); /** * @param device The tablet to query * @return The numeric product ID for this device * * @bug The return value is a signed int but libwacom_match_get_product_id() * returns an unsigned int. This may cause compiler warning, but the * effective range for product IDs is 16-bit only anyway. * * @ingroup devices */ int libwacom_get_product_id(const WacomDevice *device); /** * Retrieve the width of the device. This is the width of the usable area as * advertised, not the total size of the physical tablet. For e.g. an * Intuos4 6x9 this will return 9. * * @param device The tablet to query * @return The width of this device in inches * * @ingroup devices */ int libwacom_get_width(const WacomDevice *device); /** * Retrieve the height of the device. This is the height of the usable area as * advertised, not the total size of the physical tablet. For e.g. an * Intuos4 6x9 this will return 6. * * @param device The tablet to query * @return The width of this device in inches * * @ingroup devices */ int libwacom_get_height(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device supports styli or zero otherwise * * @ingroup devices */ int libwacom_has_stylus(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device supports touch or zero otherwise * * @ingroup devices */ int libwacom_has_touch(const WacomDevice *device); /** * Tablet buttons are numbered 'A' through to 'A' + number of buttons. * * @param device The tablet to query * @return The number of buttons on the tablet * * @ingroup devices */ int libwacom_get_num_buttons(const WacomDevice *device); /** * @param device The tablet to query * @param num_styli Return location for the number of listed styli * @return an array of Styli IDs supported by the device * * @ingroup styli */ const int *libwacom_get_supported_styli(const WacomDevice *device, int *num_styli); /** * @param device The tablet to query * @return non-zero if the device has a touch ring or zero otherwise * * @ingroup devices */ int libwacom_has_ring(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device has a second touch ring or zero otherwise * * @ingroup devices */ int libwacom_has_ring2(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device has a touch switch or zero otherwise * * @ingroup devices */ int libwacom_has_touchswitch(const WacomDevice *device); /** * @param device The tablet to query * @return the number of modes for the touchring if it has a mode switch * * @ingroup devices */ int libwacom_get_ring_num_modes(const WacomDevice *device); /** * @param device The tablet to query * @return the number of modes for the second touchring if it has a mode switch * * @ingroup devices */ int libwacom_get_ring2_num_modes(const WacomDevice *device); /** * @param device The tablet to query * @return the number of touch strips on the tablet * otherwise * * @ingroup devices */ int libwacom_get_num_strips(const WacomDevice *device); /** * @param device The tablet to query * @return the number of modes for each of the touchstrips if any * * @ingroup devices */ int libwacom_get_strips_num_modes(const WacomDevice *device); /** * @param device The tablet to query * @param num_leds Return location for the number of supported status LEDs * @return an array of status LEDs supported by the device * * @ingroup devices */ const WacomStatusLEDs *libwacom_get_status_leds(const WacomDevice *device, int *num_leds); /** * @param device The tablet to query * @param button The ID of the button to check for, between 'A' and 'Z' * @return the status LED group id to use * or -1 if no LED is available for the given tablet / button * * @ingroup devices */ int libwacom_get_button_led_group (const WacomDevice *device, char button); /** * @param device The tablet to query * @return non-zero if the device is built into the screen (ie a screen tablet) * or zero if the device is an external tablet * @deprecated 0.7 Use libwacom_get_integration_flags() instead. * * @ingroup devices */ int libwacom_is_builtin(const WacomDevice *device) LIBWACOM_DEPRECATED; /** * @param device The tablet to query * @return non-zero if the device can be used left-handed * (rotated 180 degrees) * * @ingroup devices */ int libwacom_is_reversible(const WacomDevice *device); /** * @param device The tablet to query * @return the integration flags for the device * * @ingroup devices */ WacomIntegrationFlags libwacom_get_integration_flags (const WacomDevice *device); /** * @param device The tablet to query * @return The bustype of this device. * * @ingroup devices */ WacomBusType libwacom_get_bustype(const WacomDevice *device); /** * @param device The tablet to query * @param button The ID of the button to check for, between 'A' and 'Z' * @return a WacomButtonFlags with information about the button * * @ingroup devices */ WacomButtonFlags libwacom_get_button_flag(const WacomDevice *device, char button); /** * @param device The tablet to query * @param button The ID of the button to check for, between 'A' and 'Z' * @return The evdev event code sent when the button is pressed or 0 if * unknown. * * @ingroup devices */ int libwacom_get_button_evdev_code(const WacomDevice *device, char button); /** * Get the WacomStylus for the given tool ID. * * @param db A Tablet and Stylus database. * @param id The Tool ID for this stylus * @return A WacomStylus representing the stylus. Do not free. * * @ingroup styli */ const WacomStylus *libwacom_stylus_get_for_id (const WacomDeviceDatabase *db, int id); /** * @param stylus The stylus to query * @return the ID of the tool * * @ingroup styli */ int libwacom_stylus_get_id (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The name of the stylus * * @ingroup styli */ const char *libwacom_stylus_get_name (const WacomStylus *stylus); /** * @param stylus The stylus to query * @param num_paired_ids The length of the returned list * @return The list of other IDs paired to this stylus * * @ingroup styli */ const int *libwacom_stylus_get_paired_ids(const WacomStylus *stylus, int *num_paired_ids); /** * @param stylus The stylus to query * @return The number of buttons on the stylus * * @ingroup styli */ int libwacom_stylus_get_num_buttons (const WacomStylus *stylus); /** * Check if the given stylus is paired with a separate eraser. * * If this function returns @c true then the tool described by the given * WacomStylus is paired with a separate eraser tool. The actual eraser * tool may be located by iterating over the list of paired styli. * * @param stylus The stylus to query * @return Whether the stylus is paired with an eraser * @see libwacom_stylus_get_paired_ids * @see libwacom_stylus_is_eraser * * @ingroup styli */ int libwacom_stylus_has_eraser (const WacomStylus *stylus); /** * Check if the given stylus may act like an eraser. * * If this function returns @c true then the tool described by the given * WacomStylus may act like an eraser. Such a tool may be dedicated to * sending just eraser events (and paired with a separate tool for "tip" * events) or capable of sending both both tip and eraser events. * * @param stylus The stylus to query * @return Whether the stylus can act as an eraser * @see libwacom_stylus_get_eraser_type * @see libwacom_stylus_has_eraser * * @ingroup styli */ int libwacom_stylus_is_eraser (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return Whether the stylus has a lens * * @ingroup styli */ int libwacom_stylus_has_lens (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return Whether the stylus has a relative mouse wheel * * @ingroup styli */ int libwacom_stylus_has_wheel (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The flags specifying the list of absolute axes * * @ingroup styli */ WacomAxisTypeFlags libwacom_stylus_get_axes (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The type of stylus * * @ingroup styli */ WacomStylusType libwacom_stylus_get_type (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The type of eraser on the stylus * * @ingroup styli */ WacomEraserType libwacom_stylus_get_eraser_type (const WacomStylus *stylus); /** * Print the description of this stylus to the given file. * * @param fd The file descriptor * @param stylus The stylus to print the description for. * * @ingroup styli */ void libwacom_print_stylus_description (int fd, const WacomStylus *stylus); /** @addtogroup devices * @{ */ const char *libwacom_match_get_name(const WacomMatch *match); WacomBusType libwacom_match_get_bustype(const WacomMatch *match); uint32_t libwacom_match_get_product_id(const WacomMatch *match); uint32_t libwacom_match_get_vendor_id(const WacomMatch *match); const char* libwacom_match_get_match_string(const WacomMatch *match); /** @} */ /** @cond hide_from_doxygen */ #endif /* _LIBWACOM_H_ */ /** @endcond */ /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/libwacom/libwacom.sym000066400000000000000000000036271421725554000212440ustar00rootroot00000000000000/* in alphabetical order! */ LIBWACOM_2.0 { global: libwacom_compare; libwacom_database_destroy; libwacom_database_new; libwacom_database_new_for_path; libwacom_destroy; libwacom_error_free; libwacom_error_get_code; libwacom_error_get_message; libwacom_error_new; libwacom_get_bustype; libwacom_get_button_evdev_code; libwacom_get_button_flag; libwacom_get_button_led_group; libwacom_get_class; libwacom_get_height; libwacom_get_integration_flags; libwacom_get_layout_filename; libwacom_get_match; libwacom_get_matches; libwacom_get_model_name; libwacom_get_name; libwacom_get_num_buttons; libwacom_get_num_strips; libwacom_get_paired_device; libwacom_get_product_id; libwacom_get_ring2_num_modes; libwacom_get_ring_num_modes; libwacom_get_status_leds; libwacom_get_strips_num_modes; libwacom_get_supported_styli; libwacom_get_vendor_id; libwacom_get_width; libwacom_has_ring; libwacom_has_ring2; libwacom_has_stylus; libwacom_has_touch; libwacom_has_touchswitch; libwacom_is_builtin; libwacom_is_reversible; libwacom_list_devices_from_database; libwacom_match_get_bustype; libwacom_match_get_match_string; libwacom_match_get_name; libwacom_match_get_product_id; libwacom_match_get_vendor_id; libwacom_new_from_name; libwacom_new_from_path; libwacom_new_from_usbid; libwacom_print_device_description; libwacom_print_stylus_description; libwacom_stylus_get_axes; libwacom_stylus_get_eraser_type; libwacom_stylus_get_for_id; libwacom_stylus_get_id; libwacom_stylus_get_name; libwacom_stylus_get_num_buttons; libwacom_stylus_get_paired_ids; libwacom_stylus_get_type; libwacom_stylus_has_eraser; libwacom_stylus_has_lens; libwacom_stylus_has_wheel; libwacom_stylus_is_eraser; local: *; }; libwacom-libwacom-2.2.0/libwacom/libwacomint.h000066400000000000000000000102031421725554000213620ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #include "config.h" #ifndef _LIBWACOMINT_H_ #define _LIBWACOMINT_H_ #include "libwacom.h" #include #include #define LIBWACOM_EXPORT __attribute__ ((visibility("default"))) #define DBG(...) \ printf(__VA_ARGS__) #define GENERIC_DEVICE_MATCH "generic" #define WACOM_DEVICE_INTEGRATED_UNSET (WACOM_DEVICE_INTEGRATED_NONE - 1U) enum WacomFeature { FEATURE_STYLUS = (1 << 0), FEATURE_TOUCH = (1 << 1), FEATURE_RING = (1 << 2), FEATURE_RING2 = (1 << 3), FEATURE_REVERSIBLE = (1 << 4), FEATURE_TOUCHSWITCH = (1 << 5) }; /* WARNING: When adding new members to this struct * make sure to update libwacom_copy_match() ! */ struct _WacomMatch { gint refcnt; char *match; char *name; WacomBusType bus; uint32_t vendor_id; uint32_t product_id; }; /* Used in the device->buttons hashtable */ typedef struct _WacomButton { WacomButtonFlags flags; int code; } WacomButton; /* WARNING: When adding new members to this struct * make sure to update libwacom_copy() and * libwacom_print_device_description() ! */ struct _WacomDevice { char *name; char *model_name; int width; int height; WacomMatch *match; /* used match or first match by default */ GArray *matches; WacomMatch *paired; WacomClass cls; int num_strips; uint32_t features; uint32_t integration_flags; int strips_num_modes; int ring_num_modes; int ring2_num_modes; GArray *styli; GHashTable *buttons; /* 'A' : WacomButton */ GArray *status_leds; char *layout; gint refcnt; /* for the db hashtable */ }; struct _WacomStylus { gint refcnt; int id; char *name; char *group; int num_buttons; gboolean has_eraser; GArray *paired_ids; WacomEraserType eraser_type; gboolean has_lens; gboolean has_wheel; WacomStylusType type; WacomAxisTypeFlags axes; }; struct _WacomDeviceDatabase { GHashTable *device_ht; /* key = DeviceMatch (str), value = WacomDeviceData * */ GHashTable *stylus_ht; /* key = ID (int), value = WacomStylus * */ }; struct _WacomError { enum WacomErrorCode code; char *msg; }; WacomDevice* libwacom_ref(WacomDevice *device); WacomDevice* libwacom_unref(WacomDevice *device); WacomStylus* libwacom_stylus_ref(WacomStylus *stylus); WacomStylus* libwacom_stylus_unref(WacomStylus *stylus); WacomMatch* libwacom_match_ref(WacomMatch *match); WacomMatch* libwacom_match_unref(WacomMatch *match); void libwacom_error_set(WacomError *error, enum WacomErrorCode code, const char *msg, ...); void libwacom_add_match(WacomDevice *device, WacomMatch *newmatch); void libwacom_set_default_match(WacomDevice *device, WacomMatch *newmatch); void libwacom_remove_match(WacomDevice *device, WacomMatch *newmatch); WacomMatch* libwacom_match_new(const char *name, WacomBusType bus, int vendor_id, int product_id); WacomBusType bus_from_str (const char *str); const char *bus_to_str (WacomBusType bus); char *make_match_string(const char *name, WacomBusType bus, int vendor_id, int product_id); #endif /* _LIBWACOMINT_H_ */ /* vim: set noexpandtab shiftwidth=8: */ libwacom-libwacom-2.2.0/libwacom/util-strings.h000066400000000000000000000146261421725554000215330ustar00rootroot00000000000000/* * Copyright © 2008 Kristian Høgsberg * Copyright © 2013-2015 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #pragma once #include "config.h" #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_LOCALE_H #include #endif #ifdef HAVE_XLOCALE_H #include #endif static inline void * zalloc(size_t size) { void *p; /* We never need to alloc anything more than 1,5 MB so we can assume * if we ever get above that something's going wrong */ if (size > 1536 * 1024) assert(!"bug: internal malloc size limit exceeded"); p = calloc(1, size); if (!p) abort(); return p; } /** * strdup guaranteed to succeed. If the input string is NULL, the output * string is NULL. If the input string is a string pointer, we strdup or * abort on failure. */ static inline char* safe_strdup(const char *str) { char *s; if (!str) return NULL; s = strdup(str); if (!s) abort(); return s; } /** * Simple wrapper for asprintf that ensures the passed in-pointer is set * to NULL upon error. * The standard asprintf() call does not guarantee the passed in pointer * will be NULL'ed upon failure, whereas this wrapper does. * * @param strp pointer to set to newly allocated string. * This pointer should be passed to free() to release when done. * @param fmt the format string to use for printing. * @return The number of bytes printed (excluding the null byte terminator) * upon success or -1 upon failure. In the case of failure the pointer is set * to NULL. */ __attribute__ ((format (printf, 2, 3))) static inline int xasprintf(char **strp, const char *fmt, ...) { int rc = 0; va_list args; va_start(args, fmt); rc = vasprintf(strp, fmt, args); va_end(args); if ((rc == -1) && strp) *strp = NULL; return rc; } static inline bool safe_atoi_base(const char *str, int *val, int base) { char *endptr; long v; assert(base == 10 || base == 16 || base == 8); errno = 0; v = strtol(str, &endptr, base); if (errno > 0) return false; if (str == endptr) return false; if (*str != '\0' && *endptr != '\0') return false; if (v > INT_MAX || v < INT_MIN) return false; *val = v; return true; } static inline bool safe_atoi(const char *str, int *val) { return safe_atoi_base(str, val, 10); } static inline bool safe_atou_base(const char *str, unsigned int *val, int base) { char *endptr; unsigned long v; assert(base == 10 || base == 16 || base == 8); errno = 0; v = strtoul(str, &endptr, base); if (errno > 0) return false; if (str == endptr) return false; if (*str != '\0' && *endptr != '\0') return false; if ((long)v < 0) return false; *val = v; return true; } static inline bool safe_atou(const char *str, unsigned int *val) { return safe_atou_base(str, val, 10); } static inline bool safe_atod(const char *str, double *val) { char *endptr; double v; #ifdef HAVE_LOCALE_H locale_t c_locale; #endif size_t slen = strlen(str); /* We don't have a use-case where we want to accept hex for a double * or any of the other values strtod can parse */ for (size_t i = 0; i < slen; i++) { char c = str[i]; if (isdigit(c)) continue; switch(c) { case '+': case '-': case '.': break; default: return false; } } #ifdef HAVE_LOCALE_H /* Create a "C" locale to force strtod to use '.' as separator */ c_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0); if (c_locale == (locale_t)0) return false; errno = 0; v = strtod_l(str, &endptr, c_locale); freelocale(c_locale); #else /* No locale support in provided libc, assume it already uses '.' */ errno = 0; v = strtod(str, &endptr); #endif if (errno > 0) return false; if (str == endptr) return false; if (*str != '\0' && *endptr != '\0') return false; if (v != 0.0 && !isnormal(v)) return false; *val = v; return true; } char **strv_from_string(const char *string, const char *separator); char *strv_join(char **strv, const char *separator); static inline void strv_free(char **strv) { char **s = strv; if (!strv) return; while (*s != NULL) { free(*s); *s = (char*)0x1; /* detect use-after-free */ s++; } free (strv); } struct key_value_str{ char *key; char *value; }; struct key_value_double { double key; double value; }; static inline ssize_t kv_double_from_string(const char *string, const char *pair_separator, const char *kv_separator, struct key_value_double **result_out) { char **pairs; char **pair; struct key_value_double *result = NULL; ssize_t npairs = 0; unsigned int idx = 0; if (!pair_separator || pair_separator[0] == '\0' || !kv_separator || kv_separator[0] == '\0') return -1; pairs = strv_from_string(string, pair_separator); if (!pairs) return -1; for (pair = pairs; *pair; pair++) npairs++; if (npairs == 0) goto error; result = zalloc(npairs * sizeof *result); for (pair = pairs; *pair; pair++) { char **kv = strv_from_string(*pair, kv_separator); double k, v; if (!kv || !kv[0] || !kv[1] || kv[2] || !safe_atod(kv[0], &k) || !safe_atod(kv[1], &v)) { strv_free(kv); goto error; } result[idx].key = k; result[idx].value = v; idx++; strv_free(kv); } strv_free(pairs); *result_out = result; return npairs; error: strv_free(pairs); free(result); return -1; } libwacom-libwacom-2.2.0/meson.build000066400000000000000000000231421421725554000172540ustar00rootroot00000000000000project('libwacom', 'c', version: '2.2.0', license: 'MIT/Expat', default_options: [ 'c_std=gnu99', 'warning_level=2' ], meson_version: '>= 0.51.0') dir_bin = get_option('prefix') / get_option('bindir') dir_data = get_option('prefix') / get_option('datadir') / 'libwacom' dir_etc = get_option('prefix') / get_option('sysconfdir') / 'libwacom' dir_src = meson.current_source_dir() / 'libwacom' dir_src_data= meson.current_source_dir() / 'data' dir_test = meson.current_source_dir() / 'test' dir_sys_udev= get_option('prefix') / 'lib' / 'udev' dir_udev = get_option('udev-dir') if dir_udev == '' dir_udev = dir_sys_udev endif pymod = import('python') python = pymod.find_installation('python3', required: true) # Do not modify this, use symbol versioning instead. libwacom_lt_c=9 libwacom_lt_r=0 libwacom_lt_a=0 # convert ltversion to soname libwacom_so_version = '@0@.@1@.@2@'.format((libwacom_lt_c - libwacom_lt_a), libwacom_lt_a, libwacom_lt_r) # Compiler setup cc = meson.get_compiler('c') cflags = cc.get_supported_arguments( '-Wno-unused-parameter', '-Wmissing-prototypes', '-Wstrict-prototypes', '-Wundef', '-Wlogical-op', '-Wpointer-arith', '-Wuninitialized', '-Winit-self', '-Wstrict-prototypes', '-Wimplicit-fallthrough', '-Wredundant-decls', '-Wincompatible-pointer-types', '-Wformat=2', '-Wsign-compare', '-Wmissing-declarations', ) add_project_arguments(cflags, language: 'c') # Dependencies pkgconfig = import('pkgconfig') dep_gudev = dependency('gudev-1.0') dep_glib = dependency('glib-2.0') includes_include = include_directories('include') includes_src = include_directories('libwacom') # config.h config_h = configuration_data() config_h.set10('HAVE_G_MEMDUP2', cc.has_function('g_memdup2', dependencies: dep_glib)) #################### libwacom.so ######################## src_libwacom = [ 'include/linux/input-event-codes.h', 'libwacom/libwacom.h', 'libwacom/libwacomint.h', 'libwacom/libwacom.c', 'libwacom/libwacom-error.c', 'libwacom/libwacom-database.c', ] deps_libwacom = [ dep_gudev, dep_glib ] inc_libwacom = [ includes_include, includes_src, ] mapfile = dir_src / 'libwacom.sym' version_flag = '-Wl,--version-script,@0@'.format(mapfile) lib_libwacom = shared_library('wacom', src_libwacom, include_directories: inc_libwacom, dependencies: deps_libwacom, version: libwacom_so_version, link_args: version_flag, link_depends: mapfile, c_args: [ '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()), '-DDATADIR="@0@"'.format(dir_data), '-DETCDIR="@0@"'.format(dir_etc), ], gnu_symbol_visibility: 'hidden', install: true) dep_libwacom = declare_dependency(link_with: lib_libwacom) install_headers('libwacom/libwacom.h', subdir: 'libwacom-1.0/libwacom') pkgconfig.generate(filebase: 'libwacom', name: 'libwacom', description: 'Wacom model feature query library', version: meson.project_version(), subdirs: 'libwacom-1.0', requires_private: deps_libwacom, libraries: lib_libwacom) #################### data files ######################## install_subdir('data', install_dir: dir_data, strip_directory: true, exclude_files: ['wacom.example', 'layouts/README.md']) test('files-in-git', find_program('test/check-files-in-git.sh'), args: [meson.current_source_dir()], suite: ['all']) # This is a generic pytest invocation. If we end up with more than one # pytest-compatible test somewhere, we'll conveniently run that one too. pytest = find_program('pytest-3', required: false) if pytest.found() test('pytests', pytest, workdir: meson.current_source_dir(), env: ['LIBWACOM_DATA_DIR=@0@'.format(dir_src_data)]) endif ############### tools ########################### executable('libwacom-list-local-devices', 'tools/list-local-devices.c', dependencies: [dep_libwacom, dep_glib, dep_gudev], include_directories: [includes_src], install: true) tools_cflags = ['-DDATABASEPATH="@0@"'.format(dir_src_data)] updatedb = configure_file(input: 'tools/libwacom-update-db.py', output: '@BASENAME@', copy: true, install: true, install_dir: dir_bin) custom_target('hwdb', command: [python, updatedb, '--buildsystem-mode', dir_src_data], capture: true, output: '65-libwacom.hwdb', install: true, install_dir: dir_udev / 'hwdb.d') configure_file(input: 'tools/65-libwacom.rules.in', output: '65-libwacom.rules', copy: true, install: true, install_dir: dir_udev / 'rules.d') # The non-installed version of list-devices uses the git tree's data files executable('list-devices', 'tools/list-devices.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tools_cflags, install: false) # The installed version of list-devices uses the installed data files executable('libwacom-list-devices', 'tools/list-devices.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], install: true) executable('list-compatible-styli', 'tools/list-compatible-styli.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tools_cflags, install: false) install_man(configure_file(input: 'tools/libwacom-list-local-devices.man', output: '@BASENAME@.1', copy: true)) install_man(configure_file(input: 'tools/libwacom-list-devices.man', output: '@BASENAME@.1', copy: true)) showstylus_config = configuration_data() showstylus_config.set('DATADIR', dir_data) showstylus_config.set('ETCDIR', dir_etc) configure_file(output: 'libwacom-show-stylus', input: 'tools/show-stylus.py', configuration: showstylus_config, install_dir: dir_bin, install: true) ############### docs ########################### docs_feature = get_option('documentation') doxygen = find_program('doxygen', required: docs_feature) if doxygen.found() src_doxygen = [ dir_src / 'libwacom.h', ] doc_config = configuration_data() doc_config.set('PACKAGE_NAME', meson.project_name()) doc_config.set('PACKAGE_VERSION', meson.project_version()) doc_config.set('TOPSRCDIR', meson.current_source_dir()) doxyfile = configure_file(input: 'doc/doxygen.conf.in', output: 'doxygen.conf', configuration: doc_config) custom_target('doxygen', input: [doxyfile] + src_doxygen, output: ['html'], command: [doxygen, doxyfile], install: false, build_by_default: true) endif ############# tests ############################ if get_option('tests').enabled() dep_libxml = dependency('libxml-2.0', required : false) dep_dl = cc.find_library('dl') tests_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.current_source_dir())] test_load = executable('test-load', 'test/test-load.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_include, includes_src], c_args: tests_cflags, install: false) test('test-load', test_load, suite: ['all', 'valgrind']) test_dbverify = executable('test-dbverify', 'test/test-dbverify.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-dbverify', test_dbverify, suite: ['all', 'valgrind']) test_tablet_validity = executable('test-tablet-validity', 'test/test-tablet-validity.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-tablet-validity', test_tablet_validity, suite: ['all', 'valgrind']) test_stylus_validity= executable('test-stylus-validity', 'test/test-stylus-validity.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-stylus-validity', test_stylus_validity, suite: ['all', 'valgrind']) if dep_libxml.found() test_svg_validity = executable('test-svg-validity', 'test/test-tablet-svg-validity.c', dependencies: [dep_libwacom, dep_libxml, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-svg-validity', test_svg_validity, suite: ['all', 'valgrind']) endif valgrind = find_program('valgrind', required : false) if valgrind.found() valgrind_suppressions_file = dir_test / 'valgrind.suppressions' add_test_setup('valgrind', exe_wrapper: [valgrind, '--leak-check=full', '--gen-suppressions=all', '--error-exitcode=3', '--suppressions=' + valgrind_suppressions_file ], timeout_multiplier : 100) else message('valgrind not found, disabling valgrind test suite') endif pymod.find_installation(modules: ['libevdev', 'pyudev', 'pytest']) pytest = find_program('pytest-3', 'pytest') test('pytest', pytest, args: [meson.current_source_dir()], env: ['MESON_SOURCE_ROOT=@0@'.format(meson.current_source_dir())], suite: ['all']) endif # This is a non-optional test lt_version = '@0@:@1@:@2@'.format( libwacom_lt_c, libwacom_lt_r, libwacom_lt_a) test_ltversion = executable('test-ltversion', 'test/test-ltversion.c', c_args: ['-DLIBWACOM_LT_VERSION="@0@"'.format(lt_version)], install: false) test('test-ltversion', test_ltversion, suite: ['all']) ############ output files ############ configure_file(output: 'config.h', configuration: config_h) # vim: set noexpandtab tabstop=8 shiftwidth=8: libwacom-libwacom-2.2.0/meson_options.txt000066400000000000000000000006111421725554000205430ustar00rootroot00000000000000option('documentation', type: 'feature', value: 'disabled', description: 'Build doxygen documentation [default=auto]') option('udev-dir', type: 'string', value: '', description: 'udev base directory [default=$prefix/lib/udev]') option('tests', type: 'feature', value: 'enabled', description: 'Build the tests [default=enabled]') libwacom-libwacom-2.2.0/run-full-test.sh000077500000000000000000000014761421725554000202000ustar00rootroot00000000000000#!/usr/bin/env bash set -e date=`date +"%Y-%m-%d-%H.%M.%S"` builddir="build.$date" echo "####################################### running test suite" meson $builddir ninja -C $builddir test echo "####################################### running valgrind" pushd $builddir > /dev/null meson test --setup=valgrind --suite=valgrind popd > /dev/null echo "####################################### running ubsan" meson configure $builddir -Db_sanitize=undefined ninja -C $builddir test echo "####################################### running asan" meson configure $builddir -Db_sanitize=address ninja -C $builddir test echo "####################################### running scan-build" meson configure $builddir -Db_sanitize=none ninja -C $builddir scan-build echo "######## Success. Removing builddir #########" rm -rf "$buildir" libwacom-libwacom-2.2.0/test/000077500000000000000000000000001421725554000160675ustar00rootroot00000000000000libwacom-libwacom-2.2.0/test/check-files-in-git.sh000077500000000000000000000011431421725554000217670ustar00rootroot00000000000000#!/usr/bin/env bash # # Usage: check-files-in-git.sh /path/to/libwacom/ if [ -z "$top_srcdir" ]; then top_srcdir="$1" fi if [ -z "$top_srcdir" ]; then echo "Usage: `basename $0` /path/to/libwacom" exit 1 fi export GIT_DIR="$top_srcdir/.git"; if ! git ls-files >& /dev/null; then echo "Not a git tree. Skipping" exit 77 fi pushd "$top_srcdir" > /dev/null for file in data/*.tablet data/*.stylus data/layouts/*.svg; do git ls-files --error-unmatch "$file" &> /dev/null || ( echo "ERROR: File $file is not in git" && test); rc="$(($rc + $?))"; done popd > /dev/null exit $rc libwacom-libwacom-2.2.0/test/test-dbverify.c000066400000000000000000000140201421725554000210170ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #include "config.h" #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include "libwacom.h" #include static WacomDeviceDatabase *db_old; static WacomDeviceDatabase *db_new; static void rmtmpdir(const char *tmpdir) { DIR *dir; struct dirent *file; dir = opendir(tmpdir); if (!dir) return; while ((file = readdir(dir))) { char *path = NULL; if (file->d_name[0] == '.') continue; g_assert(asprintf(&path, "%s/%s", tmpdir, file->d_name) != -1); g_assert(path); g_assert(remove(path) != -1); free(path); } closedir(dir); g_assert(remove(tmpdir) != -1); } static void find_matching(gconstpointer data) { WacomDevice **devs_old, **devs_new; WacomDevice **devices, **d; WacomDevice *other; gboolean found = FALSE; int index = GPOINTER_TO_INT(data); devs_old = libwacom_list_devices_from_database(db_old, NULL); devs_new = libwacom_list_devices_from_database(db_new, NULL); /* Make sure each device in old has a device in new */ devices = devs_old; other = devs_new[index]; for (d = devices; *d; d++) { /* Two different contexts, they cannot be the same pointer */ g_assert(other != *d); if (libwacom_compare(other, *d, WCOMPARE_MATCHES) == 0) { found = TRUE; break; } } g_assert_true(found); /* Make sure each device in new has a device in old */ devices = devs_new; other = devs_old[index]; found = FALSE; for (d = devices; *d; d++) { /* devices with multiple matches will have multiple * devices in the list */ if (libwacom_compare(other, *d, WCOMPARE_MATCHES) == 0) { found = TRUE; break; } } g_assert_true(found); free(devs_old); free(devs_new); } static void test_database_size(void) { int sz1, sz2; WacomDevice **d1, **d2; d1 = libwacom_list_devices_from_database(db_old, NULL); d2 = libwacom_list_devices_from_database(db_new, NULL); g_assert_nonnull(d1); g_assert_nonnull(d2); sz1 = 0; for (WacomDevice **d = d1; *d; d++) sz1++; sz2 = 0; for (WacomDevice **d = d2; *d; d++) sz2++; g_assert_cmpint(sz1, ==, sz2); free(d1); free(d2); } static int compare_databases(WacomDeviceDatabase *new) { int i, rc; WacomDevice **devs_new, **n; g_test_add_func("/dbverify/database-sizes", test_database_size); devs_new = libwacom_list_devices_from_database(new, NULL); for (n = devs_new, i = 0 ; *n; n++, i++) { char buf[1024]; /* We need to add the test index to avoid duplicate test names */ snprintf(buf, sizeof(buf), "/dbverify/%03d/%04x:%04x-%s", i, libwacom_get_vendor_id(*n), libwacom_get_product_id(*n), libwacom_get_name(*n)); g_test_add_data_func(buf, GINT_TO_POINTER(i), find_matching); } rc = g_test_run(); free(devs_new); return rc; } /* write out the current db, read it back in, compare */ static void duplicate_database(WacomDeviceDatabase *db, const char *dirname) { WacomDevice **device, **devices; int i; devices = libwacom_list_devices_from_database(db, NULL); g_assert(devices); g_assert(*devices); for (device = devices, i = 0; *device; device++, i++) { int i; int fd; char *path = NULL; int nstyli; const int *styli; g_assert(asprintf(&path, "%s/%s.tablet", dirname, libwacom_get_match(*device)) != -1); g_assert(path); fd = open(path, O_WRONLY|O_CREAT, S_IRWXU); g_assert(fd >= 0); libwacom_print_device_description(fd, *device); close(fd); free(path); if (!libwacom_has_stylus(*device)) continue; styli = libwacom_get_supported_styli(*device, &nstyli); for (i = 0; i < nstyli; i++) { int fd_stylus; const WacomStylus *stylus; g_assert(asprintf(&path, "%s/%#x.stylus", dirname, styli[i]) != -1); stylus = libwacom_stylus_get_for_id(db, styli[i]); g_assert(stylus); fd_stylus = open(path, O_WRONLY|O_CREAT, S_IRWXU); g_assert(fd_stylus >= 0); libwacom_print_stylus_description(fd_stylus, stylus); close(fd_stylus); free(path); } } free(devices); } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; char *dirname; int rc; g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); db = load_database(); dirname = g_dir_make_tmp("tmp.dbverify.XXXXXX", NULL); g_assert(dirname); duplicate_database(db, dirname); db_new = libwacom_database_new_for_path(dirname); g_assert(db_new); db_old = db; rc = compare_databases(db_new); libwacom_database_destroy(db_new); libwacom_database_destroy(db_old); rmtmpdir(dirname); g_free(dirname); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/test/test-deprecated.c000066400000000000000000000056221421725554000213150ustar00rootroot00000000000000/* * Copyright © 2019 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #include "config.h" #include #include #include "libwacom.h" /** * The normal symbols are hidden now when linking against a new library. * We know which version they're in though so we can remap them for this * test - if we get an unresolved symbol something has gone wrong. */ asm(".symver libwacom_match_destroy,libwacom_match_destroy@LIBWACOM_0.33"); asm(".symver libwacom_match_new,libwacom_match_new@LIBWACOM_0.33"); asm(".symver libwacom_error_set,libwacom_error_set@LIBWACOM_0.33"); asm(".symver libwacom_update_match,libwacom_update_match@LIBWACOM_0.33"); asm(".symver libwacom_stylus_destroy,libwacom_stylus_destroy@LIBWACOM_0.33"); /* Only generally matches the real functions, but since they're all noops * anyway it doesn't matter that we only have generic pointers. The basic * signatures are the same. */ extern void libwacom_match_destroy(void*); void* libwacom_match_new(void *, int, int, int); void libwacom_error_set(void *error, int, char *, ...); void libwacom_stylus_destroy(void *); void libwacom_update_match(void *, const void *); int main(void) { const char *syms[] = { "libwacom_match_destroy", "libwacom_match_new", "libwacom_error_set", "libwacom_update_match", "libwacom_stylus_destroy", NULL, }; void *lib, *sym; lib = dlopen("libwacom.so", RTLD_LAZY); assert(lib != NULL); for (const char **s = syms; *s; s++) { sym = dlsym(lib, *s); assert(sym == NULL); } /* These are all noops, so all we're looking for is not getting a linker * error */ libwacom_match_destroy(NULL); libwacom_match_new(NULL, 0, 0, 0); libwacom_error_set(NULL, 0, NULL); libwacom_stylus_destroy(NULL); libwacom_update_match(NULL, NULL); return 0; } libwacom-libwacom-2.2.0/test/test-load.c000066400000000000000000000244001421725554000201270ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #include "config.h" #include #include #include #include "libwacom.h" struct fixture { WacomDeviceDatabase *db; }; static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } static void fixture_setup(struct fixture *f, gconstpointer user_data) { f->db = load_database(); } static void fixture_teardown(struct fixture *f, gconstpointer user_data) { libwacom_database_destroy(f->db); } static void check_multiple_match(WacomDevice *device) { const WacomMatch **match; int nmatches = 0; int found_bus = 0, found_vendor_id = 0, found_product_id = 0; for (match = libwacom_get_matches(device); *match; match++) { nmatches++; if (libwacom_match_get_bustype(*match) == libwacom_get_bustype(device)) found_bus = 1; if ((int)libwacom_match_get_vendor_id(*match) == libwacom_get_vendor_id(device)) found_vendor_id = 1; if ((int)libwacom_match_get_product_id(*match) == libwacom_get_product_id(device)) found_product_id = 1; } g_assert_cmpint(nmatches, ==, 2); g_assert_true(found_bus); g_assert_true(found_vendor_id); g_assert_true(found_product_id); } static void test_invalid_device(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0, 0, NULL); g_assert_null(device); } static void test_intuos4(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00bc, NULL); g_assert_nonnull(device); g_assert_cmpstr(libwacom_get_name(device), ==, "Wacom Intuos4 WL"); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" g_assert_cmpint(libwacom_get_class(device), ==, WCLASS_INTUOS4); #pragma GCC diagnostic pop g_assert_cmpint(libwacom_get_vendor_id(device), ==, 0x56a); g_assert_cmpint(libwacom_get_product_id(device), ==, 0xbc); g_assert_cmpint(libwacom_get_bustype(device), ==, WBUSTYPE_USB); g_assert_cmpint(libwacom_get_num_buttons(device), ==, 9); g_assert_true(libwacom_has_stylus(device)); g_assert_true(libwacom_is_reversible(device)); g_assert_false(libwacom_has_touch(device)); g_assert_true(libwacom_has_ring(device)); g_assert_false(libwacom_has_ring2(device)); g_assert_false(libwacom_has_touchswitch(device)); g_assert_cmpint(libwacom_get_num_strips(device), ==, 0); g_assert_cmpint(libwacom_get_integration_flags (device), ==, WACOM_DEVICE_INTEGRATED_NONE); g_assert_cmpint(libwacom_get_width(device), ==, 8); g_assert_cmpint(libwacom_get_height(device), ==, 5); check_multiple_match(device); libwacom_destroy(device); } static void test_intuos4_wl(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00b9, NULL); g_assert_nonnull(device); g_assert_true(libwacom_get_button_flag(device, 'A') & WACOM_BUTTON_RING_MODESWITCH); g_assert_true(libwacom_get_button_flag(device, 'I') & WACOM_BUTTON_OLED); #if 0 /* disabled - needs subprocesses testing but invalid data handling is better handled in a separate test suite */ /* * I4 WL has only 9 buttons, asking for a 10th button will raise a warning * in libwacom_get_button_flag() which is expected. */ printf("Following critical warning in libwacom_get_button_flag() is expected\n"); g_assert_cmpint(libwacom_get_button_flag(device, 'J'), ==, WACOM_BUTTON_NONE); #endif g_assert_cmpint(libwacom_get_ring_num_modes(device), ==, 4); libwacom_destroy(device); } static void test_cintiq24hd(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00f4, NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_ring_num_modes(device), ==, 3); g_assert_cmpint(libwacom_get_ring2_num_modes(device), ==, 3); libwacom_destroy(device); } static void test_cintiq21ux(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00cc, NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_num_strips(device), ==, 2); libwacom_destroy(device); } static void test_wacf004(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_name(f->db, "Wacom Serial Tablet WACf004", NULL); g_assert_nonnull(device); g_assert_true(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_DISPLAY); g_assert_true(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_SYSTEM); g_assert_null(libwacom_get_model_name(device)); libwacom_destroy(device); } static void test_cintiq24hdt(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00f8, NULL); const WacomMatch *match; g_assert_nonnull(device); /* 24HDT has one paired device */ match = libwacom_get_paired_device(device); g_assert_nonnull(match); g_assert_cmpint(libwacom_match_get_vendor_id(match), ==, 0x56a); g_assert_cmpint(libwacom_match_get_product_id(match), ==, 0xf6); g_assert_cmpint(libwacom_match_get_bustype(match), ==, WBUSTYPE_USB); libwacom_destroy(device); } static void test_cintiq13hd(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_name(f->db, "Wacom Cintiq 13HD", NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'A'), ==, BTN_0); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'B'), ==, BTN_1); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'C'), ==, BTN_2); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'D'), ==, BTN_3); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'E'), ==, BTN_4); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'F'), ==, BTN_5); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'G'), ==, BTN_6); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'H'), ==, BTN_7); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'I'), ==, BTN_8); g_assert_cmpstr(libwacom_get_model_name(device), ==, "DTK-1300"); libwacom_destroy(device); } static void test_bamboopen(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_name(f->db, "Wacom Bamboo Pen", NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'A'), ==, BTN_BACK); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'B'), ==, BTN_FORWARD); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'C'), ==, BTN_LEFT); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'D'), ==, BTN_RIGHT); g_assert_cmpstr(libwacom_get_model_name(device), ==, "MTE-450"); libwacom_destroy(device); } static void test_dellcanvas(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_name(f->db, "Dell Canvas 27", NULL); g_assert_nonnull(device); g_assert_true(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_DISPLAY); g_assert_false(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_SYSTEM); libwacom_destroy(device); } static void test_isdv4_4800(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x4800, NULL); g_assert_nonnull(device); g_assert_true(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_DISPLAY); g_assert_true(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_SYSTEM); g_assert_null(libwacom_get_model_name(device)); g_assert_cmpint(libwacom_get_vendor_id(device), ==, 0x56a); g_assert_cmpint(libwacom_get_product_id(device), ==, 0x4800); g_assert_cmpint(libwacom_get_num_buttons(device), ==, 0); libwacom_destroy(device); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); g_test_add("/load/0000:0000", struct fixture, NULL, fixture_setup, test_invalid_device, fixture_teardown); g_test_add("/load/056a:00bc", struct fixture, NULL, fixture_setup, test_intuos4, fixture_teardown); g_test_add("/load/056a:00b8", struct fixture, NULL, fixture_setup, test_intuos4_wl, fixture_teardown); g_test_add("/load/056a:00f4", struct fixture, NULL, fixture_setup, test_cintiq24hd, fixture_teardown); g_test_add("/load/056a:00cc", struct fixture, NULL, fixture_setup, test_cintiq21ux, fixture_teardown); g_test_add("/load/056a:00f8", struct fixture, NULL, fixture_setup, test_cintiq24hdt, fixture_teardown); g_test_add("/load/056a:0304", struct fixture, NULL, fixture_setup, test_cintiq13hd, fixture_teardown); g_test_add("/load/056a:0065", struct fixture, NULL, fixture_setup, test_bamboopen, fixture_teardown); g_test_add("/load/056a:4200", struct fixture, NULL, fixture_setup, test_dellcanvas, fixture_teardown); g_test_add("/load/056a:WACf004", struct fixture, NULL, fixture_setup, test_wacf004, fixture_teardown); g_test_add("/load/056a:4800", struct fixture, NULL, fixture_setup, test_isdv4_4800, fixture_teardown); return g_test_run(); } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/test/test-ltversion.c000066400000000000000000000006621421725554000212410ustar00rootroot00000000000000#include #include int main(void) { const char *version = LIBWACOM_LT_VERSION; int C, R, A; int rc; rc = sscanf(version, "%d:%d:%d", &C, &R, &A); assert(rc == 3); /* we don't change the soname anymore, we use symbol maps instead. So these can stay fixed until we properly break the ABI and bump the soname. */ assert(C == 9); assert(R == 0); assert(A == 0); return 0; } libwacom-libwacom-2.2.0/test/test-stylus-validity.c000066400000000000000000000301211421725554000223730ustar00rootroot00000000000000/* * Copyright © 2019 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software udo y and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include "libwacom.h" #include static const WacomStylus **all_styli; static void test_type(gconstpointer data) { const WacomStylus *stylus = data; switch (libwacom_stylus_get_type(stylus)) { case WSTYLUS_GENERAL: case WSTYLUS_INKING: case WSTYLUS_AIRBRUSH: case WSTYLUS_CLASSIC: case WSTYLUS_MARKER: case WSTYLUS_STROKE: case WSTYLUS_PUCK: case WSTYLUS_3D: case WSTYLUS_MOBILE: break; case WSTYLUS_UNKNOWN: default: g_test_fail(); } } static void test_mobile(gconstpointer data) { const WacomStylus *stylus = data; g_assert_cmpint(libwacom_stylus_get_type(stylus), ==, WSTYLUS_MOBILE); } static void test_eraser_type(gconstpointer data) { const WacomStylus *stylus = data; switch (libwacom_stylus_get_eraser_type(stylus)) { case WACOM_ERASER_NONE: case WACOM_ERASER_INVERT: case WACOM_ERASER_BUTTON: break; case WACOM_ERASER_UNKNOWN: default: g_test_fail(); } } static void test_has_eraser(gconstpointer data) { const WacomStylus *stylus = data; gboolean matching_eraser_found = FALSE; const int *ids; int count; int i; /* A stylus cannot be an eraser and have an eraser at the same time */ g_assert_true(libwacom_stylus_has_eraser(stylus)); g_assert_false(libwacom_stylus_is_eraser(stylus)); /* Search for the linked eraser */ ids = libwacom_stylus_get_paired_ids(stylus, &count); g_assert_cmpint(count, >, 0); for (i = 0; i < count; i++) { for (const WacomStylus **s = all_styli; *s; s++) { if (libwacom_stylus_get_id(*s) == ids[i] && libwacom_stylus_is_eraser(*s)) { matching_eraser_found = TRUE; break; } } } g_assert_true(matching_eraser_found); } static void test_eraser_link(const WacomStylus *stylus, gboolean linked) { gboolean matching_stylus_found = FALSE; const int *ids; int count; int i; /* A stylus cannot be an eraser and have an eraser at the same time */ g_assert_false(libwacom_stylus_has_eraser(stylus)); g_assert_true(libwacom_stylus_is_eraser(stylus)); /* Verify the link count */ ids = libwacom_stylus_get_paired_ids(stylus, &count); if (!linked) { g_assert_cmpint(count, ==, 0); return; } /* If we're supposed to be linked, ensure its to a non-eraser */ g_assert_cmpint(count, >, 0); for (i = 0; i < count; i++) { for (const WacomStylus **s = all_styli; *s; s++) { if (libwacom_stylus_get_id(*s) == ids[i] && libwacom_stylus_has_eraser(*s)) { matching_stylus_found = TRUE; break; } } } g_assert_true(matching_stylus_found); } static void test_is_eraser_unlinked(gconstpointer data) { const WacomStylus *stylus = data; test_eraser_link(stylus, FALSE); } static void test_is_eraser_linked(gconstpointer data) { const WacomStylus *stylus = data; test_eraser_link(stylus, TRUE); } static void test_eraser_inverted(gconstpointer data) { const WacomStylus *stylus = data; WacomEraserType eraser_type = libwacom_stylus_get_eraser_type (stylus); g_assert_cmpint(eraser_type, ==, WACOM_ERASER_INVERT); } static void test_eraser_button(gconstpointer data) { const WacomStylus *stylus = data; WacomEraserType eraser_type = libwacom_stylus_get_eraser_type (stylus); g_assert_cmpint(eraser_type, ==, WACOM_ERASER_BUTTON); } static void test_puck(gconstpointer data) { const WacomStylus *stylus = data; int has_wheel = libwacom_stylus_has_wheel(stylus); int has_lens = libwacom_stylus_has_lens(stylus); /* 4D mouse is the only one with neither, everything * else has either wheel or lens */ if (libwacom_stylus_get_id(stylus) == 0x94) { g_assert_false(has_wheel); g_assert_false(has_lens); } else { g_assert_true(has_wheel != has_lens); } } static void test_tilt(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_tilt = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_TILT; g_assert_true(has_tilt); } static void test_no_tilt(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_tilt = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_TILT; g_assert_false(has_tilt); } static void test_pressure(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_pressure = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_PRESSURE; g_assert_true(has_pressure); } static void test_no_pressure(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_pressure = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_PRESSURE; g_assert_false(has_pressure); } static void test_distance(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_distance = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_DISTANCE; g_assert_true(has_distance); } static void test_no_distance(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_distance = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_DISTANCE; g_assert_false(has_distance); } static void test_name(gconstpointer data) { const WacomStylus *stylus = data; g_assert_nonnull(libwacom_stylus_get_name(stylus)); } static void test_buttons(gconstpointer data) { const WacomStylus *stylus = data; g_assert_cmpint(libwacom_stylus_get_num_buttons(stylus), >, 0); } static void test_no_buttons(gconstpointer data) { const WacomStylus *stylus = data; g_assert_cmpint(libwacom_stylus_get_num_buttons(stylus), ==, 0); } static void test_mutually_paired(gconstpointer data) { const WacomStylus *stylus = data; int stylus_id; const int *stylus_pairings; int count; int i; stylus_id = libwacom_stylus_get_id(stylus); stylus_pairings = libwacom_stylus_get_paired_ids(stylus, &count); for (i = 0; i < count; i++) { for (const WacomStylus **s = all_styli; *s; s++) { gboolean match_found = FALSE; const int *pair_ids; int pair_count; int j; if (libwacom_stylus_get_id(*s) != stylus_pairings[i]) continue; pair_ids = libwacom_stylus_get_paired_ids(*s, &pair_count); for (j = 0; j < pair_count; j++) { if (pair_ids[j] == stylus_id) { match_found = TRUE; break; } } g_assert_true(match_found); } } } /* Wrapper function to make adding tests simpler. g_test requires * a unique test case name so we assemble that from the test function and * the stylus data. */ static inline void _add_test(const WacomStylus *stylus, GTestDataFunc func, const char *funcname) { char buf[128]; const char *prefix; /* tests must be test_foobar */ g_assert(strncmp(funcname, "test_", 5) == 0); prefix = &funcname[5]; snprintf(buf, 128, "/stylus/%s/%03x-%s", prefix, libwacom_stylus_get_id(stylus), libwacom_stylus_get_name(stylus)); g_test_add_data_func(buf, stylus, func); } #define add_test(stylus, func_) \ _add_test(stylus, func_, #func_) static void setup_aes_tests(const WacomStylus *stylus) { add_test(stylus, test_mobile); add_test(stylus, test_pressure); add_test(stylus, test_no_distance); if (libwacom_stylus_get_id(stylus) < 0x8000) { add_test(stylus, test_no_tilt); } else { add_test(stylus, test_tilt); } if (libwacom_stylus_is_eraser(stylus)) { add_test(stylus, test_is_eraser_unlinked); add_test(stylus, test_eraser_button); } } static void setup_emr_tests(const WacomStylus *stylus) { switch (libwacom_stylus_get_id(stylus)) { case 0xffffd: add_test(stylus, test_pressure); add_test(stylus, test_no_distance); add_test(stylus, test_no_tilt); break; case 0x006: case 0x096: case 0x097: add_test(stylus, test_no_pressure); add_test(stylus, test_distance); add_test(stylus, test_no_tilt); break; case 0x007: case 0x017: case 0x094: case 0x806: add_test(stylus, test_no_pressure); add_test(stylus, test_distance); add_test(stylus, test_tilt); break; case 0x021: case 0x8e2: case 0x862: add_test(stylus, test_pressure); add_test(stylus, test_distance); add_test(stylus, test_no_tilt); break; default: add_test(stylus, test_pressure); add_test(stylus, test_tilt); add_test(stylus, test_distance); break; } if (libwacom_stylus_is_eraser(stylus)) { add_test(stylus, test_is_eraser_linked); add_test(stylus, test_eraser_inverted); } } static void setup_tests(const WacomStylus *stylus) { add_test(stylus, test_name); add_test(stylus, test_type); /* Button checks */ switch (libwacom_stylus_get_type(stylus)) { case WSTYLUS_PUCK: add_test(stylus, test_puck); add_test(stylus, test_buttons); break; case WSTYLUS_INKING: case WSTYLUS_STROKE: add_test(stylus, test_no_buttons); break; default: switch (libwacom_stylus_get_id(stylus)) { case 0x885: case 0x8051: add_test(stylus, test_no_buttons); break; default: add_test(stylus, test_buttons); } } /* Technology-specific tests */ if (libwacom_stylus_get_type(stylus) == WSTYLUS_MOBILE) { setup_aes_tests(stylus); } else { setup_emr_tests(stylus); } if (libwacom_stylus_has_eraser(stylus)) add_test(stylus, test_has_eraser); if (libwacom_stylus_is_eraser(stylus)) add_test(stylus, test_eraser_type); add_test(stylus, test_mutually_paired); } /** * Return a NULL-terminated list of all styli. * * libwacom only gives us the styli per-device so this is a bit more * complicated than it should be. */ static const WacomStylus ** assemble_styli(WacomDeviceDatabase *db) { WacomDevice **devices = libwacom_list_devices_from_database(db, NULL); const WacomStylus **styli; int *ids = NULL; int nids = 0; int sz = 0; g_assert(devices); for (WacomDevice **d = devices; *d; d++) { const int *styli; int nstyli; styli = libwacom_get_supported_styli(*d, &nstyli); /* Make sure our array is large enough to accommodate for all new styli. Simpler than reallocing after every entry */ if (nstyli > sz - nids) { sz = nids + nstyli; ids = realloc(ids, sz * sizeof(*ids)); g_assert(ids); } /* For each stylus in the current device, add it to ids[] if it's not already in there */ for (int i = 0; i < nstyli; i++) { gboolean found = FALSE; for (int j = 0; j < nids && !found; j++) { if (ids[j] == styli[i]) found = TRUE; } if (!found) ids[nids++] = styli[i]; } } styli = calloc(nids + 1, sizeof(*styli)); for (int i = 0; i < nids; i++) { styli[i] = libwacom_stylus_get_for_id (db, ids[i]); g_assert(styli[i]); } free(devices); free(ids); return styli; } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; int rc; g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); db = load_database(); all_styli = assemble_styli(db); for (const WacomStylus **s = all_styli; *s; s++) setup_tests(*s); rc = g_test_run(); free(all_styli); libwacom_database_destroy (db); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/test/test-tablet-svg-validity.c000066400000000000000000000237401421725554000231110ustar00rootroot00000000000000/* * Copyright ?? 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Olivier Fourdan */ #include "config.h" #include #include #include #include #include #include #include #include "libwacom.h" static xmlNodePtr verify_has_sub (xmlNodePtr cur, char *sub) { cur = cur->xmlChildrenNode; while (cur != NULL) { xmlChar *prop; /* Descend the tree if dealing with a group */ if (xmlStrcmp(cur->name, (const xmlChar *) "g") == 0) { xmlNodePtr sub_node; sub_node = verify_has_sub (cur, sub); if (sub_node != NULL) return sub_node; } prop = xmlGetProp(cur, (xmlChar *) "id"); if (prop) { int status = xmlStrcmp(prop, (const xmlChar *) sub); xmlFree(prop); if (status == 0) return cur; } cur = cur->next; } return NULL; } static gboolean class_found (gchar **classes, gchar *value) { gchar **ptr = classes; while (*ptr) { if (strcmp (*ptr++, value) == 0) return TRUE; } return FALSE; } static void verify_has_class (xmlNodePtr cur, const gchar *expected) { xmlChar *prop; gchar **classes_present; gchar **classes_expected; gchar **ptr; prop = xmlGetProp (cur, (xmlChar *) "class"); g_assert (prop != NULL); g_assert (strlen((const char *) prop) > 0); classes_present = g_strsplit ((const gchar *) prop, " ", -1); classes_expected = g_strsplit (expected, " ", -1); ptr = classes_expected; while (*ptr) g_assert (class_found (classes_present, *ptr++)); g_strfreev (classes_present); g_strfreev (classes_expected); xmlFree (prop); } static void check_button (xmlNodePtr cur, const WacomDevice *device, char button, gchar *type) { char *sub; char *class; xmlNodePtr node; WacomButtonFlags flags; /* Check ID */ sub = g_strdup_printf ("%s%c", type, button); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); /* Check class */ flags = libwacom_get_button_flag(device, button); if (flags & WACOM_BUTTON_MODESWITCH) class = g_strdup_printf ("%c ModeSwitch %s", button, type); else class = g_strdup_printf ("%c %s", button, type); verify_has_class (node, class); g_free (class); } static void check_touchstrip (xmlNodePtr cur, gchar *id) { char *sub; char *class; xmlNodePtr node; node = verify_has_sub (cur, id); g_assert (node != NULL); class = g_strdup_printf ("%s %s", id, "TouchStrip"); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sUp", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sUp %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sDown", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sDown %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sUp", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sUp %s Leader", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sDown", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sDown %s Leader", id, id); verify_has_class (node, class); g_free (class); } static void check_touchring (xmlNodePtr cur, gchar *id) { char *sub; char *class; xmlNodePtr node; node = verify_has_sub (cur, id); g_assert (node != NULL); class = g_strdup_printf ("%s %s", id, "TouchRing"); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sCCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCCW %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCW %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sCCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCCW %s Leader", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCW %s Leader", id, id); verify_has_class (node, class); g_free (class); } struct fixture { xmlDocPtr doc; xmlNodePtr root; }; static void test_filename(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; const char *filename; filename = libwacom_get_layout_filename(device); if (libwacom_get_num_buttons(device) > 0) { g_assert_nonnull(filename); g_assert_cmpstr(filename, !=, ""); } } static void test_svg(struct fixture *f, gconstpointer data) { g_assert_nonnull(f->doc); g_assert_nonnull(f->root); g_assert_cmpint(xmlStrcmp(f->root->name, (const xmlChar*) "svg"), ==, 0); } static void test_dimensions(struct fixture *f, gconstpointer data) { xmlChar *prop; /* width is provided */ prop = xmlGetProp(f->root, (xmlChar *) "width") ; g_assert_nonnull(prop); xmlFree(prop); /* height is provided */ prop = xmlGetProp(f->root, (xmlChar *) "height") ; g_assert_nonnull(prop); xmlFree(prop); } static void test_rings(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; if (libwacom_has_ring(device)) check_touchring(f->root, "Ring"); if (libwacom_has_ring2(device)) check_touchring(f->root, "Ring2"); } static void test_strips(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; if (libwacom_get_num_strips(device) > 0) check_touchstrip(f->root, "Strip"); if (libwacom_get_num_strips(device) > 1) check_touchstrip(f->root, "Strip2"); } static void test_buttons(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; int num_buttons = libwacom_get_num_buttons (device); for (char button = 'A'; button < 'A' + num_buttons; button++) { check_button(f->root, device, button, "Button"); check_button(f->root, device, button, "Label"); check_button(f->root, device, button, "Leader"); } } static void setup_svg(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; const char *filename = libwacom_get_layout_filename(device); xmlDocPtr doc; if (!filename) return; doc = xmlParseFile(filename); f->doc = doc; f->root = doc ? xmlDocGetRootElement(doc) : NULL; } static void teardown_svg(struct fixture *f, gconstpointer data) { if (f->doc) xmlFreeDoc(f->doc); } typedef void (*testfunc)(struct fixture *f, gconstpointer d); /* Wrapper function to make adding tests simpler. g_test requires * a unique test case name so we assemble that from the test function and * the tablet data. */ static inline void _add_test(WacomDevice *device, testfunc func, const char *funcname) { char buf[128]; static int count; /* guarantee unique test case names */ const char *prefix; /* tests must be test_foobar */ g_assert(strncmp(funcname, "test_", 5) == 0); prefix = &funcname[5]; snprintf(buf, 128, "/svg/%s/%03d/%04x:%04x-%s", prefix, ++count, libwacom_get_vendor_id(device), libwacom_get_product_id(device), libwacom_get_name(device)); g_test_add(buf, struct fixture, device, setup_svg, func, teardown_svg); } #define add_test(device_, func_) \ _add_test(device_, func_, #func_) #define add_test(device_, func_) \ _add_test(device_, func_, #func_) static void setup_tests(WacomDevice *device) { const char *name; name = libwacom_get_name(device); if (strcmp(name, "Generic") == 0) return; add_test(device, test_filename); if (!libwacom_get_layout_filename(device)) return; add_test(device, test_svg); add_test(device, test_dimensions); if (libwacom_get_num_buttons(device) > 0) add_test(device, test_buttons); if (libwacom_has_ring(device) || libwacom_has_ring2(device)) add_test(device, test_rings); if (libwacom_get_num_strips(device) > 0) add_test(device, test_strips); } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **devices; int rc; g_test_init(&argc, &argv, NULL); db = load_database(); devices = libwacom_list_devices_from_database(db, NULL); g_assert(devices); g_assert(*devices); for (WacomDevice **device = devices; *device; device++) setup_tests(*device); rc = g_test_run(); free(devices); libwacom_database_destroy (db); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/test/test-tablet-validity.c000066400000000000000000000235531421725554000223160ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software udo y and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #include "config.h" #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include "libwacom.h" #include typedef int (*NumModesFn) (const WacomDevice *device); static gboolean buttons_have_direction(WacomDevice *device) { char button; int num_buttons; num_buttons = libwacom_get_num_buttons (device); if (num_buttons == 0) return TRUE; for (button = 'A'; button < 'A' + num_buttons; button++) { WacomButtonFlags flags; flags = libwacom_get_button_flag(device, button); if (!(flags & WACOM_BUTTON_DIRECTION)) return FALSE; } return TRUE; } static gboolean match_mode_switch(WacomDevice *device, NumModesFn get_num_modes, WacomButtonFlags flag) { char button; int num_buttons; int num_switches; int num_modes; num_buttons = libwacom_get_num_buttons (device); num_modes = get_num_modes (device); num_switches = 0; for (button = 'A'; button < 'A' + num_buttons; button++) { WacomButtonFlags flags; flags = libwacom_get_button_flag(device, button); if (flags & flag) num_switches++; } /* * If we have more than one mode-switch button, then the * number of modes must match the number of mode-switch buttons. */ if (num_switches > 1 && num_modes != num_switches) return FALSE; /* * If we have more than one mode, then we should find at least * one mode-switch button. */ if (num_modes > 1 && num_switches == 0) return FALSE; return TRUE; } static gboolean tablet_has_lr_buttons(WacomDevice *device) { int nleft = 0; int nright = 0; int num_buttons; char button; num_buttons = libwacom_get_num_buttons (device); for (button = 'A'; button < 'A' + num_buttons; button++) { WacomButtonFlags f = libwacom_get_button_flag(device, button); if (f & WACOM_BUTTON_POSITION_LEFT) nleft++; if (f & WACOM_BUTTON_POSITION_RIGHT) nright++; } if (nleft > 0 || nright > 0) return TRUE; return FALSE; } static void test_class(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; WacomClass cls; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" cls = libwacom_get_class(device); #pragma GCC diagnostic pop switch (cls) { case WCLASS_BAMBOO: case WCLASS_ISDV4: case WCLASS_PEN_DISPLAYS: case WCLASS_GRAPHIRE: case WCLASS_REMOTE: case WCLASS_INTUOS: case WCLASS_INTUOS2: case WCLASS_INTUOS3: case WCLASS_INTUOS4: case WCLASS_INTUOS5: case WCLASS_CINTIQ: break; default: g_test_fail(); break; } } static void test_name(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_nonnull(libwacom_get_name(device)); g_assert_cmpstr(libwacom_get_name(device), !=, ""); } static void assert_vidpid(WacomBusType bus, int vid, int pid) { switch (bus) { case WBUSTYPE_SERIAL: g_assert_cmpint(vid, >=, 0); g_assert_cmpint(pid, >=, 0); break; case WBUSTYPE_USB: if (vid == 0x056A) g_assert_cmpint(pid, !=, 0x84); /* wireless dongle */ g_assert_cmpint(vid, >, 0); g_assert_cmpint(pid, >, 0); break; case WBUSTYPE_BLUETOOTH: case WBUSTYPE_I2C: g_assert_cmpint(vid, >, 0); g_assert_cmpint(pid, >, 0); break; case WBUSTYPE_UNKNOWN: default: g_test_fail(); break; } } static void test_vidpid(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; WacomBusType bus = libwacom_get_bustype(device); assert_vidpid(bus, libwacom_get_vendor_id(device), libwacom_get_product_id(device)); } static void test_matches(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_nonnull(libwacom_get_match(device)); g_assert_nonnull(libwacom_get_matches(device)); } static void test_matches_vidpid(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; const WacomMatch **match = libwacom_get_matches(device); while (*match) { WacomBusType bus = libwacom_match_get_bustype(*match); assert_vidpid(bus, libwacom_match_get_vendor_id(*match), libwacom_match_get_product_id(*match)); match++; } } static void test_dimensions(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_width(device), >, 0); g_assert_cmpint(libwacom_get_height(device), >, 0); } static void test_buttons(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_num_buttons(device), >=, 0); g_assert_true(buttons_have_direction(device)); if (libwacom_is_reversible(device) && libwacom_get_num_buttons(device) > 0) g_assert_true(tablet_has_lr_buttons(device)); } static void test_styli(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; int nstyli; const int *styli = libwacom_get_supported_styli(device, &nstyli); g_assert_cmpint(nstyli, >, 0); g_assert_nonnull(styli); } static void test_realstylus(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; int nstyli; const int *styli = libwacom_get_supported_styli(device, &nstyli); for (int i = 0; i < nstyli; i++) { g_assert_cmpint(styli[i], !=, WACOM_STYLUS_FALLBACK_ID); g_assert_cmpint(styli[i], !=, WACOM_ERASER_FALLBACK_ID); } } static void test_rings(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_ring_num_modes(device), >=, 0); g_assert_cmpint(libwacom_get_ring2_num_modes(device), >=, 0); if (libwacom_has_ring(device)) g_assert_true(match_mode_switch(device, libwacom_get_ring_num_modes, WACOM_BUTTON_RING_MODESWITCH)); if (libwacom_has_ring2(device)) g_assert_true(match_mode_switch(device, libwacom_get_ring2_num_modes, WACOM_BUTTON_RING2_MODESWITCH)); } static void test_strips(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_num_strips(device), >=, 0); g_assert_cmpint(libwacom_get_strips_num_modes(device), >=, 0); if (libwacom_get_num_strips(device) > 0) g_assert_true(match_mode_switch(device, libwacom_get_strips_num_modes, WACOM_BUTTON_TOUCHSTRIP_MODESWITCH)); } /* Wrapper function to make adding tests simpler. g_test requires * a unique test case name so we assemble that from the test function and * the tablet data. */ static inline void _add_test(WacomDevice *device, GTestDataFunc func, const char *funcname) { char buf[128]; static int count; /* guarantee unique test case names */ const char *prefix; /* tests must be test_foobar */ g_assert(strncmp(funcname, "test_", 5) == 0); prefix = &funcname[5]; snprintf(buf, 128, "/tablet/%s/%03d/%04x:%04x-%s", prefix, ++count, libwacom_get_vendor_id(device), libwacom_get_product_id(device), libwacom_get_name(device)); g_test_add_data_func(buf, device, func); } #define add_test(device_, func_) \ _add_test(device_, func_, #func_) static void setup_tests(WacomDevice *device) { const char *name; WacomClass cls; name = libwacom_get_name(device); if (strcmp(name, "Generic") == 0) return; add_test(device, test_class); add_test(device, test_name); add_test(device, test_vidpid); add_test(device, test_matches); add_test(device, test_matches_vidpid); add_test(device, test_buttons); add_test(device, test_styli); add_test(device, test_rings); add_test(device, test_strips); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" cls = libwacom_get_class(device); #pragma GCC diagnostic pop /* ISDv4 are built-in, they may be of varying size */ if (cls != WCLASS_ISDV4 && cls != WCLASS_REMOTE) add_test(device, test_dimensions); /* FIXME: we force the generic pen for these, should add a test */ if (libwacom_has_stylus(device)) add_test(device, test_styli); switch (cls) { case WCLASS_INTUOS: case WCLASS_INTUOS2: case WCLASS_INTUOS3: case WCLASS_INTUOS4: case WCLASS_INTUOS5: case WCLASS_CINTIQ: add_test(device, test_realstylus); break; default: break; } } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **devices; int rc; g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); db = load_database(); devices = libwacom_list_devices_from_database(db, NULL); g_assert(devices); g_assert(*devices); for (WacomDevice **device = devices; *device; device++) setup_tests(*device); rc = g_test_run(); libwacom_database_destroy(db); free(devices); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/test/test_data_files.py000077500000000000000000000047401421725554000216030ustar00rootroot00000000000000#!/usr/bin/env python3 # # Run with pytest import configparser import os import re from pathlib import Path WACOM_RECEIVER_USBIDS = [ (0x56a, 0x84), ] def datadir(): return Path(os.getenv('MESON_SOURCE_ROOT') or '.') / 'data' def layoutsdir(): return datadir() / 'layouts' def pytest_generate_tests(metafunc): # for any function that takes a "tabletfile" argument return the path to # a tablet file if 'tabletfile' in metafunc.fixturenames: metafunc.parametrize('tabletfile', [f for f in datadir().glob('*.tablet')]) def test_device_match(tabletfile): config = configparser.ConfigParser() config.read(tabletfile) # Match format must be bus:vid:pid:name # where bus is 'usb' or 'bluetooth' # where vid/pid is a lowercase hex # where name is optional for match in config['Device']['DeviceMatch'].split(';'): if not match or match == 'generic': continue bus, vid, pid = match.split(':')[:3] # skip the name part of the match assert bus in ['usb', 'bluetooth', 'i2c', 'serial'], f'{tabletfile}: unknown bus type' assert re.match('[0-9a-f]{4}', vid), f'{tabletfile}: {vid} must be lowercase hex' assert re.match('[0-9a-f]{4}', pid), f'{tabletfile}: {pid} must be lowercase hex' def test_no_receiver_id(tabletfile): config = configparser.ConfigParser(strict=True) # Don't convert to lowercase config.optionxform = lambda option: option config.read(tabletfile) receivers = ['usb:{:04x}:{:04x}'.format(*r) for r in WACOM_RECEIVER_USBIDS] for match in config['Device']['DeviceMatch'].split(';'): assert match not in receivers def test_svg_exists(tabletfile): config = configparser.ConfigParser(strict=True) # Don't convert to lowercase config.optionxform = lambda option: option config.read(tabletfile) try: svg = config['Device']['Layout'] assert (layoutsdir() / svg).exists() except KeyError: pass def test_button_evcodes(tabletfile): config = configparser.ConfigParser(strict=True) # Don't convert to lowercase config.optionxform = lambda option: option config.read(tabletfile) try: nbuttons = int(config['Features']['Buttons']) str = config['Buttons']['EvdevCodes'] codes = [c for c in str.split(";") if c] # drop empty strings from trailing semicolons assert len(codes) == nbuttons, "Number of buttons mismatches the EvdevCodes" except KeyError: pass libwacom-libwacom-2.2.0/test/test_udev_rules.py000066400000000000000000000115061421725554000216600ustar00rootroot00000000000000#!/usr/bin/env python3 # # This test will only work where /dev/uinput is available. # This test will reload the hwdb and udev rules # # Execute via pytest, it will: # - load all data files and extract the matches # - create a uinput device for each match # - check if that device has the udev properties set we expect import configparser import libevdev import os from pathlib import Path import pyudev import pytest import time import logging import sys @pytest.fixture(scope='session', autouse=True) def systemd_reload(): '''Make sure our hwdb and udev rules are up-to-date''' import subprocess subprocess.run(['systemd-hwdb', 'update']) subprocess.run(['systemctl', 'daemon-reload']) def pytest_generate_tests(metafunc): # for any function that takes a "tablet" argument return a Tablet object # filled with exactly one DeviceMatch from the list of all .tablet files # in the data dir. Where the tablet also has touch/buttons generate an # extra Finger or Pad device if 'tablet' in metafunc.fixturenames: datadir = Path(os.getenv('MESON_SOURCE_ROOT') or '.') / 'data' tablets = [] for f in datadir.glob('*.tablet'): config = configparser.ConfigParser() config.read(f) name = config['Device']['Name'] want_pad = config['Device'].get('Buttons', 0) want_finger = config['Features'].get('Touch') == 'true' integrated_in = config['Device'].get('IntegratedIn', '').split(';') is_touchscreen = set(integrated_in) & set(['Display', 'System']) for match in config['Device']['DeviceMatch'].split(';'): if not match or match == 'generic': continue bus, vid, pid = match.split(':')[:3] # skip the name part of the match if bus not in ['usb', 'bluetooth']: continue vid = int(vid, 16) pid = int(pid, 16) if bus == 'usb': bus = 0x3 elif bus == 'bluetooth': bus = 0x5 class Tablet(object): def __init__(self, name, bus, vid, pid, is_touchscreen=False): self.name = name self.bus = bus self.vid = vid self.pid = pid self.is_touchscreen = is_touchscreen tablets.append(Tablet(name, bus, vid, pid)) if want_pad: tablets.append(Tablet(name + ' Pad', bus, vid, pid)) if want_finger: tablets.append(Tablet(name + ' Finger', bus, vid, pid, is_touchscreen)) # our tablets list now becomes the list of arguments passed to the # test functions taking a 'tablet' argument - one-by-one. So where # tablets contains 10 entries, our test function will be called 10 # times. metafunc.parametrize('tablet', tablets) @pytest.fixture def uinput(tablet): dev = libevdev.Device() dev.name = tablet.name dev.id = { 'vendor': tablet.vid, 'product': tablet.pid, 'bustype': tablet.bus } # Our rules match on pid/vid, so purposely make this look like a # non-tablet to verify that our rules apply anyway and not others dev.enable(libevdev.EV_REL.REL_X) dev.enable(libevdev.EV_REL.REL_Y) dev.enable(libevdev.EV_KEY.BTN_LEFT) dev.enable(libevdev.EV_KEY.BTN_RIGHT) try: uinput = dev.create_uinput_device() # We'll need the is_touchscreen later, so let's hide it in the # uinput device to pass it to the actual test try: uinput.is_touchscreen = tablet.is_touchscreen except AttributeError: pass time.sleep(0.3) return uinput except OSError: raise pytest.skip() @pytest.mark.skipif(sys.platform != 'linux', reason='This test requires udev') def test_hwdb_files(uinput): logging.debug('{:04x}:{:04x} {}'.format(uinput.id['vendor'], uinput.id['product'], uinput.name)) udev = pyudev.Context() dev = pyudev.Devices.from_device_file(udev, uinput.devnode) props = list(dev.properties) # convert to list for better error messages assert 'ID_INPUT' in props assert dev.properties['ID_INPUT'] == '1' assert 'ID_INPUT_TABLET' in props assert dev.properties['ID_INPUT_TABLET'] == '1' assert 'ID_INPUT_JOYSTICK' not in props if 'Finger' in uinput.name: if uinput.is_touchscreen: assert 'ID_INPUT_TOUCHSCREEN' in props else: assert 'ID_INPUT_TOUCHPAD' in props # For the Wacom Bamboo Pad we check for "Pad Pad" in the device name if 'Pad' in uinput.name: if 'Wacom Bamboo Pad' not in uinput.name or 'Pad Pad' in uinput.name: assert 'ID_INPUT_TABLET_PAD' in props libwacom-libwacom-2.2.0/test/valgrind.suppressions000066400000000000000000000005571421725554000224030ustar00rootroot00000000000000{ Memcheck:Leak ... fun:g_type_register_static } { Memcheck:Leak ... fun:g_type_register_fundamental } { Memcheck:Leak ... fun:g_malloc0 } { Memcheck:Leak fun:malloc ... fun:g_get_language_names_with_category } libwacom-libwacom-2.2.0/tools/000077500000000000000000000000001421725554000162505ustar00rootroot00000000000000libwacom-libwacom-2.2.0/tools/65-libwacom.rules.in000066400000000000000000000022051421725554000217550ustar00rootroot00000000000000# udev rules for libwacom supported devices ACTION=="remove", GOTO="libwacom_end" KERNEL!="event[0-9]*", GOTO="libwacom_end" # HUION and GAOMON consumer and system control devices are not tablets. ATTRS{name}=="* Consumer Control", GOTO="libwacom_end" ATTRS{name}=="* System Control", GOTO="libwacom_end" # Match all serial wacom tablets with a serial ID starting with WACf ENV{ID_BUS}=="tty|pnp", ATTRS{id}=="WACf*", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1", GOTO="libwacom_end" ENV{ID_BUS}=="tty|pnp", ATTRS{id}=="FUJ*", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1", GOTO="libwacom_end" # use the /sys/class/input/eventXXX/device/modalias as lookup key, prefixed # by libwacom:: # This lookup key is a contract between the udev rules and the hwdb entries. # It is not considered public API and may change. KERNELS=="input*", \ IMPORT{builtin}="hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'" # We can't unset properties through the hwdb but we can set them to zero. # So let's have a rule that converts the 0 properties to unset ones. ENV{ID_INPUT_JOYSTICK}=="0", ENV{ID_INPUT_JOYSTICK}="" LABEL="libwacom_end" libwacom-libwacom-2.2.0/tools/clean_svg.py000077500000000000000000000222361421725554000205730ustar00rootroot00000000000000#! /usr/bin/env python # # Copyright (c) 2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Author: Joaquim Rocha # import sys from argparse import ArgumentParser from xml.etree import ElementTree as ET NAMESPACE = "http://www.w3.org/2000/svg" BRACKETS_NAMESPACE = "{" + NAMESPACE + "}" def human_round(number): """ Round to closest .5 """ return round(number * 2) / 2.0 def traverse_and_clean(node): """ Clean the tree recursively """ # Remove any non-SVG namespace attributes for key in node.attrib.keys(): if key.startswith("{"): del node.attrib[key] if node.tag == "g" and "id" in node.attrib: apply_id_and_class_from_group(node) del node.attrib["id"] if "style" in node.attrib: if node.tag == "text": node.attrib["style"] = "text-anchor:start;" elif node.tag != "svg": del node.attrib["style"] remove_transform_if_exists(node) round_attrib(node, "d", "x", "y", "rx", "ry", "width", "height", "cx", "cy", "r") for child in node: traverse_and_clean(child) def round_attrib(node, *attrs): for attr_name in attrs: attr_value = node.attrib.get(attr_name) if attr_value is None: continue if attr_name == "d": d = attr_value.replace(",", " ") values = [round_if_number(value) for value in d.split()] node.attrib[attr_name] = " ".join(values) else: node.attrib[attr_name] = round_if_number(attr_value) def round_if_number(value): try: value = human_round(float(value.strip())) except ValueError: pass return str(value) def remove_non_svg_nodes_and_strip_namespace(root): if root.tag.startswith(BRACKETS_NAMESPACE): root.tag = root.tag[len(BRACKETS_NAMESPACE):] 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) def remove_transform_if_exists(node): TRANSLATE = "translate" MATRIX = "matrix" transform = node.attrib.get("transform") if transform is None: return transform = transform.strip() if transform.startswith(TRANSLATE): values = transform[len(TRANSLATE) + 1:-1].split(",") try: x, y = float(values[0]), float(values[1]) except Exception: return apply_translation(node, 1, 0, 0, 1, x, y) elif transform.startswith(MATRIX): values = transform[len(MATRIX) + 1:-1].split(",") try: a, b, c, d, e, f = [float(value.strip()) for value in values] except Exception: return apply_translation(node, a, b, c, d, e, f) apply_scaling(node, a, d) del node.attrib["transform"] def apply_translation(node, a, b, c, d, e, f): x_attr, y_attr = "x", "y" if node.tag == "circle": x_attr, y_attr = "cx", "cy" elif node.tag == "path": apply_translation_to_path(node, e, f) return try: x, y = float(node.attrib[x_attr]), float(node.attrib[y_attr]) new_x = x * a + y * c + 1 * e new_y = x * b + y * d + 1 * f node.attrib[x_attr] = str(new_x) node.attrib[y_attr] = str(new_y) except Exception: pass def apply_translation_to_path(node, x, y): d = node.attrib.get("d") if d is None: return d = d.replace(",", " ").split() m_init_index = 0 length = len(d) m_end_index = length operation = "M" i = 0 while i < length: value = d[i] if value.lower() == "m": operation = value m_init_index = i + 1 elif len(value) == 1 and value.isalpha(): m_end_index = i break i += 1 for i in range(m_init_index, m_end_index, 2): d[i] = str(float(d[i]) + x) d[i + 1] = str(float(d[i + 1]) + y) if operation == "m": break node.attrib["d"] = ( " ".join(d[:m_init_index]) + " " + " ".join(d[m_init_index:m_end_index]) + " ".join(d[m_end_index:]) ) def apply_scaling(node, x, y): w_attr, h_attr = "width", "height" if node.tag == "circle": r = float(node.attrib.get("r", 1.0)) node.attrib["r"] = str(r * x) try: w = float(node.attrib[w_attr]) h = float(node.attrib[h_attr]) node.attrib[w_attr] = str(w * x) node.attrib[h_attr] = str(h * y) except Exception: pass def to_string_rec(node, level=0): indent = "\n" + level * " " tag_name = node.tag # Remove 'defs' element. This cannot be done in the traverse_and_clean # because somehow it is never found if tag_name == "defs": return "" # use a list to put id and class as the first arguments attribs = [] for attr in get_node_attrs_sorted(node): attr_value = node.attrib.get(attr) if attr_value is not None: attribs.append(indent + ' %s="%s"' % (attr, attr_value)) string = indent + "<" + tag_name + "".join(attribs) if len(node) or node.text: string += ">" if not node.text or not node.text.strip(): node.text = indent + " " else: string += node.text if list(node): for child in get_node_children_sorted(node): string += to_string_rec(child, level + 1) string += indent string += "" % tag_name else: string += " />" return string def custom_tag_sort(arg): """ Use as key functon in sorted(). Pre-fix arg tag name by a number in the sort order we want. Anything unspecified defaults to 9. i.e. circle -> 1circle, thus sorts lower than other tags. """ tag_order = {"title": 0, "rect": 1, "circle": 2, "path": 3} return str(tag_order.get(arg.tag, 9)) + arg.tag def get_node_children_sorted(node): return sorted(node, key=custom_tag_sort) def custom_attr_sort(arg): """ Same as custom_tag_sort but for a node's attributes """ attr_order = { "id": 0, "class": 1, "x": 2, "y": 3, "cx": 4, "cy": 5, "width": 6, "height": 7, } return str(attr_order.get(arg, 9)) + arg def get_node_attrs_sorted(node): attrs = node.attrib.keys() return sorted(attrs, key=custom_attr_sort) def apply_id_and_class_from_group(group_node): button_assigned = label_assigned = path_assigned = False _id = group_node.attrib.get("id") if _id is None: return for child in group_node.getchildren(): if child.tag == "rect" or child.tag == "circle": if button_assigned: continue child.attrib["id"] = "Button%s" % _id child.attrib["class"] = "%s Button" % _id button_assigned = True elif child.tag == "path": if path_assigned: continue child.attrib["id"] = "Leader%s" % _id child.attrib["class"] = "%s Leader" % _id path_assigned = True elif child.tag == "text": if label_assigned: continue child.attrib["id"] = "Label%s" % _id child.attrib["class"] = "%s Label" % _id child.text = _id label_assigned = True def to_string(root): header = """ """ return header + to_string_rec(root) def clean_svg(root, tabletname): remove_non_svg_nodes_and_strip_namespace(root) title = root.find("title") if title is not None: title.text = tabletname root.attrib["xmlns"] = "http://www.w3.org/2000/svg" traverse_and_clean(root) if __name__ == "__main__": parser = ArgumentParser(description="Clean SVG files for libwacom") parser.add_argument( "filename", nargs=1, type=str, help="SVG file to clean", metavar="FILE" ) parser.add_argument( "tabletname", nargs=1, type=str, help="The name of the tablet", metavar="TABLET_NAME", ) args = parser.parse_args() ET.register_namespace("", NAMESPACE) try: tree = ET.parse(args.filename[0]) except Exception as e: sys.stderr.write(str(e) + "\n") sys.exit(1) root = tree.getroot() clean_svg(root, args.tabletname[0]) print(to_string(root)) libwacom-libwacom-2.2.0/tools/libwacom-list-devices.man000066400000000000000000000012401421725554000231300ustar00rootroot00000000000000.TH libwacom-list-devices 1 .SH NAME libwacom-list-devices - utility to list supported tablet devices .SH SYNOPSIS .B libwacom-list-devices [--format=yaml|datafile] .SH DESCRIPTION libwacom-list-devices is a debug utility to list all supported tablet devices identified by libwacom. It is usually used to check whether a libwacom installation is correct after adding custom data files. .SH OPTIONS .TP 8 .B --format=yaml|datafile Sets the output format to be used. If \fIyaml\fR, the output format is YAML comprising the bus type, vendor and product ID and the device name. If \fIdatafile\fR, the output format matches the tablet data files. The default is \fIyaml\fR. libwacom-libwacom-2.2.0/tools/libwacom-list-local-devices.man000066400000000000000000000024041421725554000242230ustar00rootroot00000000000000.TH libwacom-list-local-devices 1 .SH NAME libwacom-list-local-devices - utility to list tablet devices .SH SYNOPSIS .B libwacom-list-local-devices [--format=oneline|datafile] [--database /path/to/datadir] .SH DESCRIPTION libwacom-list-local-devices is a debug utility to list connected tablet devices identified by libwacom. It is usually used to check whether a libwacom data file is correct, present and/or applies to a specific device. .SH OPTIONS .TP 8 .B --format=oneline|datafile Sets the output format to be used. If \fIoneline\fR, the output format is a one-line format comprising the device name and the event nodes. If \fIdatafile\fR, the output format matches the tablet data files. The default is \fIoneline\fR. .TP 8 .B --database /path/do/datadir Sets the data directory path to be used. This is only useful when testing against a modified data path. Only libwacom developers need this option. .SH NOTES The Linux kernel provides separate \fI/dev/input/event*\fR nodes for the stylus, the pad and the touch part of the tablet. These devices nodes are listed as part of this tool's output. .PP This tool is unable to distinguish between multiple identical devices. Only one such device will be listed, with all event nodes from all devices that are of the same type. libwacom-libwacom-2.2.0/tools/libwacom-update-db.py000077500000000000000000000216251421725554000222730ustar00rootroot00000000000000#!/usr/bin/env python3 # # Copyright © 2012 Red Hat, Inc. # # Permission to use, copy, modify, distribute, and sell this software # and its documentation for any purpose is hereby granted without # fee, provided that the above copyright notice appear in all copies # and that both that copyright notice and this permission notice # appear in supporting documentation, and that the name of Red Hat # not be used in advertising or publicity pertaining to distribution # of the software without specific, written prior permission. Red # Hat makes no representations about the suitability of this software # for any purpose. It is provided "as is" without express or implied # warranty. # # THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN # NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. import argparse import configparser import sys import subprocess from pathlib import Path class Tablet(object): def __init__(self, name, bus, vid, pid): self.name = name self.bus = bus self.vid = vid # Note: this is a string self.pid = pid # Note: this is a string self.has_touch = False self.has_pad = False self.is_touchscreen = False # We have everything in strings so let's use that for sorting later # This will sort bluetooth before usb but meh self.cmpstr = ":".join((bus, vid, pid, name)) def __lt__(self, other): return self.cmpstr < other.cmpstr def __str__(self): return f"{self.bus}:{self.vid}:{self.pid}:{self.name}" class HWDBFile: def __init__(self): self.tablets = [] def _tablet_entry(self, tablet): vid = tablet.vid.upper() pid = tablet.pid.upper() bustypes = { "usb": "0003", "bluetooth": "0005", } # serial devices have their own rules, so we skip anything that # doesn't have straight conversion try: bus = bustypes[tablet.bus] except KeyError: return match = f"b{bus}v{vid}p{pid}" entries = {"*": ["ID_INPUT=1", "ID_INPUT_TABLET=1", "ID_INPUT_JOYSTICK=0"]} if tablet.has_touch: if tablet.is_touchscreen: entries["* Finger"] = ["ID_INPUT_TOUCHSCREEN=1"] else: entries["* Finger"] = ["ID_INPUT_TOUCHPAD=1"] if tablet.has_pad: entries["* Pad"] = ["ID_INPUT_TABLET_PAD=1"] # Non-Wacom devices often have a Keyboard node instead of a Pad # device. If they share the USB ID with the tablet, we likely just # assigned ID_INPUT_TABLET to a keyboard device - and libinput refuses # to accept those. # Let's add a generic exclusion rule for anything we know of with a # Keyboard device name. if int(vid, 16) != 0x56a: entries["* Keyboard"] = ["ID_INPUT_TABLET=0"] lines = [f"# {tablet.name}"] for name, props in entries.items(): lines.append(f"libwacom:name:{name}:input:{match}*") lines.extend([f" {p}" for p in props]) lines.append("") return "\n".join(lines) def print(self, file=sys.stdout): header = ( "# hwdb entries for libwacom supported devices", "# This file is generated by libwacom, do not edit", "#", "# The lookup key is a contract between the udev rules and the hwdb entries.", "# It is not considered public API and may change.", "", ) print("\n".join(header), file=file) for t in self.tablets: entry = self._tablet_entry(t) if entry: print(entry, file=file) class TabletDatabase: def __init__(self, path): self.path = path self.tablets = sorted(self._load(path)) def _load(self, path): for file in Path(path).glob("*.tablet"): config = configparser.ConfigParser() config.read(file) for match in config["Device"]["DeviceMatch"].split(";"): # ignore trailing semicolons if not match or match == "generic": continue # For hwdb entries we don't care about name matches, # it'll just result in duplicate ID_INPUT_TABLET assignments # for tablets with re-used usbids and that doesn't matter try: bus, vid, pid, *_ = match.split(":") except ValueError as e: print(f"Failed to process match {match}") raise e name = config["Device"]["Name"] t = Tablet(name, bus, vid, pid) try: t.has_touch = config["Features"]["Touch"].lower() == "true" if t.has_touch: integration = config["Device"]["IntegratedIn"] t.is_touchscreen = ( "Display" in integration or "System" in integration ) except KeyError: pass try: t.has_pad = int(config["Features"]["Buttons"]) > 0 except KeyError: pass yield t # Guess the udev directory based on path. For the case of /usr/share, the # udev directory is probably in /usr/lib so let's fallback to that. def find_udev_base_dir(path): for parent in path.parents: d = Path(parent / "udev" / "rules.d") if d.exists(): return d.parent # /usr/share but also any custom prefixes for parent in path.parents: d = Path(parent / "lib" / "udev" / "rules.d") if d.exists(): return d.parent raise FileNotFoundError(path) # udev's behaviour is that where a file X exists in two locations, # only the highest-precedence one is read. Our files are supposed to be # complimentary to the system-installed ones (which default to # 65-libwacom.hwdb) so we bump the filename number. def guess_hwdb_filename(basedir): hwdbdir = Path(basedir) / "hwdb.d" if not hwdbdir.exists(): raise FileNotFoundError(hwdbdir) fname = hwdbdir / f"66-libwacom.hwdb" return fname if __name__ == "__main__": parser = argparse.ArgumentParser( description="Update the system according to the current set of tablet data files" ) parser.add_argument( "path", nargs="?", type=Path, default='/etc/libwacom', help="Directory to load .tablet files from" ) # buildsystem-mode is what we use from meson, it changes the # the behavior to just generate the file and print it parser.add_argument( "--buildsystem-mode", action="store_true", default=False, help="be used by the build system only", ) parser.add_argument( "--skip-systemd-hwdb-update", action="store_true", default=False, help="Do not run systemd-hwdb --update (Note: updates to tablet files will not be reflected in udev)", ) parser.add_argument( "--udev-base-dir", type=Path, default=None, help="The udev base directory (default: guessed based on the path)", ) ns = parser.parse_args() db = TabletDatabase(ns.path) hwdb = HWDBFile() # Bamboo and Intuos devices connected to the system via Wacom's # Wireless Accessory Kit appear to udev as having the PID of the # dongle rather than the actual tablet. Make sure we properly tag # such devices. # # We only really care about this in the official hwdb files if ns.buildsystem_mode: wwak = Tablet("Wacom Wireless Accessory Kit", "usb", "056A", "0084") wwak.has_pad = True wwak.has_touch = True hwdb.tablets.append(wwak) hwdb.tablets.extend(db.tablets) if ns.buildsystem_mode: hwdb.print() else: try: udevdir = ns.udev_base_dir or find_udev_base_dir(ns.path) hwdbfile = guess_hwdb_filename(udevdir) with open(hwdbfile, "w") as fd: hwdb.print(fd) print(f"New hwdb file: {hwdbfile}") if not ns.skip_systemd_hwdb_update: subprocess.run(["systemd-hwdb", "update"], capture_output=True, check=True, text=True) print("Finished, please unplug and replug your device") except PermissionError as e: print(f"{e}, please run me as root") except FileNotFoundError as e: print(f"Unable to find udev base directory: {e}") except subprocess.CalledProcessError as e: print(f"hwdb update failed: {e.stderr}") libwacom-libwacom-2.2.0/tools/list-compatible-styli.c000066400000000000000000000053201421725554000226460ustar00rootroot00000000000000/* * Copyright © 2019 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer */ #include "config.h" #define _GNU_SOURCE #include #include #include #include #include #include "libwacom.h" static void print_device_info(const WacomDeviceDatabase *db, const WacomDevice *device) { const int *styli; int nstyli; printf("- name: '%s'\n", libwacom_get_name(device)); if (libwacom_get_model_name(device)) { printf(" model: '%s'\n", libwacom_get_model_name(device)); } if (!libwacom_has_stylus(device)) { printf(" styli: [] # no styli defined\n"); return; } printf(" styli:\n"); styli = libwacom_get_supported_styli(device, &nstyli); for (int i = 0; i < nstyli; i++) { const WacomStylus *s; char id[64]; s = libwacom_stylus_get_for_id(db, styli[i]); snprintf(id, sizeof(id), "0x%x", libwacom_stylus_get_id(s)); printf(" - { id: %*s'%s', name: '%s' }\n", (int)(7 - strlen(id)), " ", id, libwacom_stylus_get_name(s)); } } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **list, **p; if (argc > 1) { printf("Usage: %s [--help] - list compatible styli\n", basename(argv[0])); return !!(strcmp(argv[1], "--help")); } db = libwacom_database_new_for_path(DATABASEPATH); list = libwacom_list_devices_from_database(db, NULL); if (!list) { fprintf(stderr, "Failed to load device database.\n"); return 1; } for (p = list; *p; p++) print_device_info(db, (WacomDevice *)*p); libwacom_database_destroy(db); return 0; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/tools/list-devices.c000066400000000000000000000106321421725554000210110ustar00rootroot00000000000000/* * Copyright © 2012-2021 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer */ #include "config.h" #define _GNU_SOURCE #include #include #include #include #include #include #include #include "libwacom.h" static enum output_format { YAML, DATAFILE, } output_format = YAML; static void print_device_info (WacomDevice *device, WacomBusType bus_type_filter, enum output_format format) { const WacomMatch **match; for (match = libwacom_get_matches(device); *match; match++) { WacomBusType type = libwacom_match_get_bustype(*match); if (type != bus_type_filter) continue; if (format == DATAFILE) { libwacom_print_device_description(STDOUT_FILENO, device); dprintf(STDOUT_FILENO, "---------------------------------------------------------------\n"); } else { const char *name = libwacom_get_name(device); const char *bus = "unknown"; int vid = libwacom_match_get_vendor_id(*match); int pid = libwacom_match_get_product_id(*match); switch (type) { case WBUSTYPE_USB: bus = "usb"; break; case WBUSTYPE_SERIAL: bus = "serial"; break; case WBUSTYPE_BLUETOOTH:bus = "bluetooth"; break; case WBUSTYPE_I2C: bus = "i2c"; break; default: break; } /* We don't need to print the generic device */ if (vid != 0 || pid != 0 || bus != 0) printf("- { bus: '%s',%*svid: '0x%04x', pid: '0x%04x', name: '%s' }\n", bus, (int)(10 - strlen(bus)), " ", vid, pid, name); } } } static gboolean check_format(const gchar *option_name, const gchar *value, gpointer data, GError **error) { if (g_str_equal(value, "datafile")) output_format = DATAFILE; else if (g_str_equal(value, "yaml")) output_format = YAML; else return FALSE; return TRUE; } static GOptionEntry opts[] = { { "format", 0, 0, G_OPTION_ARG_CALLBACK, check_format, N_("Output format, one of 'yaml', 'datafile'"), NULL }, { .long_name = NULL} }; int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **list, **p; GOptionContext *context; GError *error = NULL; context = g_option_context_new (NULL); g_option_context_add_main_entries (context, opts, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) { if (error != NULL) { fprintf (stderr, "%s\n", error->message); g_error_free (error); } return EXIT_FAILURE; } g_option_context_free (context); #ifdef DATABASEPATH db = libwacom_database_new_for_path(DATABASEPATH); #else db = libwacom_database_new(); #endif list = libwacom_list_devices_from_database(db, NULL); if (!list) { fprintf(stderr, "Failed to load device database.\n"); return 1; } if (output_format == YAML) printf("devices:\n"); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_USB, output_format); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_BLUETOOTH, output_format); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_I2C, output_format); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_SERIAL, output_format); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_UNKNOWN, output_format); libwacom_database_destroy (db); free(list); return 0; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/tools/list-local-devices.c000066400000000000000000000147351421725554000221110ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer */ #include "config.h" #include #include #include #include #include #include #include #include #include #include "libwacom.h" static enum output_format { YAML, DATAFILE, } output_format = YAML; static char *database_path; /* Most devices have 2-3 event nodes, let's have a wrapper struct to group * those together */ struct tablet { WacomDevice *dev; GList *nodes; /* list of "/dev/input/eventX" paths */ }; static void tablet_destroy(gpointer data) { struct tablet *d = data; libwacom_destroy(d->dev); g_list_free_full(d->nodes, free); }; /* Note: users with two identical devices plugged in will see * as one device with twice the event nodes. * Too niche to worry about. */ static gint tablet_compare(gconstpointer list_elem, gconstpointer dev) { const struct tablet *t = list_elem; return libwacom_compare(t->dev, dev, WCOMPARE_MATCHES); } static void print_node(gpointer data, gpointer user_data) { printf("# - %s\n", (char *)data); } static void tablet_print(gpointer data, gpointer user_data) { struct tablet *d = data; printf("# %s\n", libwacom_get_name(d->dev)); g_list_foreach(d->nodes, print_node, NULL); libwacom_print_device_description(STDOUT_FILENO, d->dev); printf("---------------------------------------------------------------\n"); } static void print_str(gpointer data, gpointer user_data) { printf(" - %s\n", (char *)data); } static void tablet_print_yaml(gpointer data, gpointer user_data) { struct tablet *d = data; const char *name = libwacom_get_name(d->dev); const char *bus = "unknown"; int vid = libwacom_get_vendor_id(d->dev); int pid = libwacom_get_product_id(d->dev); WacomBusType bustype = libwacom_get_bustype(d->dev); switch (bustype) { case WBUSTYPE_USB: bus = "usb"; break; case WBUSTYPE_SERIAL: bus = "serial"; break; case WBUSTYPE_BLUETOOTH:bus = "bluetooth"; break; case WBUSTYPE_I2C: bus = "i2c"; break; default: break; } printf("- name: '%s'\n", name); printf(" bus: '%s'\n", bus); printf(" vid: '0x%04x'\n", vid); printf(" pid: '0x%04x'\n", pid); printf(" nodes: \n"); g_list_foreach(d->nodes, print_str, NULL); } static void check_if_udev_tablet(const char *path) { GUdevClient *client; GUdevDevice *device; const char * const subsystems[] = { "input", NULL }; client = g_udev_client_new (subsystems); device = g_udev_client_query_by_device_file (client, path); if (device && g_udev_device_get_property_as_boolean (device, "ID_INPUT_TABLET")) { fprintf(stderr, "%s is a tablet but not supported by libwacom\n", path); } g_object_unref (device); g_object_unref (client); } static gboolean check_format(const gchar *option_name, const gchar *value, gpointer data, GError **error) { if (g_str_equal(value, "datafile")) output_format = DATAFILE; else if (g_str_equal(value, "yaml")) output_format = YAML; else return FALSE; return TRUE; } static GOptionEntry opts[] = { {"database", 0, 0, G_OPTION_ARG_FILENAME, &database_path, N_("Path to device database"), NULL }, { "format", 0, 0, G_OPTION_ARG_CALLBACK, check_format, N_("Output format, one of 'yaml', 'datafile'"), NULL }, { .long_name = NULL} }; int main(int argc, char **argv) { WacomDeviceDatabase *db; GOptionContext *context; GError *error; GList *tabletlist = NULL; GDir *dir = NULL; const char *filename; context = g_option_context_new (NULL); g_option_context_add_main_entries (context, opts, NULL); error = NULL; if (!g_option_context_parse (context, &argc, &argv, &error)) { if (error != NULL) { fprintf (stderr, "%s\n", error->message); g_error_free (error); } return EXIT_FAILURE; } g_option_context_free (context); if (database_path) { db = libwacom_database_new_for_path(database_path); g_free (database_path); } else { db = libwacom_database_new(); } if (!db) { fprintf(stderr, "Failed to initialize device database\n"); return EXIT_FAILURE; } dir = g_dir_open("/dev/input", 0, &error); if (!dir) { fprintf(stderr, "%s\n", error->message); g_error_free(error); return EXIT_FAILURE; } while ((filename = g_dir_read_name(dir))) { WacomDevice *dev; char fname[PATH_MAX]; GList *found; if (!g_str_has_prefix(filename, "event")) continue; snprintf(fname, sizeof(fname), "/dev/input/%s", filename); dev = libwacom_new_from_path(db, fname, WFALLBACK_NONE, NULL); if (!dev) { check_if_udev_tablet(fname); continue; } found = g_list_find_custom(tabletlist, dev, tablet_compare); if (found) { struct tablet *t = found->data; t->nodes = g_list_append(t->nodes, g_strdup(fname)); libwacom_destroy(dev); } else { struct tablet *t = g_new0(struct tablet, 1); t->dev = dev; t->nodes = g_list_append(t->nodes, g_strdup(fname)); tabletlist = g_list_append(tabletlist, t); } } if (!tabletlist) { fprintf(stderr, "Failed to find any devices known to libwacom.\n"); } else { switch (output_format) { case DATAFILE: g_list_foreach(tabletlist, tablet_print, NULL); break; case YAML: printf("devices:\n"); g_list_foreach(tabletlist, tablet_print_yaml, NULL); break; default: abort(); } } g_list_free_full(tabletlist, tablet_destroy); g_dir_close(dir); libwacom_database_destroy (db); return 0; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-2.2.0/tools/show-stylus.py000077500000000000000000000137431421725554000211560ustar00rootroot00000000000000#!/usr/bin/env python3 # # Permission to use, copy, modify, distribute, and sell this software # and its documentation for any purpose is hereby granted without # fee, provided that the above copyright notice appear in all copies # and that both that copyright notice and this permission notice # appear in supporting documentation, and that the name of Red Hat # not be used in advertising or publicity pertaining to distribution # of the software without specific, written prior permission. Red # Hat makes no representations about the suitability of this software # for any purpose. It is provided "as is" without express or implied # warranty. # # THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN # NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # import argparse import configparser import sys from pathlib import Path try: import libevdev import pyudev except ModuleNotFoundError as e: print("Error: {}".format(str(e)), file=sys.stderr) print( "One or more python modules are missing. Please install those " "modules and re-run this tool." ) sys.exit(1) class Ansi: clearline = "\x1B[K" @classmethod def up(cls, count): return f"\x1B[{count}A" @classmethod def down(cls, count): return f"\x1B[{count}B" @classmethod def right(cls, count): return f"\x1B[{count}C" @classmethod def left(cls, count): return f"\x1B[{count}D" def die(msg): print(msg, file=sys.stderr) sys.exit(1) def select_device(): context = pyudev.Context() for device in context.list_devices(subsystem="input"): if device.get("ID_INPUT_TABLET", 0) and (device.device_node or "").startswith( "/dev/input/event" ): name = device.get("NAME", None) if not name: name = next( (p.get("NAME") for p in device.ancestors if p.get("NAME")), "unknown", ) print("Using {}: {}".format(name or "unknown", device.device_node)) return device.device_node die("Unable to find a tablet device.") def record_events(ns): with open(ns.device_path, "rb") as fd: d = libevdev.Device(fd) if not d.absinfo[libevdev.EV_ABS.ABS_MISC]: die("Device only supports generic styli") tool_bits = set( c for c in libevdev.EV_KEY.codes if c.name.startswith("BTN_TOOL_") ) styli = {} # dict of (type, serial) = proximity_state current_type, current_serial = 0, 0 in_prox = False dirty = False print("Please put tool in proximity") try: while True: for event in d.events(): if event.matches(libevdev.EV_ABS.ABS_MISC): if event.value != 0: current_type = event.value dirty = True elif event.matches(libevdev.EV_MSC.MSC_SERIAL): if event.value != 0: current_serial = event.value & 0xFFFFFFFF dirty = True elif event.code in tool_bits: # print(f'Current prox: {event.value}') in_prox = event.value != 0 dirty = True elif event.matches(libevdev.EV_SYN.SYN_REPORT) and dirty: dirty = False print( f"{Ansi.up(len(styli))}{Ansi.left(10000)}{Ansi.clearline}", end="", ) styli[(current_type, current_serial)] = in_prox for s, prox in styli.items(): tid, serial = s print( f"Tool id {tid:#x} serial {serial:#x} in-proximity: {prox} " ) except KeyboardInterrupt: print("Terminating") return [s[0] for s in styli.keys()] def load_data_files(): lookup_paths = ( ("./data/",), ("@DATADIR@", "@ETCDIR@"), ("/usr/share/libwacom/", "/etc/libwacom/"), ) stylusfiles = [] for paths in lookup_paths: stylusfiles = [] for p in paths: files = list(Path(p).glob("*.stylus")) if files: stylusfiles += files if any(stylusfiles): break else: die("Unable to find a libwacom.stylus data file") print(f'Using stylus file(s): {", ".join([str(s) for s in stylusfiles])}') styli = {} for path in stylusfiles: config = configparser.ConfigParser() config.read(path) for stylus_id in config.sections(): sid = int(stylus_id, 16) styli[sid] = config[stylus_id].get("Group", sid) return styli def main(): parser = argparse.ArgumentParser(description="Tool to show tablet stylus ids") parser.add_argument( "device_path", nargs="?", default=None, help="Path to the /dev/input/event node" ) ns = parser.parse_args() if not ns.device_path: ns.device_path = select_device() all_styli = load_data_files() styli = record_events(ns) groups = [] for sid in styli: if sid in all_styli: groups.append(all_styli[sid]) else: print(f"Unknown stylus id {sid:#x}. New entry needed") print("Suggested line for .tablet file:") print(f"Styli={';'.join(set(groups))}") if __name__ == "__main__": try: main() except PermissionError: die("Insufficient permissions, please run me as root")