devmouse: add twitch mousectl command
This commit is contained in:
parent
f9cc8808b7
commit
4780a7ff56
2 changed files with 10 additions and 0 deletions
|
@ -150,6 +150,10 @@ unlike
|
||||||
.B reset
|
.B reset
|
||||||
clears the mouse
|
clears the mouse
|
||||||
to its default state.
|
to its default state.
|
||||||
|
.TP
|
||||||
|
.B twitch
|
||||||
|
unblanks the screen and resets the idle timeout as if the
|
||||||
|
mouse was twitched.
|
||||||
.PD
|
.PD
|
||||||
.PP
|
.PP
|
||||||
Not all mice interpret all messages; with some devices,
|
Not all mice interpret all messages; with some devices,
|
||||||
|
|
|
@ -57,6 +57,7 @@ enum
|
||||||
CMbuttonmap,
|
CMbuttonmap,
|
||||||
CMscrollswap,
|
CMscrollswap,
|
||||||
CMswap,
|
CMswap,
|
||||||
|
CMtwitch,
|
||||||
CMwildcard,
|
CMwildcard,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,6 +66,7 @@ static Cmdtab mousectlmsg[] =
|
||||||
CMbuttonmap, "buttonmap", 0,
|
CMbuttonmap, "buttonmap", 0,
|
||||||
CMscrollswap, "scrollswap", 0,
|
CMscrollswap, "scrollswap", 0,
|
||||||
CMswap, "swap", 1,
|
CMswap, "swap", 1,
|
||||||
|
CMtwitch, "twitch", 0,
|
||||||
CMwildcard, "*", 0,
|
CMwildcard, "*", 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -419,6 +421,10 @@ mousewrite(Chan *c, void *va, long n, vlong)
|
||||||
setbuttonmap(cb->f[1]);
|
setbuttonmap(cb->f[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CMtwitch:
|
||||||
|
drawactive(1);
|
||||||
|
break;
|
||||||
|
|
||||||
case CMwildcard:
|
case CMwildcard:
|
||||||
mousectl(cb);
|
mousectl(cb);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue