summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@rei2.9hal>2012-02-13 07:06:08 +0100
committercinap_lenrek <cinap_lenrek@rei2.9hal>2012-02-13 07:06:08 +0100
commit4780a7ff5673bd031fbc3302eba710ef379617cf (patch)
treed6ce0737bcf4552d4b1878372418f9410f5b4ffc
parentf9cc8808b70cd1b9b613e50d090b20530abb5a84 (diff)
devmouse: add twitch mousectl command
-rw-r--r--sys/man/3/mouse4
-rw-r--r--sys/src/9/port/devmouse.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/man/3/mouse b/sys/man/3/mouse
index 1ad9243c1..11bf6f3ee 100644
--- a/sys/man/3/mouse
+++ b/sys/man/3/mouse
@@ -150,6 +150,10 @@ unlike
.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,
diff --git a/sys/src/9/port/devmouse.c b/sys/src/9/port/devmouse.c
index 4ecf54511..cb3ebe716 100644
--- a/sys/src/9/port/devmouse.c
+++ b/sys/src/9/port/devmouse.c
@@ -57,6 +57,7 @@ enum
CMbuttonmap,
CMscrollswap,
CMswap,
+ CMtwitch,
CMwildcard,
};
@@ -65,6 +66,7 @@ static Cmdtab mousectlmsg[] =
CMbuttonmap, "buttonmap", 0,
CMscrollswap, "scrollswap", 0,
CMswap, "swap", 1,
+ CMtwitch, "twitch", 0,
CMwildcard, "*", 0,
};
@@ -419,6 +421,10 @@ mousewrite(Chan *c, void *va, long n, vlong)
setbuttonmap(cb->f[1]);
break;
+ case CMtwitch:
+ drawactive(1);
+ break;
+
case CMwildcard:
mousectl(cb);
break;