summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 82d7ed17c..be9a131c2 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -103,6 +103,15 @@ function roundcube_browser()
// static functions for event handling
var rcube_event = {
+ /**
+ * returns the event key code
+ */
+ get_keycode: function(e)
+ {
+ e = e || window.event;
+ return e && e.keyCode ? e.keyCode : (e && e.which ? e.which : 0);
+ },
+
/**
* returns modifier key (constants defined at top of file)
*/