From 030ec39c63cd0090be452c90addbc7a62452ef81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=BAeen?= <3han5chou7@gmail.com> Date: Tue, 11 Jan 2022 23:46:04 +0900 Subject: [PATCH] support more mouse buttons --- src/device.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/device.rs b/src/device.rs index a290ea9..5a1ba09 100644 --- a/src/device.rs +++ b/src/device.rs @@ -10,7 +10,8 @@ use std::fs::read_dir; use std::os::unix::ffi::OsStrExt; use std::process; -static MOUSE_BTNS: [&str; 14] = [ +static MOUSE_BTNS: [&str; 20] = [ + "BTN_MISC", "BTN_0", "BTN_1", "BTN_2", @@ -21,10 +22,15 @@ static MOUSE_BTNS: [&str; 14] = [ "BTN_7", "BTN_8", "BTN_9", + "BTN_MOUSE", "BTN_LEFT", - "BTN_MIDDLE", "BTN_RIGHT", + "BTN_MIDDLE", "BTN_SIDE", + "BTN_EXTRA", + "BTN_FORWARD", + "BTN_BACK", + "BTN_TASK", ]; // Credit: https://github.com/mooz/xkeysnail/blob/bf3c93b4fe6efd42893db4e6588e5ef1c4909cfb/xkeysnail/output.py#L10-L32