Using device name instead of ID for touchpad
* UDEV registers touch pad (e.g., Synaptic) with different IDs on reboots. Instead of hard-coding product/device IDs in config.h, use a string that appears in device name to identify it
This commit is contained in:
@@ -19,7 +19,8 @@ static const float fullscreen_bg[] = COLOR(0x121212ff);
|
||||
#define TAGCOUNT (9)
|
||||
|
||||
/* control variables */
|
||||
static int cfg_disable_touch_pad = 1;
|
||||
static int cfg_disable_touchpad = 1;
|
||||
static const char *cfg_touchpad_device_str = "Synaptic";
|
||||
|
||||
/* logging */
|
||||
static int log_level = WLR_ERROR;
|
||||
@@ -94,15 +95,6 @@ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
|
||||
*/
|
||||
static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
|
||||
|
||||
/* Touch device information to filter touch events
|
||||
* Use something like this to obtain info:
|
||||
*
|
||||
* root@host $ udevadm info --tree | grep -a5 Synaptic | grep -E "PRODUCT|NAME"
|
||||
* │ │ ┆ E: PRODUCT=11/2(vendor)/7(product)/1b1
|
||||
* │ │ ┆ E: NAME="SynPS/2 Synaptics TouchPad" */
|
||||
static const uint32_t touch_device_vendor_id = 0x2;
|
||||
static const uint32_t touch_device_product_id = 0x7;
|
||||
|
||||
/* You can choose between:
|
||||
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
|
||||
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
|
||||
|
Reference in New Issue
Block a user