[OpenLayers-Commits] r12053 - sandbox/tschaub/editing/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Mon Jun 6 23:19:53 EDT 2011
Author: tschaub
Date: 2011-06-06 20:19:52 -0700 (Mon, 06 Jun 2011)
New Revision: 12053
Modified:
sandbox/tschaub/editing/examples/draw-undo-redo.js
Log:
Consistency with keyCode on keydown.
Modified: sandbox/tschaub/editing/examples/draw-undo-redo.js
===================================================================
--- sandbox/tschaub/editing/examples/draw-undo-redo.js 2011-06-06 14:01:54 UTC (rev 12052)
+++ sandbox/tschaub/editing/examples/draw-undo-redo.js 2011-06-07 03:19:52 UTC (rev 12053)
@@ -19,8 +19,8 @@
map.addControl(draw);
draw.activate();
-OpenLayers.Event.observe(document, "keypress", function(evt) {
- var code = evt.charCode || evt.keyCode;
+OpenLayers.Event.observe(document, "keydown", function(evt) {
+ var code = evt.keyCode;
if (code === 90) {
// z
if ("metaKey" in evt) {
More information about the Commits
mailing list