aboutsummaryrefslogtreecommitdiffstats
path: root/ui/keycode.js
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-07-15 18:03:01 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-08-08 00:29:36 -0400
commitbddb7efe000cf60e455d48f28acef0ef2f295d9d (patch)
treeb1a4d336d52d47fbb74ec6de6b877b9c7b3911e5 /ui/keycode.js
parent677fdbf7bef71d12998191e0b97c2c5cd34349be (diff)
downloadjquery-ui-bddb7efe000cf60e455d48f28acef0ef2f295d9d.tar.gz
jquery-ui-bddb7efe000cf60e455d48f28acef0ef2f295d9d.zip
Core: Move keyCode into its own module
Ref #9647
Diffstat (limited to 'ui/keycode.js')
-rw-r--r--ui/keycode.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/ui/keycode.js b/ui/keycode.js
new file mode 100644
index 000000000..17687fbbd
--- /dev/null
+++ b/ui/keycode.js
@@ -0,0 +1,45 @@
+/*!
+ * jQuery UI Keycode @VERSION
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Keycode
+//>>group: Core
+//>>description: Provide keycodes as keynames
+//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
+
+( function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define( [ "jquery", "./version" ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+} ( function( $ ) {
+return $.ui.keyCode = {
+ BACKSPACE: 8,
+ COMMA: 188,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ LEFT: 37,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+};
+
+} ) );