diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-03-28 10:39:38 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-03-28 10:39:38 +0000 |
| commit | a23c0e42afdedf5bbaad9cdd789f18d8fd2af431 (patch) | |
| tree | d7e25752ecc96b82c0e64de45daee8f8a804528e /roundcubemail/program/js/common.js | |
| parent | f84e3b4bda2d903fe1f4269753f3584c919ad31d (diff) | |
Abstract event keycode detection
git-svn-id: https://svn.roundcube.net/trunk@527 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/common.js')
| -rw-r--r-- | roundcubemail/program/js/common.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js index 82d7ed17c..be9a131c2 100644 --- a/roundcubemail/program/js/common.js +++ b/roundcubemail/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) */ |
