Hello community, here is the log from the commit of package libinput for openSUSE:Factory checked in at 2020-08-15 21:18:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libinput (Old) and /work/SRC/openSUSE:Factory/.libinput.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libinput" Sat Aug 15 21:18:00 2020 rev:91 rq:826189 version:1.16.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libinput/libinput.changes 2020-08-12 10:56:45.968751383 +0200 +++ /work/SRC/openSUSE:Factory/.libinput.new.3399/libinput.changes 2020-08-15 21:18:09.911547478 +0200 @@ -1,0 +2,6 @@ +Thu Aug 13 07:04:28 UTC 2020 - Jan Engelhardt <[email protected]> + +- Update to release 1.16.1 + * Add original MX Master to inverted-horizontal-wheel-having mice + +------------------------------------------------------------------- Old: ---- libinput-1.16.0.tar.xz libinput-1.16.0.tar.xz.sig New: ---- libinput-1.16.1.tar.xz libinput-1.16.1.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libinput.spec ++++++ --- /var/tmp/diff_new_pack.7hOzCE/_old 2020-08-15 21:18:10.819547996 +0200 +++ /var/tmp/diff_new_pack.7hOzCE/_new 2020-08-15 21:18:10.819547996 +0200 @@ -20,7 +20,7 @@ Name: libinput %define lname libinput10 -Version: 1.16.0 +Version: 1.16.1 Release: 0 Summary: Input device and event processing library License: MIT ++++++ libinput-1.16.0.tar.xz -> libinput-1.16.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/include/linux/freebsd/input-event-codes.h new/libinput-1.16.1/include/linux/freebsd/input-event-codes.h --- old/libinput-1.16.0/include/linux/freebsd/input-event-codes.h 2020-08-03 08:38:54.637407300 +0200 +++ new/libinput-1.16.1/include/linux/freebsd/input-event-codes.h 2020-08-13 05:50:03.604642400 +0200 @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ /* * Input event codes * @@ -439,10 +439,12 @@ #define KEY_TITLE 0x171 #define KEY_SUBTITLE 0x172 #define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174 +#define KEY_FULL_SCREEN 0x174 /* AC View Toggle */ +#define KEY_ZOOM KEY_FULL_SCREEN #define KEY_MODE 0x175 #define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 +#define KEY_ASPECT_RATIO 0x177 /* HUTRR37: Aspect */ +#define KEY_SCREEN KEY_ASPECT_RATIO #define KEY_PC 0x178 /* Media Select Computer */ #define KEY_TV 0x179 /* Media Select TV */ #define KEY_TV2 0x17a /* Media Select Cable */ @@ -604,6 +606,7 @@ #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ +#define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ @@ -646,6 +649,86 @@ */ #define KEY_DATA 0x277 #define KEY_ONSCREEN_KEYBOARD 0x278 +/* Electronic privacy screen control */ +#define KEY_PRIVACY_SCREEN_TOGGLE 0x279 + +/* Select an area of screen to be copied */ +#define KEY_SELECTIVE_SCREENSHOT 0x27a + +/* + * Some keyboards have keys which do not have a defined meaning, these keys + * are intended to be programmed / bound to macros by the user. For most + * keyboards with these macro-keys the key-sequence to inject, or action to + * take, is all handled by software on the host side. So from the kernel's + * point of view these are just normal keys. + * + * The KEY_MACRO# codes below are intended for such keys, which may be labeled + * e.g. G1-G18, or S1 - S30. The KEY_MACRO# codes MUST NOT be used for keys + * where the marking on the key does indicate a defined meaning / purpose. + * + * The KEY_MACRO# codes MUST also NOT be used as fallback for when no existing + * KEY_FOO define matches the marking / purpose. In this case a new KEY_FOO + * define MUST be added. + */ +#define KEY_MACRO1 0x290 +#define KEY_MACRO2 0x291 +#define KEY_MACRO3 0x292 +#define KEY_MACRO4 0x293 +#define KEY_MACRO5 0x294 +#define KEY_MACRO6 0x295 +#define KEY_MACRO7 0x296 +#define KEY_MACRO8 0x297 +#define KEY_MACRO9 0x298 +#define KEY_MACRO10 0x299 +#define KEY_MACRO11 0x29a +#define KEY_MACRO12 0x29b +#define KEY_MACRO13 0x29c +#define KEY_MACRO14 0x29d +#define KEY_MACRO15 0x29e +#define KEY_MACRO16 0x29f +#define KEY_MACRO17 0x2a0 +#define KEY_MACRO18 0x2a1 +#define KEY_MACRO19 0x2a2 +#define KEY_MACRO20 0x2a3 +#define KEY_MACRO21 0x2a4 +#define KEY_MACRO22 0x2a5 +#define KEY_MACRO23 0x2a6 +#define KEY_MACRO24 0x2a7 +#define KEY_MACRO25 0x2a8 +#define KEY_MACRO26 0x2a9 +#define KEY_MACRO27 0x2aa +#define KEY_MACRO28 0x2ab +#define KEY_MACRO29 0x2ac +#define KEY_MACRO30 0x2ad + +/* + * Some keyboards with the macro-keys described above have some extra keys + * for controlling the host-side software responsible for the macro handling: + * -A macro recording start/stop key. Note that not all keyboards which emit + * KEY_MACRO_RECORD_START will also emit KEY_MACRO_RECORD_STOP if + * KEY_MACRO_RECORD_STOP is not advertised, then KEY_MACRO_RECORD_START + * should be interpreted as a recording start/stop toggle; + * -Keys for switching between different macro (pre)sets, either a key for + * cycling through the configured presets or keys to directly select a preset. + */ +#define KEY_MACRO_RECORD_START 0x2b0 +#define KEY_MACRO_RECORD_STOP 0x2b1 +#define KEY_MACRO_PRESET_CYCLE 0x2b2 +#define KEY_MACRO_PRESET1 0x2b3 +#define KEY_MACRO_PRESET2 0x2b4 +#define KEY_MACRO_PRESET3 0x2b5 + +/* + * Some keyboards have a buildin LCD panel where the contents are controlled + * by the host. Often these have a number of keys directly below the LCD + * intended for controlling a menu shown on the LCD. These keys often don't + * have any labeling so we just name them KEY_KBD_LCD_MENU# + */ +#define KEY_KBD_LCD_MENU1 0x2b8 +#define KEY_KBD_LCD_MENU2 0x2b9 +#define KEY_KBD_LCD_MENU3 0x2ba +#define KEY_KBD_LCD_MENU4 0x2bb +#define KEY_KBD_LCD_MENU5 0x2bc #define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0 @@ -805,7 +888,8 @@ #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_MACHINE_COVER 0x10 /* set = cover closed */ +#define SW_MAX 0x10 #define SW_CNT (SW_MAX+1) /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/include/linux/linux/input-event-codes.h new/libinput-1.16.1/include/linux/linux/input-event-codes.h --- old/libinput-1.16.0/include/linux/linux/input-event-codes.h 2020-08-03 08:38:54.638407200 +0200 +++ new/libinput-1.16.1/include/linux/linux/input-event-codes.h 2020-08-13 05:50:03.605642300 +0200 @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ /* * Input event codes * @@ -439,10 +439,12 @@ #define KEY_TITLE 0x171 #define KEY_SUBTITLE 0x172 #define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174 +#define KEY_FULL_SCREEN 0x174 /* AC View Toggle */ +#define KEY_ZOOM KEY_FULL_SCREEN #define KEY_MODE 0x175 #define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 +#define KEY_ASPECT_RATIO 0x177 /* HUTRR37: Aspect */ +#define KEY_SCREEN KEY_ASPECT_RATIO #define KEY_PC 0x178 /* Media Select Computer */ #define KEY_TV 0x179 /* Media Select TV */ #define KEY_TV2 0x17a /* Media Select Cable */ @@ -604,6 +606,7 @@ #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ +#define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ @@ -646,6 +649,86 @@ */ #define KEY_DATA 0x277 #define KEY_ONSCREEN_KEYBOARD 0x278 +/* Electronic privacy screen control */ +#define KEY_PRIVACY_SCREEN_TOGGLE 0x279 + +/* Select an area of screen to be copied */ +#define KEY_SELECTIVE_SCREENSHOT 0x27a + +/* + * Some keyboards have keys which do not have a defined meaning, these keys + * are intended to be programmed / bound to macros by the user. For most + * keyboards with these macro-keys the key-sequence to inject, or action to + * take, is all handled by software on the host side. So from the kernel's + * point of view these are just normal keys. + * + * The KEY_MACRO# codes below are intended for such keys, which may be labeled + * e.g. G1-G18, or S1 - S30. The KEY_MACRO# codes MUST NOT be used for keys + * where the marking on the key does indicate a defined meaning / purpose. + * + * The KEY_MACRO# codes MUST also NOT be used as fallback for when no existing + * KEY_FOO define matches the marking / purpose. In this case a new KEY_FOO + * define MUST be added. + */ +#define KEY_MACRO1 0x290 +#define KEY_MACRO2 0x291 +#define KEY_MACRO3 0x292 +#define KEY_MACRO4 0x293 +#define KEY_MACRO5 0x294 +#define KEY_MACRO6 0x295 +#define KEY_MACRO7 0x296 +#define KEY_MACRO8 0x297 +#define KEY_MACRO9 0x298 +#define KEY_MACRO10 0x299 +#define KEY_MACRO11 0x29a +#define KEY_MACRO12 0x29b +#define KEY_MACRO13 0x29c +#define KEY_MACRO14 0x29d +#define KEY_MACRO15 0x29e +#define KEY_MACRO16 0x29f +#define KEY_MACRO17 0x2a0 +#define KEY_MACRO18 0x2a1 +#define KEY_MACRO19 0x2a2 +#define KEY_MACRO20 0x2a3 +#define KEY_MACRO21 0x2a4 +#define KEY_MACRO22 0x2a5 +#define KEY_MACRO23 0x2a6 +#define KEY_MACRO24 0x2a7 +#define KEY_MACRO25 0x2a8 +#define KEY_MACRO26 0x2a9 +#define KEY_MACRO27 0x2aa +#define KEY_MACRO28 0x2ab +#define KEY_MACRO29 0x2ac +#define KEY_MACRO30 0x2ad + +/* + * Some keyboards with the macro-keys described above have some extra keys + * for controlling the host-side software responsible for the macro handling: + * -A macro recording start/stop key. Note that not all keyboards which emit + * KEY_MACRO_RECORD_START will also emit KEY_MACRO_RECORD_STOP if + * KEY_MACRO_RECORD_STOP is not advertised, then KEY_MACRO_RECORD_START + * should be interpreted as a recording start/stop toggle; + * -Keys for switching between different macro (pre)sets, either a key for + * cycling through the configured presets or keys to directly select a preset. + */ +#define KEY_MACRO_RECORD_START 0x2b0 +#define KEY_MACRO_RECORD_STOP 0x2b1 +#define KEY_MACRO_PRESET_CYCLE 0x2b2 +#define KEY_MACRO_PRESET1 0x2b3 +#define KEY_MACRO_PRESET2 0x2b4 +#define KEY_MACRO_PRESET3 0x2b5 + +/* + * Some keyboards have a buildin LCD panel where the contents are controlled + * by the host. Often these have a number of keys directly below the LCD + * intended for controlling a menu shown on the LCD. These keys often don't + * have any labeling so we just name them KEY_KBD_LCD_MENU# + */ +#define KEY_KBD_LCD_MENU1 0x2b8 +#define KEY_KBD_LCD_MENU2 0x2b9 +#define KEY_KBD_LCD_MENU3 0x2ba +#define KEY_KBD_LCD_MENU4 0x2bb +#define KEY_KBD_LCD_MENU5 0x2bc #define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0 @@ -805,7 +888,8 @@ #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_MACHINE_COVER 0x10 /* set = cover closed */ +#define SW_MAX 0x10 #define SW_CNT (SW_MAX+1) /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/meson.build new/libinput-1.16.1/meson.build --- old/libinput-1.16.0/meson.build 2020-08-03 08:38:54.639407200 +0200 +++ new/libinput-1.16.1/meson.build 2020-08-13 05:50:03.606642200 +0200 @@ -1,5 +1,5 @@ project('libinput', 'c', - version : '1.16.0', + version : '1.16.1', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.45.0') @@ -785,6 +785,7 @@ 'test/litest-device-keyboard-razer-blade-stealth-videoswitch.c', 'test/litest-device-lid-switch.c', 'test/litest-device-lid-switch-surface3.c', + 'test/litest-device-logitech-media-keyboard-elite.c', 'test/litest-device-logitech-trackball.c', 'test/litest-device-nexus4-touch-screen.c', 'test/litest-device-magic-trackpad.c', @@ -798,6 +799,7 @@ 'test/litest-device-ms-surface-cover.c', 'test/litest-device-protocol-a-touch-screen.c', 'test/litest-device-qemu-usb-tablet.c', + 'test/litest-device-sony-vaio-keys.c', 'test/litest-device-synaptics-x220.c', 'test/litest-device-synaptics-hover.c', 'test/litest-device-synaptics-i2c.c', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/quirks/30-vendor-logitech.quirks new/libinput-1.16.1/quirks/30-vendor-logitech.quirks --- old/libinput-1.16.0/quirks/30-vendor-logitech.quirks 2020-08-03 08:38:54.639407200 +0200 +++ new/libinput-1.16.1/quirks/30-vendor-logitech.quirks 2020-08-13 05:50:03.607642400 +0200 @@ -46,6 +46,33 @@ MatchProduct=0x4011 AttrPalmPressureThreshold=400 +[Logitech MX Master] +MatchVendor=0x46D +MatchProduct=0x4041 +ModelInvertHorizontalScrolling=1 +[Logitech MX Master] +MatchVendor=0x46D +MatchProduct=0x4060 +ModelInvertHorizontalScrolling=1 +[Logitech MX Master] +MatchVendor=0x46D +MatchProduct=0x4071 +ModelInvertHorizontalScrolling=1 + +# MX Master has a different PID on bluetooth +[Logitech MX Master] +MatchVendor=0x46D +MatchProduct=0xB012 +ModelInvertHorizontalScrolling=1 +[Logitech MX Master] +MatchVendor=0x46D +MatchProduct=0xB017 +ModelInvertHorizontalScrolling=1 +[Logitech MX Master] +MatchVendor=0x46D +MatchProduct=0xB01E +ModelInvertHorizontalScrolling=1 + [Logitech MX Master 2S] MatchVendor=0x46D MatchProduct=0x4069 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/src/evdev.c new/libinput-1.16.1/src/evdev.c --- old/libinput-1.16.0/src/evdev.c 2020-08-03 08:38:54.643407000 +0200 +++ new/libinput-1.16.1/src/evdev.c 2020-08-13 05:50:03.612642300 +0200 @@ -1810,8 +1810,9 @@ evdev_disable_accelerometer_axes(device); } - if (udev_tags & EVDEV_UDEV_TAG_JOYSTICK) { - evdev_log_info(device, "device is a joystick, ignoring\n"); + if (udev_tags == (EVDEV_UDEV_TAG_INPUT|EVDEV_UDEV_TAG_JOYSTICK)) { + evdev_log_info(device, + "device is a joystick, ignoring\n"); return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/test/litest-device-logitech-media-keyboard-elite.c new/libinput-1.16.1/test/litest-device-logitech-media-keyboard-elite.c --- old/libinput-1.16.0/test/litest-device-logitech-media-keyboard-elite.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.16.1/test/litest-device-logitech-media-keyboard-elite.c 2020-08-13 05:50:03.622642300 +0200 @@ -0,0 +1,92 @@ +/* + * Copyright © 2020 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. + */ + +#include "config.h" + +#include <assert.h> + +#include "libinput-util.h" + +#include "litest.h" +#include "litest-int.h" + +/* Description taken from + * https://gitlab.freedesktop.org/libinput/libinput/-/issues/514 + */ + +static struct input_id input_id = { + .bustype = 0x3, + .vendor = 0x46d, + .product = 0x30f, +}; + +static int events[] = { + EV_KEY, KEY_MUTE, + EV_KEY, KEY_VOLUMEDOWN, + EV_KEY, KEY_VOLUMEUP, + EV_KEY, KEY_UNDO, + EV_KEY, KEY_HELP, + EV_KEY, KEY_CALC, + EV_KEY, KEY_MAIL, + EV_KEY, KEY_BOOKMARKS, + EV_KEY, KEY_BACK, + EV_KEY, KEY_FORWARD, + EV_KEY, KEY_NEXTSONG, + EV_KEY, KEY_PLAYPAUSE, + EV_KEY, KEY_PREVIOUSSONG, + EV_KEY, KEY_STOPCD, + EV_KEY, KEY_REWIND, + EV_KEY, KEY_CONFIG, + EV_KEY, KEY_HOMEPAGE, + EV_KEY, KEY_REDO, + EV_KEY, KEY_FASTFORWARD, + EV_KEY, KEY_PRINT, + EV_KEY, KEY_SEARCH, + EV_KEY, KEY_SAVE, + EV_KEY, 319, + EV_KEY, BTN_TOOL_QUINTTAP, + EV_KEY, BTN_STYLUS3, + EV_KEY, BTN_TOUCH, + EV_KEY, BTN_STYLUS, + EV_KEY, KEY_ZOOMIN, + EV_KEY, KEY_ZOOMOUT, + EV_KEY, KEY_ZOOMRESET, + EV_KEY, KEY_WORDPROCESSOR, + EV_KEY, KEY_SPREADSHEET, + EV_KEY, KEY_PRESENTATION, + EV_KEY, KEY_MESSENGER, + + EV_MSC, MSC_SCAN, + -1, -1, +}; + +TEST_DEVICE("logitech-media-keyboard-elite", + .type = LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE, + .features = LITEST_KEYS, + .interface = NULL, + + .name = "Logitech Logitech USB Keyboard Consumer Control", + .id = &input_id, + .events = events, + .absinfo = NULL, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/test/litest-device-sony-vaio-keys.c new/libinput-1.16.1/test/litest-device-sony-vaio-keys.c --- old/libinput-1.16.0/test/litest-device-sony-vaio-keys.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.16.1/test/litest-device-sony-vaio-keys.c 2020-08-13 05:50:03.623642200 +0200 @@ -0,0 +1,98 @@ +/* + * Copyright © 2020 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. + */ + +#include "config.h" + +#include <assert.h> + +#include "libinput-util.h" + +#include "litest.h" +#include "litest-int.h" + +/* Description taken from + * https://gitlab.freedesktop.org/libinput/libinput/-/issues/515 + */ + +static struct input_id input_id = { + .bustype = 0x10, + .vendor = 0x104d, + .product = 0x00, +}; + +static int events[] = { + EV_KEY, KEY_UP, + EV_KEY, KEY_DOWN, + EV_KEY, KEY_MUTE, + EV_KEY, KEY_VOLUMEDOWN, + EV_KEY, KEY_VOLUMEUP, + EV_KEY, KEY_HELP, + EV_KEY, KEY_PROG1, + EV_KEY, KEY_PROG2, + EV_KEY, KEY_BACK, + EV_KEY, KEY_EJECTCD, + EV_KEY, KEY_F13, + EV_KEY, KEY_F14, + EV_KEY, KEY_F15, + EV_KEY, KEY_F21, + EV_KEY, KEY_PROG3, + EV_KEY, KEY_PROG4, + EV_KEY, KEY_SUSPEND, + EV_KEY, KEY_CAMERA, + EV_KEY, KEY_BRIGHTNESSDOWN, + EV_KEY, KEY_BRIGHTNESSUP, + EV_KEY, KEY_MEDIA, + EV_KEY, KEY_SWITCHVIDEOMODE, + EV_KEY, KEY_BLUETOOTH, + EV_KEY, KEY_WLAN, + EV_KEY, BTN_THUMB, + EV_KEY, KEY_VENDOR, + EV_KEY, KEY_FULL_SCREEN, + EV_KEY, KEY_ZOOMIN, + EV_KEY, KEY_ZOOMOUT, + EV_KEY, KEY_FN, + EV_KEY, KEY_FN_ESC, + EV_KEY, KEY_FN_F8, + EV_KEY, KEY_FN_F11, + EV_KEY, KEY_FN_1, + EV_KEY, KEY_FN_2, + EV_KEY, KEY_FN_D, + EV_KEY, KEY_FN_E, + EV_KEY, KEY_FN_F, + EV_KEY, KEY_FN_S, + EV_KEY, KEY_FN_B, + + EV_MSC, MSC_SCAN, + -1, -1, +}; + +TEST_DEVICE("sony-vaio-keys", + .type = LITEST_SONY_VAIO_KEYS, + .features = LITEST_KEYS, + .interface = NULL, + + .name = "Sony Vaio Keys", + .id = &input_id, + .events = events, + .absinfo = NULL, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/test/litest.h new/libinput-1.16.1/test/litest.h --- old/libinput-1.16.0/test/litest.h 2020-08-03 08:38:54.651407200 +0200 +++ new/libinput-1.16.1/test/litest.h 2020-08-13 05:50:03.627642400 +0200 @@ -304,6 +304,8 @@ LITEST_ELAN_TABLET, LITEST_ABSINFO_OVERRIDE, LITEST_TABLET_MODE_UNRELIABLE, + LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE, + LITEST_SONY_VAIO_KEYS, }; #define LITEST_DEVICELESS -2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.16.0/test/test-device.c new/libinput-1.16.1/test/test-device.c --- old/libinput-1.16.0/test/test-device.c 2020-08-03 08:38:54.651407200 +0200 +++ new/libinput-1.16.1/test/test-device.c 2020-08-13 05:50:03.628642300 +0200 @@ -1462,10 +1462,11 @@ struct libinput *li; struct libinput_device *device; - /* SW_MAX isn't handled in libinput so the device is processed but - * ends up without seat capabilities and is ignored. */ + /* SW_PEN_INSERTED isn't handled in libinput so the device is + * processed but ends up without seat capabilities and is ignored. + */ uinput = litest_create_uinput_device("test device", NULL, - EV_SW, SW_MAX, + EV_SW, SW_PEN_INSERTED, -1); li = litest_create_context(); device = libinput_path_add_device(li,
