From a0f04bf3a961a1da0283397f1f69c3c9bf6c1404 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 18 Jul 2009 12:53:26 -0400 Subject: Key events get key code input --- lib/js/urweb.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/js/urweb.js') diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 29728a7a..3d4dbea2 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -648,5 +648,12 @@ function rv(chn, parse, k) { } +// Key events + +function kc(e) { + return window.event ? e.keyCode : e.which; +} + + // App-specific code -- cgit v1.2.3