From 4780a7ff5673bd031fbc3302eba710ef379617cf Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 13 Feb 2012 07:06:08 +0100 Subject: devmouse: add twitch mousectl command --- sys/man/3/mouse | 4 ++++ sys/src/9/port/devmouse.c | 6 ++++++ 2 files changed, 10 insertions(+) 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; -- cgit v1.2.3