--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
Thanks for the reply.I am using keypress, because it fires only once, whereas keydown fires continually (if pressed for too long - which isn't that long actually). I switched to keypress (from keydown) just for that reason.
I think it would be a lot better to assign keyCode the character code and use ctrlKey, altKey etc. to denote the control key pressed. Now keyCode is assigned to 17 (Ctrl) which
- doesn't seem to server any purpose- makes this event not useful in this particular case.
The `repeat` property on the event may be helpful then:
As mentioned, the existing keyboard event values don't make a huge amount of sense. Changing them induces risk, though, especially as many sites try to hack around the existing weirdness. In general, browser vendors are trying to introduce new, more sensible KeyboardEvent properties to look at (e.g. `key`, `location`, etc) and leaving the old properties alone so that sites don't break.
The `repeat` property on the event may be helpful then:That's a good suggestion, but it seems to be always false: http://jsfiddle.net/zJVWb/I think I have to live with the repeating event then.
As mentioned, the existing keyboard event values don't make a huge amount of sense. Changing them induces risk, though, especially as many sites try to hack around the existing weirdness. In general, browser vendors are trying to introduce new, more sensible KeyboardEvent properties to look at (e.g. `key`, `location`, etc) and leaving the old properties alone so that sites don't break.I'm just concerned that there might be some bugs here. Maybe I should make a but report at crbug.com and find out.
You've been helpful so far, for sure, so thanks for that.-R
--