W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: Mouse Capture for Canvas

From: Brandon Andrews <warcraftthreeft@sbcglobal.net>
Date: Wed, 9 Feb 2011 18:20:26 -0800 (PST)
Message-ID: <987969.28935.qm@web83814.mail.sp1.yahoo.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Charles Pritchard <chuck@jumis.com>, Kenneth Russell <kbr@google.com>, robert@ocallahan.org, public-webapps@w3.org
>> I hate to ask, since there could be use cases I'm missing, but what is a >> use 
>>case where a browser would need to grab the mouse immediately when the >> page 
>>starts? I'm not against the idea, but it might need a strategy to stop >> abuse. 
>>Here are some steps I see happening. > > If I load a first-person game in a tab, 
>>I shouldn't need to click the window > to allow the page to capture the mouse.  
>>That'll force every game to start > with a superfluous box saying "click here to 

So right when you go to that tab even just to glance at it your mouse will be 
I want to point out that most FPS games have a menu at the front. But yeah the 
main problem with just grabbing the mouse is that people just switching through 
tabs probably don't want their mouse grabbed. That and what happens when a tab 
isn't in view when capture is called?

>> Also what are your guy's name ideas? I think I prefer mousecapture and >> 
>>mouserelease and just push aside the IE API. > > "Mouse capture" isn't just an 
>>IE API.  There's also a similar Win32 API with > the same name, with the same 
>>use case as IE's API: to continue receiving > mouse motion when dragging.  I'm 
>>sure there are other windowing systems with > it, too. > > I'd suggest 

Since grab has no opposite mousegrab doesn't work. (ungrab isn't an English word 
and "let go" sounds wrong).

After discussing this in the IRC channel for whatwg it seems like mouselock and 
mouseunlock are recommended. They describe the operation pretty well that the 
mouse is locked to an element.
Anyone have disagreements or other ideas?
Received on Thursday, 10 February 2011 02:20:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC