From 5d0a9639c4cb3220bab6c8357a25f23f5f47af9c Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Wed, 20 Mar 2024 06:48:03 +0200 Subject: [PATCH] enable extended buttons on magellan spacemice --- src/dev_serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dev_serial.c b/src/dev_serial.c index 8e7a2b7..cd76ee0 100644 --- a/src/dev_serial.c +++ b/src/dev_serial.c @@ -186,6 +186,8 @@ int open_dev_serial(struct device *dev) /* set 3D mode, not-dominant-axis, pass through motion and button packets */ write(fd, "m3\r", 3); + /* also attempt the compress mode-set command with extended keys enabled */ + write(fd, "c3B\r", 4); sb->parse = mag_parsepkt; return 0; @@ -606,7 +608,7 @@ static int guess_num_buttons(struct device *dev, const char *verstr) if(strstr(verstr, "MAGELLAN")) { dev->type = DEV_SM; strcpy(dev->name, "Magellan SpaceMouse"); - return 9; /* magellan spacemouse */ + return 11; /* magellan spacemouse (assume ext buttons on plus/xt) */ } if(strstr(verstr, "SPACEBALL")) {