ref: 8d550f7181106f90a37d7169fc8158d042b6c3b8
parent: a60d78110c4b64715dbf229c4a09d1cccdf835ac
author: cinap_lenrek <cinap_lenrek@rei2.9hal>
date: Mon Feb 13 02:06:08 EST 2012
devmouse: add twitch mousectl command
--- a/sys/man/3/mouse
+++ b/sys/man/3/mouse
@@ -150,6 +150,10 @@
.B reset
clears the mouse
to its default state.
+.TP
+.B twitch
+unblanks the screen and resets the idle timeout as if the
+mouse was twitched.
.PD
.PP
Not all mice interpret all messages; with some devices,
--- a/sys/src/9/port/devmouse.c
+++ b/sys/src/9/port/devmouse.c
@@ -57,6 +57,7 @@
CMbuttonmap,
CMscrollswap,
CMswap,
+ CMtwitch,
CMwildcard,
};
@@ -65,6 +66,7 @@
CMbuttonmap, "buttonmap", 0,
CMscrollswap, "scrollswap", 0,
CMswap, "swap", 1,
+ CMtwitch, "twitch", 0,
CMwildcard, "*", 0,
};
@@ -417,6 +419,10 @@
setbuttonmap("123");else
setbuttonmap(cb->f[1]);
+ break;
+
+ case CMtwitch:
+ drawactive(1);
break;
case CMwildcard:
--
⑨