summaryrefslogtreecommitdiff
path: root/swat2/style/qooxdoo/widgets/events/QxKeyEvent.js
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-09-11 16:47:45 +0200
committerStefan Metzmacher <metze@samba.org>2008-09-12 08:51:07 +0200
commit7e671ae37f6c951d4db18c446eed52685200b2e0 (patch)
treec9c3713d27ac0374c08d2b99f7968969bd67c69e /swat2/style/qooxdoo/widgets/events/QxKeyEvent.js
parentacf11ddd5fbb9e4b0b780f4f95957d79fcc6fcf1 (diff)
downloadsamba-7e671ae37f6c951d4db18c446eed52685200b2e0.tar.gz
samba-7e671ae37f6c951d4db18c446eed52685200b2e0.tar.bz2
samba-7e671ae37f6c951d4db18c446eed52685200b2e0.zip
rename swat => swat2, so that we don't conflict with samba3
metze (This used to be commit bf852a3dbeee8900fa36978f08a5cdceabcbd926)
Diffstat (limited to 'swat2/style/qooxdoo/widgets/events/QxKeyEvent.js')
-rw-r--r--swat2/style/qooxdoo/widgets/events/QxKeyEvent.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/swat2/style/qooxdoo/widgets/events/QxKeyEvent.js b/swat2/style/qooxdoo/widgets/events/QxKeyEvent.js
new file mode 100644
index 0000000000..cc2808e805
--- /dev/null
+++ b/swat2/style/qooxdoo/widgets/events/QxKeyEvent.js
@@ -0,0 +1,4 @@
+/* Copyright (c): 2002-2005 (Germany): United Internet, 1&1, GMX, Schlund+Partner, Alturo */
+function QxKeyEvent(eType,domEvent,autoDispose){QxEvent.call(this,eType,autoDispose);this._domEvent=domEvent;};QxKeyEvent.extend(QxEvent,"QxKeyEvent");QxKeyEvent.keys=
+{esc:27,enter:13,tab:9,space:32,up:38,down:40,left:37,right:39,shift:16,ctrl:17,alt:18,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,del:46,backspace:8,insert:45,home:36,end:35,pageup:33,pagedown:34,numlock:144,numpad_0:96,numpad_1:97,numpad_2:98,numpad_3:99,numpad_4:100,numpad_5:101,numpad_6:102,numpad_7:103,numpad_8:104,numpad_9:105,numpad_divide:111,numpad_multiply:106,numpad_minus:109,numpad_plus:107
+};QxKeyEvent.codes={};for(var i in QxKeyEvent.keys){QxKeyEvent.codes[QxKeyEvent.keys[i]]=i;};proto._domEvent=null;proto._preventDefault=false;proto._bubbles=true;proto._propagationStopped=false;proto.dispose=function(){if(this._disposed)return;this._domEvent=null;QxEvent.prototype.dispose.call(this);};proto.getDomEvent=function(){return this._domEvent;};proto.getDomTarget=function(){return this._domEvent.target||this._domEvent.srcElement;};proto.getKeyCode=function(){return this._domEvent.keyCode||this._domEvent.charCode;};proto.getCtrlKey=function(){return this._domEvent.ctrlKey;};proto.getShiftKey=function(){return this._domEvent.shiftKey;};proto.getAltKey=function(){return this._domEvent.altKey;};proto.setPreventDefault=function(d){if(!this._defaultPrevented&&d){this.preventDefault();}else {return false;};};if((new QxClient).isMshtml()){proto.preventDefault=function(){this._domEvent.returnValue=false;this._defaultPrevented=true;};}else {proto.preventDefault=function(){this._domEvent.preventDefault();this._domEvent.returnValue=false;this._defaultPrevented=true;};}; \ No newline at end of file