Skip to content

Commit

Permalink
enable extended buttons on magellan spacemice
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsiomb committed Mar 20, 2024
1 parent 1d6fde6 commit 5d0a963
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dev_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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")) {
Expand Down

0 comments on commit 5d0a963

Please sign in to comment.