鍵盤的key code |
答題得分者是:pwipwi
|
benson5033
一般會員 發表:44 回覆:47 積分:18 註冊:2004-08-16 發送簡訊給我 |
|
nlj859
資深會員 發表:139 回覆:375 積分:322 註冊:2004-03-20 發送簡訊給我 |
|
benson5033
一般會員 發表:44 回覆:47 積分:18 註冊:2004-08-16 發送簡訊給我 |
|
andychang1690
資深會員 發表:20 回覆:694 積分:442 註冊:2003-03-14 發送簡訊給我 |
benson5033: 當MouseMove,MouseUp,MouseDown事件產生時,以MouseDown為例 void __fastcall TForm1::Image1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { //按下Mouse左鍵ssLeft及Shift鍵ssShift if ( Shift.Contains(ssLeft) && Shift.Contains(ssShift)) // 處理之..... } ssShift The Shift key is held down. ssAlt The Alt key is held down. ssCtrl The Ctrl key is held down. ssLeft The left mouse button is held down. ssRight The right mouse button is held down. ssMiddle The middle mouse button is held down. ssDouble The mouse was double-clicked. BCB Help的TShiftState type查一下 請參考!Andy Chang
------
Andy Chang |
pwipwi
版主 發表:68 回覆:629 積分:349 註冊:2004-04-08 發送簡訊給我 |
|
benson5033
一般會員 發表:44 回覆:47 積分:18 註冊:2004-08-16 發送簡訊給我 |
|
conundrum
尊榮會員 發表:893 回覆:1272 積分:643 註冊:2004-01-06 發送簡訊給我 |
http://www.delphi-source.de/grundlagen/codes/vks.php Virtuelle Tastencodes (in OnKeyDown und OnKeyUp verwendet) Konstante Hex. Taste VK_LBUTTON 01 Linke Maustaste VK_RBUTTON 02 Rechte Maustaste CK_CANCEL 03 STRG Untbr-Tasten VK_MBUTTON Mittlere Maustaste VK_BACK 08 BACKSPACE-Taste VK_TAB 09 TAB-Taste VK_CLEAR Taste L飉chen VK_RETURN 0D Return-Taste VK_SHIFT 10 Shift-Taste VK_CONTROL 11 Strg-Taste VK_MENU 12 ALT-Taste VK_PAUSE 13 Pause-Taste VK_CAPITAL 14 CAPS LOCK-Taste VK_ESCAPE 1B ESC-Taste VK_SPACE 20 Leertaste VK_PRIOR 21 Bild nach oben-Taste VK_NEXT 22 Bild nach unten-Taste VK_END 23 Ende-Taste VK_HOME 24 Pos1-Taste VK_LEFT 25 Cursortaste links VK_UP 26 Cursortaste oben VK_RIGHT 27 Cursortaste rechts VK_DOWN 28 Cursortaste unten VK_SELECT 29 Taste Select VK_PRINT 2A Taste Druck (tastaturspezifisch) VK_EXECUTE 2B Taste Ausf?ren VK_SNAPSHOT 2C Druck-Taste VK_INSERT 2D Einfg-Taste VK_DELETE 2E Entf-Taste VK_HELP Hilfe-Taste VK_LWIN Linke Windows-Taste (Microsoft-Tastatur) VK_RWIN Rechte Windows-Taste (Microsoft-Tastatur) VK_APPS Anwendungstaste (Microsoft-Tastatur) VK_0 30 Taste 0 VK_1 31 Taste 1 VK_2 32 Taste 2 VK_3 33 Taste 3 VK_4 34 Taste 4 VK_5 35 Taste 5 VK_6 36 Taste 6 VK_7 37 Taste 7 VK_8 38 Taste 8 VK_9 39 Taste 9 VK_A 41 Taste A VK_B 42 Taste B VK_C 43 Taste C VK_D 44 Taste D VK_E 45 Taste E VK_F 46 Taste F VK_G 47 Taste G VK_H 48 Taste H VK_I 49 Taste I VK_J 4A Taste J VK_K 4B Taste K VK_L 4C Taste L VK_M 4D Taste M VK_N 4E Taste N VK_O 4F Taste O VK_P 50 Taste P VK_Q 51 Taste Q VK_R 52 Taste R VK_S 53 Taste S VK_T 54 Taste T VK_U 55 Taste U VK_V 56 Taste V VK_W 57 Taste W VK_X 58 Taste X VK_Y 59 Taste Y VK_Z 5A Taste Z VK_NUMPAD0 60 Numerisches Tastenfeld, Taste 0 VK_NUMPAD1 61 Numerisches Tastenfeld, Taste 1 VK_NUMPAD2 62 Numerisches Tastenfeld, Taste 2 VK_NUMPAD3 63 Numerisches Tastenfeld, Taste 3 VK_NUMPAD4 64 Numerisches Tastenfeld, Taste 4 VK_NUMPAD5 65 Numerisches Tastenfeld, Taste 5 VK_NUMPAD6 66 Numerisches Tastenfeld, Taste 6 VK_NUMPAD7 67 Numerisches Tastenfeld, Taste 7 VK_NUMPAD8 68 Numerisches Tastenfeld, Taste 8 VK_NUMPAD9 69 Numerisches Tastenfeld, Taste 9 VK_MULTIPLY 6A Multiplikationstaste VK_ADD 6B Additionstaste VK_SEPARATOR 6C Taste . (numerischer Tastaturblock) VK_SUBTRACT 6D Subtraktionstaste VK_DECIMAL 6E Taste , (numerischer Tastaturblock) VK_DIVIDE 6F Divisionstaste VK_F1 70 F1-Taste VK_F2 71 F2-Taste VK_F3 72 F3-Taste VK_F4 73 F4-Taste VK_F5 74 F5-Taste VK_F6 75 F6-Taste VK_F7 76 F7-Taste VK_F8 77 F8-Taste VK_F9 78 F9-Taste VK_F10 79 F10-Taste VK_F11 7A F11-Taste VK_F12 7B F12-Taste VK_NUMLOCK 90 NUM LOCK-Taste VK_SCROLL 91 SCROLL LOCK-Taste VK_LSHIFT Linke Umschalt-Taste (nur mit GetAsyncKeyState und GetKeyState verwendet) VK_RSHIFT Rechte Umschalt-Taste (nur mit GetAsyncKeyState und GetKeyState verwendet) VK_LCONTROL Linke Strg-Taste (nur mit GetAsyncKeyState und GetKeyState verwendet) VK_RCONTROL Rechte Strg-Taste (nur mit GetAsyncKeyState und GetKeyState verwendet) VK_LMENU Linke Alt-Taste (nur mit GetAsyncKeyState und GetKeyState verwendet) VK_RMENU Rechte Alt-Taste (nur mit GetAsyncKeyState und GetKeyState verwendet) VK_PROCESSKEY Taste Process VK_ATTN Taste Attn VK_CRSEL Taste CrSel VK_EXSEL Taste ExSel VK_EREOF Taste Erase EOF VK_PLAY Taste Play VK_ZOOM Taste Zoom VK_NONAME Reserviert f? zuk?ftigen Gebrauch VK_PA1 Taste PA1 VK_OEM_CLEAR Taste Clear TShiftState (in OnKeyDown, OnKeyUp, OnMouseDown, OnMouseUp und OnMouseMove verwendet) Wert Bedeutung ssShift Die Taste Umschalt wird gedr?kt gehalten. ssAlt Die Taste Alt wird gedr?kt gehalten. ssCtrl Die Taste Strg wird gedr?kt gehalten. ssLeft Die linke Maustaste wird gedr?kt gehalten. ssRight Die rechte Maustaste wird gedr?kt gehalten. ssMiddle Die mittlere Maustaste wird gedr?kt gehalten. ssDouble Es wurde mit der Maus doppelgeklickt. http://dev.csdn.net/Develop/article/33/33985.shtm 鍵盤VK值列表 /* * Virtual Keys, Standard Set */ #define VK_LBUTTON 0x01 #define VK_RBUTTON 0x02 #define VK_CANCEL 0x03 #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */ #define VK_BACK 0x08 #define VK_TAB 0x09 #define VK_CLEAR 0x0C #define VK_RETURN 0x0D #define VK_SHIFT 0x10 #define VK_CONTROL 0x11 #define VK_MENU 0x12 #define VK_PAUSE 0x13 #define VK_CAPITAL 0x14 #define VK_KANA 0x15 #define VK_HANGEUL 0x15 /* old name - should be here for compatibility */ #define VK_HANGUL 0x15 #define VK_JUNJA 0x17 #define VK_FINAL 0x18 #define VK_HANJA 0x19 #define VK_KANJI 0x19 #define VK_ESCAPE 0x1B #define VK_CONVERT 0x1C #define VK_NONCONVERT 0x1D #define VK_ACCEPT 0x1E #define VK_MODECHANGE 0x1F #define VK_SPACE 0x20 #define VK_PRIOR 0x21 #define VK_NEXT 0x22 #define VK_END 0x23 #define VK_HOME 0x24 #define VK_LEFT 0x25 #define VK_UP 0x26 #define VK_RIGHT 0x27 #define VK_DOWN 0x28 #define VK_SELECT 0x29 #define VK_PRINT 0x2A #define VK_EXECUTE 0x2B #define VK_SNAPSHOT 0x2C #define VK_INSERT 0x2D #define VK_DELETE 0x2E #define VK_HELP 0x2F /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */ /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */ #define VK_LWIN 0x5B #define VK_RWIN 0x5C #define VK_APPS 0x5D #define VK_NUMPAD0 0x60 #define VK_NUMPAD1 0x61 #define VK_NUMPAD2 0x62 #define VK_NUMPAD3 0x63 #define VK_NUMPAD4 0x64 #define VK_NUMPAD5 0x65 #define VK_NUMPAD6 0x66 #define VK_NUMPAD7 0x67 #define VK_NUMPAD8 0x68 #define VK_NUMPAD9 0x69 #define VK_MULTIPLY 0x6A #define VK_ADD 0x6B #define VK_SEPARATOR 0x6C #define VK_SUBTRACT 0x6D #define VK_DECIMAL 0x6E #define VK_DIVIDE 0x6F #define VK_F1 0x70 #define VK_F2 0x71 #define VK_F3 0x72 #define VK_F4 0x73 #define VK_F5 0x74 #define VK_F6 0x75 #define VK_F7 0x76 #define VK_F8 0x77 #define VK_F9 0x78 #define VK_F10 0x79 #define VK_F11 0x7A #define VK_F12 0x7B #define VK_F13 0x7C #define VK_F14 0x7D #define VK_F15 0x7E #define VK_F16 0x7F #define VK_F17 0x80 #define VK_F18 0x81 #define VK_F19 0x82 #define VK_F20 0x83 #define VK_F21 0x84 #define VK_F22 0x85 #define VK_F23 0x86 #define VK_F24 0x87 #define VK_NUMLOCK 0x90 #define VK_SCROLL 0x91 /* * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys. * Used only as parameters to GetAsyncKeyState() and GetKeyState(). * No other API or message will distinguish left and right keys in this way. */ #define VK_LSHIFT 0xA0 #define VK_RSHIFT 0xA1 #define VK_LCONTROL 0xA2 #define VK_RCONTROL 0xA3 #define VK_LMENU 0xA4 #define VK_RMENU 0xA5 #if(WINVER >= 0x0400) #define VK_PROCESSKEY 0xE5 #endif /* WINVER >= 0x0400 */ #define VK_ATTN 0xF6 #define VK_CRSEL 0xF7 #define VK_EXSEL 0xF8 #define VK_EREOF 0xF9 #define VK_PLAY 0xFA #define VK_ZOOM 0xFB #define VK_NONAME 0xFC #define VK_PA1 0xFD #define VK_OEM_CLEAR 0xFE 作者Blog:http://blog.csdn.net/cryfish/順便po上卡好記 發表人 - conundrum 於 2004/09/18 02:08:56 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |