[Author: thomasvl]
[Author: thomasvl]

NSEvent throws if you call -characters on a non key event, so instead of
  checking the requested mask, we have to check the event type (say someone
  uses any event as the mask, and it's a click event...)
Also handle keydown or up for the tab check.

R=dmaclach,stuartmorgan
DELTA=8  (1 added, 0 deleted, 7 changed)

git-svn-id: 741c308154f1e22deafec9707230e8b816ec4ca6@325 7dc7ac4e-7543-0410-b95c-c1676fc8e2a3

chao787/GTM-mirror,chao787/GTM-mirror,chao787/GTM-mirror