pleyo.com

/src/trunk2/BAL/Interfaces/BIKeyboardEvent.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007 Pleyo.  All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1.  Redistributions of source code must retain the above copyright
00009  *     notice, this list of conditions and the following disclaimer.
00010  * 2.  Redistributions in binary form must reproduce the above copyright
00011  *     notice, this list of conditions and the following disclaimer in the
00012  *     documentation and/or other materials provided with the distribution.
00013  * 3.  Neither the name of Pleyo nor the names of
00014  *     its contributors may be used to endorse or promote products derived
00015  *     from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
00018  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00019  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00020  * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
00021  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00022  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00023  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00024  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00034 #ifndef BIKeyboardEvent_H
00035 #define BIKeyboardEvent_H
00036 
00037 #include "config.h"
00038 #include "PlatformString.h"
00039 
00040 #include "BIInputEvent.h"
00041 
00042 namespace BAL {
00043 
00051     class BIKeyboardEvent : public BIInputEvent {
00052     public:
00056         virtual ~BIKeyboardEvent() {};
00057 
00062         virtual WebCore::String text() const = 0;
00063 
00068         virtual WebCore::String unmodifiedText() const = 0;
00069 
00074         virtual WebCore::String keyIdentifier() const = 0;
00075 
00079         virtual bool isKeyUp() const = 0;
00080 
00084         virtual bool isAutoRepeat() const = 0;
00085 
00089         virtual void setIsAutoRepeat(bool) = 0;
00090 
00094         virtual int WindowsKeyCode() const = 0;
00095 
00099         virtual int setWindowsKeyCode(int) const = 0;
00100 
00107         virtual int virtualKeyCode() const = 0;
00108 
00112         virtual bool isKeypad() const = 0;
00113 
00117         virtual BIEvent* clone() const = 0;
00118 
00119         virtual BIKeyboardEvent* queryIsKeyboardEvent() { return this; }
00120 
00121     public:
00122 
00123       enum EnumVirtualKey
00124       {
00125         // VK_LBUTTON (01) Left mouse button
00126         // VK_RBUTTON (02) Right mouse button
00127         // VK_CANCEL (03) Control-break processing
00128         // VK_MBUTTON (04) Middle mouse button (three-button mouse)
00129         // VK_XBUTTON1 (05)
00130         // VK_XBUTTON2 (06)
00131         // VK_BACK (08) BACKSPACE key
00132         VK_BACK = 0x08,
00133 
00134         // VK_TAB (09) TAB key
00135         VK_TAB = 0x09,
00136 
00137         // VK_CLEAR (0C) CLEAR key
00138         VK_CLEAR = 0x0C,
00139 
00140         // VK_RETURN (0D)
00141         VK_RETURN = 0x0D,
00142 
00143         // VK_SHIFT (10) SHIFT key
00144         VK_SHIFT = 0x10,
00145 
00146         // VK_CONTROL (11) CTRL key
00147         VK_CONTROL = 0x11,
00148 
00149         // VK_MENU (12) ALT key
00150         VK_MENU = 0x12,
00151 
00152         // VK_PAUSE (13) PAUSE key
00153         VK_PAUSE = 0x13,
00154 
00155         // VK_CAPITAL (14) CAPS LOCK key
00156         VK_CAPITAL = 0x14,
00157 
00158         // VK_KANA (15) Input Method Editor (IME) Kana mode
00159         VK_KANA = 0x15,
00160 
00161         // VK_HANGUEL (15) IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
00162         // VK_HANGUL (15) IME Hangul mode
00163         VK_HANGUL = 0x15,
00164 
00165         // VK_JUNJA (17) IME Junja mode
00166         VK_JUNJA = 0x17,
00167 
00168         // VK_FINAL (18) IME final mode
00169         VK_FINAL = 0x18,
00170 
00171         // VK_HANJA (19) IME Hanja mode
00172         VK_HANJA = 0x19,
00173 
00174         // VK_KANJI (19) IME Kanji mode
00175         VK_KANJI = 0x19,
00176 
00177 
00178         // VK_ESCAPE (1B) ESC key
00179         VK_ESCAPE = 0x1B,
00180 
00181 
00182         // VK_CONVERT (1C) IME convert
00183         VK_CONVERT = 0x1C,
00184 
00185         // VK_NONCONVERT (1D) IME nonconvert
00186         VK_NONCONVERT = 0x1D,
00187 
00188         // VK_ACCEPT (1E) IME accept
00189         VK_ACCEPT = 0x1E,
00190 
00191         // VK_MODECHANGE (1F) IME mode change request
00192         VK_MODECHANGE = 0x1F,
00193 
00194         // VK_SPACE (20) SPACEBAR
00195         VK_SPACE = 0x20,
00196 
00197         // VK_PRIOR (21) PAGE UP key
00198         VK_PRIOR = 0x21,
00199 
00200         // VK_NEXT (22) PAGE DOWN key
00201         VK_NEXT = 0x22,
00202 
00203         // VK_END (23) END key
00204         VK_END = 0x23,
00205 
00206         // VK_HOME (24) HOME key
00207         VK_HOME = 0x24,
00208 
00209         // VK_LEFT (25) LEFT ARROW key
00210         VK_LEFT = 0x25,
00211 
00212         // VK_UP (26) UP ARROW key
00213         VK_UP = 0x26,
00214 
00215         // VK_RIGHT (27) RIGHT ARROW key
00216         VK_RIGHT = 0x27,
00217 
00218         // VK_DOWN (28) DOWN ARROW key
00219         VK_DOWN = 0x28,
00220 
00221         // VK_SELECT (29) SELECT key
00222         VK_SELECT = 0x29,
00223 
00224         // VK_PRINT (2A) PRINT key
00225         VK_PRINT = 0x2A,
00226 
00227         // VK_EXECUTE (2B) EXECUTE key
00228         VK_EXECUTE = 0x2B,
00229 
00230         // VK_SNAPSHOT (2C) PRINT SCREEN key
00231         VK_SNAPSHOT = 0x2C,
00232 
00233         // VK_INSERT (2D) INS key
00234         VK_INSERT = 0x2D,
00235 
00236         // VK_DELETE (2E) DEL key
00237         VK_DELETE = 0x2E,
00238 
00239         // VK_HELP (2F) HELP key
00240         VK_HELP = 0x2F,
00241 
00242         //  (30) 0 key
00243         VK_0 = 0x30,
00244 
00245         //  (31) 1 key
00246         VK_1 = 0x31,
00247 
00248         //  (32) 2 key
00249         VK_2 = 0x32,
00250 
00251         //  (33) 3 key
00252         VK_3 = 0x33,
00253 
00254         //  (34) 4 key
00255         VK_4 = 0x34,
00256 
00257         //  (35) 5 key;
00258 
00259         VK_5 = 0x35,
00260 
00261         //  (36) 6 key
00262         VK_6 = 0x36,
00263 
00264         //  (37) 7 key
00265         VK_7 = 0x37,
00266 
00267         //  (38) 8 key
00268         VK_8 = 0x38,
00269 
00270         //  (39) 9 key
00271         VK_9 = 0x39,
00272 
00273         //  (41) A key
00274         VK_A = 0x41,
00275 
00276         //  (42) B key
00277         VK_B = 0x42,
00278 
00279         //  (43) C key
00280         VK_C = 0x43,
00281 
00282         //  (44) D key
00283         VK_D = 0x44,
00284 
00285         //  (45) E key
00286         VK_E = 0x45,
00287 
00288         //  (46) F key
00289         VK_F = 0x46,
00290 
00291         //  (47) G key
00292         VK_G = 0x47,
00293 
00294         //  (48) H key
00295         VK_H = 0x48,
00296 
00297         //  (49) I key
00298         VK_I = 0x49,
00299 
00300         //  (4A) J key
00301         VK_J = 0x4A,
00302 
00303         //  (4B) K key
00304         VK_K = 0x4B,
00305 
00306         //  (4C) L key
00307         VK_L = 0x4C,
00308 
00309         //  (4D) M key
00310         VK_M = 0x4D,
00311 
00312         //  (4E) N key
00313         VK_N = 0x4E,
00314 
00315         //  (4F) O key
00316         VK_O = 0x4F,
00317 
00318         //  (50) P key
00319         VK_P = 0x50,
00320 
00321         //  (51) Q key
00322         VK_Q = 0x51,
00323 
00324         //  (52) R key
00325         VK_R = 0x52,
00326 
00327         //  (53) S key
00328         VK_S = 0x53,
00329 
00330         //  (54) T key
00331         VK_T = 0x54,
00332 
00333         //  (55) U key
00334         VK_U = 0x55,
00335 
00336         //  (56) V key
00337         VK_V = 0x56,
00338 
00339         //  (57) W key
00340         VK_W = 0x57,
00341 
00342         //  (58) X key
00343         VK_X = 0x58,
00344 
00345         //  (59) Y key
00346         VK_Y = 0x59,
00347 
00348         //  (5A) Z key
00349         VK_Z = 0x5A,
00350 
00351         // VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
00352         VK_LWIN = 0x5B,
00353 
00354         // VK_RWIN (5C) Right Windows key (Natural keyboard)
00355         VK_RWIN = 0x5C,
00356 
00357         // VK_APPS (5D) Applications key (Natural keyboard)
00358         VK_APPS = 0x5D,
00359 
00360         // VK_SLEEP (5F) Computer Sleep key
00361         VK_SLEEP = 0x5F,
00362 
00363         // VK_NUMPAD0 (60) Numeric keypad 0 key
00364         VK_NUMPAD0 = 0x60,
00365 
00366         // VK_NUMPAD1 (61) Numeric keypad 1 key
00367         VK_NUMPAD1 = 0x61,
00368 
00369         // VK_NUMPAD2 (62) Numeric keypad 2 key
00370         VK_NUMPAD2 = 0x62,
00371 
00372         // VK_NUMPAD3 (63) Numeric keypad 3 key
00373         VK_NUMPAD3 = 0x63,
00374 
00375         // VK_NUMPAD4 (64) Numeric keypad 4 key
00376         VK_NUMPAD4 = 0x64,
00377 
00378         // VK_NUMPAD5 (65) Numeric keypad 5 key
00379         VK_NUMPAD5 = 0x65,
00380 
00381         // VK_NUMPAD6 (66) Numeric keypad 6 key
00382         VK_NUMPAD6 = 0x66,
00383 
00384         // VK_NUMPAD7 (67) Numeric keypad 7 key
00385         VK_NUMPAD7 = 0x67,
00386 
00387         // VK_NUMPAD8 (68) Numeric keypad 8 key
00388         VK_NUMPAD8 = 0x68,
00389 
00390         // VK_NUMPAD9 (69) Numeric keypad 9 key
00391         VK_NUMPAD9 = 0x69,
00392 
00393         // VK_MULTIPLY (6A) Multiply key
00394         VK_MULTIPLY = 0x6A,
00395 
00396         // VK_ADD (6B) Add key
00397         VK_ADD = 0x6B,
00398 
00399         // VK_SEPARATOR (6C) Separator key
00400         VK_SEPARATOR = 0x6C,
00401 
00402         // VK_SUBTRACT (6D) Subtract key
00403         VK_SUBTRACT = 0x6D,
00404 
00405         // VK_DECIMAL (6E) Decimal key
00406         VK_DECIMAL = 0x6E,
00407 
00408         // VK_DIVIDE (6F) Divide key
00409         VK_DIVIDE = 0x6F,
00410 
00411         // VK_F1 (70) F1 key
00412         VK_F1 = 0x70,
00413 
00414         // VK_F2 (71) F2 key
00415         VK_F2 = 0x71,
00416 
00417         // VK_F3 (72) F3 key
00418         VK_F3 = 0x72,
00419 
00420         // VK_F4 (73) F4 key
00421         VK_F4 = 0x73,
00422 
00423         // VK_F5 (74) F5 key
00424         VK_F5 = 0x74,
00425 
00426         // VK_F6 (75) F6 key
00427         VK_F6 = 0x75,
00428 
00429         // VK_F7 (76) F7 key
00430         VK_F7 = 0x76,
00431 
00432         // VK_F8 (77) F8 key
00433         VK_F8 = 0x77,
00434 
00435         // VK_F9 (78) F9 key
00436         VK_F9 = 0x78,
00437 
00438         // VK_F10 (79) F10 key
00439         VK_F10 = 0x79,
00440 
00441         // VK_F11 (7A) F11 key
00442         VK_F11 = 0x7A,
00443 
00444         // VK_F12 (7B) F12 key
00445         VK_F12 = 0x7B,
00446 
00447         // VK_F13 (7C) F13 key
00448         VK_F13 = 0x7C,
00449 
00450         // VK_F14 (7D) F14 key
00451         VK_F14 = 0x7D,
00452 
00453         // VK_F15 (7E) F15 key
00454         VK_F15 = 0x7E,
00455 
00456         // VK_F16 (7F) F16 key
00457         VK_F16 = 0x7F,
00458 
00459         // VK_F17 (80H) F17 key
00460         VK_F17 = 0x80,
00461 
00462         // VK_F18 (81H) F18 key
00463         VK_F18 = 0x81,
00464 
00465         // VK_F19 (82H) F19 key
00466         VK_F19 = 0x82,
00467 
00468         // VK_F20 (83H) F20 key
00469         VK_F20 = 0x83,
00470 
00471         // VK_F21 (84H) F21 key
00472         VK_F21 = 0x84,
00473 
00474         // VK_F22 (85H) F22 key
00475         VK_F22 = 0x85,
00476 
00477         // VK_F23 (86H) F23 key
00478         VK_F23 = 0x86,
00479 
00480         // VK_F24 (87H) F24 key
00481         VK_F24 = 0x87,
00482 
00483         // VK_NUMLOCK (90) NUM LOCK key
00484         VK_NUMLOCK = 0x90,
00485 
00486         // VK_SCROLL (91) SCROLL LOCK key
00487         VK_SCROLL = 0x91,
00488 
00489         // VK_LSHIFT (A0) Left SHIFT key
00490         VK_LSHIFT = 0xA0,
00491 
00492         // VK_RSHIFT (A1) Right SHIFT key
00493         VK_RSHIFT = 0xA1,
00494 
00495         // VK_LCONTROL (A2) Left CONTROL key
00496         VK_LCONTROL = 0xA2,
00497 
00498         // VK_RCONTROL (A3) Right CONTROL key
00499         VK_RCONTROL = 0xA3,
00500 
00501         // VK_LMENU (A4) Left MENU key
00502         VK_LMENU = 0xA4,
00503 
00504         // VK_RMENU (A5) Right MENU key
00505         VK_RMENU = 0xA5,
00506 
00507         // VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
00508         VK_BROWSER_BACK = 0xA6,
00509 
00510         // VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
00511         VK_BROWSER_FORWARD = 0xA7,
00512 
00513         // VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
00514         VK_BROWSER_REFRESH = 0xA8,
00515 
00516         // VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
00517         VK_BROWSER_STOP = 0xA9,
00518 
00519         // VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
00520         VK_BROWSER_SEARCH = 0xAA,
00521 
00522         // VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
00523         VK_BROWSER_FAVORITES = 0xAB,
00524 
00525         // VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
00526         VK_BROWSER_HOME = 0xAC,
00527 
00528         // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
00529         VK_VOLUME_MUTE = 0xAD,
00530 
00531         // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
00532         VK_VOLUME_DOWN = 0xAE,
00533 
00534         // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
00535         VK_VOLUME_UP = 0xAF,
00536 
00537         // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
00538         VK_MEDIA_NEXT_TRACK = 0xB0,
00539 
00540         // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
00541         VK_MEDIA_PREV_TRACK = 0xB1,
00542 
00543         // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
00544         VK_MEDIA_STOP = 0xB2,
00545 
00546         // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
00547         VK_MEDIA_PLAY_PAUSE = 0xB3,
00548 
00549         // VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
00550         VK_MEDIA_LAUNCH_MAIL = 0xB4,
00551 
00552         // VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
00553         VK_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5,
00554 
00555         // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
00556         VK_MEDIA_LAUNCH_APP1 = 0xB6,
00557 
00558         // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
00559         VK_MEDIA_LAUNCH_APP2 = 0xB7,
00560 
00561         // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
00562         VK_OEM_1 = 0xBA,
00563 
00564         // VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
00565         VK_OEM_PLUS = 0xBB,
00566 
00567         // VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
00568         VK_OEM_COMMA = 0xBC,
00569 
00570         // VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
00571         VK_OEM_MINUS = 0xBD,
00572 
00573         // VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
00574         VK_OEM_PERIOD = 0xBE,
00575 
00576         // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
00577         VK_OEM_2 = 0xBF,
00578 
00579         // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
00580         VK_OEM_3 = 0xC0,
00581 
00582         // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
00583         VK_OEM_4 = 0xDB,
00584 
00585         // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
00586         VK_OEM_5 = 0xDC,
00587 
00588         // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
00589         VK_OEM_6 = 0xDD,
00590 
00591         // VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
00592         VK_OEM_7 = 0xDE,
00593 
00594         // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
00595         VK_OEM_8 = 0xDF,
00596 
00597         // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
00598         VK_OEM_102 = 0xE2,
00599 
00600         // VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
00601         VK_PROCESSKEY = 0xE5,
00602 
00603         // VK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
00604         VK_PACKET = 0xE7,
00605 
00606         // VK_ATTN (F6) Attn key
00607         VK_ATTN = 0xF6,
00608 
00609         // VK_CRSEL (F7) CrSel key
00610         VK_CRSEL = 0xF7,
00611 
00612         // VK_EXSEL (F8) ExSel key
00613         VK_EXSEL = 0xF8,
00614 
00615         // VK_EREOF (F9) Erase EOF key
00616         VK_EREOF = 0xF9,
00617 
00618         // VK_PLAY (FA) Play key
00619         VK_PLAY = 0xFA,
00620 
00621         // VK_ZOOM (FB) Zoom key
00622         VK_ZOOM = 0xFB,
00623 
00624         // VK_NONAME (FC) Reserved for future use
00625         VK_NONAME = 0xFC,
00626 
00627         // VK_PA1 (FD) PA1 key
00628         VK_PA1 = 0xFD,
00629 
00630         // VK_OEM_CLEAR (FE) Clear key
00631         VK_OEM_CLEAR = 0xFE,
00632 
00633         VK_UNKOWN = 0
00634       };
00635    };
00636 }
00637 
00638 #endif

Generated on Wed Nov 21 20:04:16 2007 for Origyn Web Browser by Doxygen 1.5.3

pleyo.com
pleyo.com