[webkit-dev] Detecting paste with cmd-v on Mac

Alexey Proskuryakov ap at webkit.org
Tue Mar 3 23:21:49 PST 2009


03.03.2009, в 23:21, Rush Manbert написал(а):

> I checked the values of the DOM even modifiers alyKey, ctrlKey, and  
> shiftKey and they are all false on a cmd-v paste

That's expected, Cmd maps to metaKey.

> Is the difference between Safari and WebKit expected?


Yes, WebKit preserves legacy keyboard event behavior for applications  
linked against old SDK, see <http://trac.webkit.org/browser/trunk/WebKit/mac/WebView/WebView.mm#L1284 
 >. The behavior was changed to be IE-compatible in version 3.1.

I expect that checking for evt.metaKey will make it easy to filter out  
Cmd+V.

- WBR, Alexey Proskuryakov




More information about the webkit-dev mailing list