Changeset 106422 in webkit
- Timestamp:
- Jan 31, 2012 7:21:24 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106421 r106422 1 2012-01-31 Alexey Proskuryakov <ap@apple.com> 2 3 REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian 4 https://bugs.webkit.org/show_bug.cgi?id=77473 5 <rdar://problem/10751357> 6 7 Reviewed by Darin Adler. 8 9 Test: platform/mac/fast/events/non-roman-key-code.html 10 11 * WebCore.exp.in: 12 * platform/mac/PlatformEventFactoryMac.h: 13 * platform/mac/PlatformEventFactoryMac.mm: 14 (WebCore::keyIdentifierForKeyEvent): 15 (WebCore::windowsKeyCodeForKeyEvent): 16 Export functions for reuse in WebKit2. I did not attempt any larger refactoring at this time. 17 1 18 2012-01-31 Gregg Tavares <gman@google.com> 2 19 -
trunk/Source/WebCore/WebCore.exp.in
r106373 r106422 657 657 __ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE 658 658 __ZN7WebCore24FrameDestructionObserver14frameDestroyedEv 659 __ZN7WebCore24keyIdentifierForKeyEventEP7NSEvent 659 660 __ZN7WebCore24notifyHistoryItemChangedE 660 661 __ZN7WebCore25HistoryPropertyListWriter11releaseDataEv … … 670 671 __ZN7WebCore25computeViewportAttributesENS_17ViewportArgumentsEiiiiNS_7IntSizeE 671 672 __ZN7WebCore25contextMenuItemTagOutlineEv 673 __ZN7WebCore25windowsKeyCodeForKeyEventEP7NSEvent 672 674 __ZN7WebCore26CSSMutableStyleDeclarationC1Ev 673 675 __ZN7WebCore26UserTypingGestureIndicator27processingUserTypingGestureEv -
trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.h
r103997 r106422 47 47 }; 48 48 49 #if PLATFORM(MAC) && defined(__OBJC__) 49 50 // FIXME: This doesn't really belong here. 51 IntPoint globalPoint(const NSPoint& windowPoint, NSWindow *); 50 52 51 #if PLATFORM(MAC) && defined(__OBJC__) 52 IntPoint globalPoint(const NSPoint& windowPoint, NSWindow *); 53 // FIXME: WebKit2 has a lot of code copy/pasted from PlatformEventFactoryMac in WebEventFactory. It should be carefully shared with WebCore. 54 int windowsKeyCodeForKeyEvent(NSEvent*); 55 String keyIdentifierForKeyEvent(NSEvent*); 56 53 57 #endif 54 58 -
trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
r106021 r106422 243 243 } 244 244 245 staticString keyIdentifierForKeyEvent(NSEvent* event)245 String keyIdentifierForKeyEvent(NSEvent* event) 246 246 { 247 247 if ([event type] == NSFlagsChanged) … … 319 319 } 320 320 321 staticint windowsKeyCodeForKeyEvent(NSEvent* event)321 int windowsKeyCodeForKeyEvent(NSEvent* event) 322 322 { 323 323 int code = 0; -
trunk/Source/WebKit2/ChangeLog
r106375 r106422 1 2012-01-31 Alexey Proskuryakov <ap@apple.com> 2 3 REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian 4 https://bugs.webkit.org/show_bug.cgi?id=77473 5 <rdar://problem/10751357> 6 7 Reviewed by Darin Adler. 8 9 * Shared/mac/WebEventFactory.mm: Removed broken copy/pasted implementation in favor of 10 WebCore ones. 11 1 12 2012-01-31 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm
r106021 r106422 29 29 #import "WebKitSystemInterface.h" 30 30 #import <wtf/ASCIICType.h> 31 #import <WebCore/PlatformEventFactoryMac.h> 31 32 #import <WebCore/Scrollbar.h> 32 33 #import <WebCore/WindowsKeyboardCodes.h> … … 35 36 36 37 namespace WebKit { 38 39 // FIXME: This is a huge copy/paste from WebCore/PlatformEventFactoryMac.mm. The code should be merged. 37 40 38 41 static WebMouseEvent::Button currentMouseButton() … … 276 279 } 277 280 278 static String keyIdentifierForKeyEvent(NSEvent* event)279 {280 if ([event type] == NSFlagsChanged)281 switch ([event keyCode]) {282 case 54: // Right Command283 case 55: // Left Command284 return String("Meta");285 286 case 57: // Capslock287 return String("CapsLock");288 289 case 56: // Left Shift290 case 60: // Right Shift291 return String("Shift");292 293 case 58: // Left Alt294 case 61: // Right Alt295 return String("Alt");296 297 case 59: // Left Ctrl298 case 62: // Right Ctrl299 return String("Control");300 301 default:302 ASSERT_NOT_REACHED();303 return String("");304 }305 306 NSString *s = [event charactersIgnoringModifiers];307 if ([s length] != 1)308 return String("Unidentified");309 310 unichar c = [s characterAtIndex:0];311 switch (c) {312 // Each identifier listed in the DOM spec is listed here.313 // Many are simply commented out since they do not appear on standard Macintosh keyboards314 // or are on a key that doesn't have a corresponding character.315 316 // "Accept"317 // "AllCandidates"318 319 // "Alt"320 case NSMenuFunctionKey:321 return String("Alt");322 323 // "Apps"324 // "BrowserBack"325 // "BrowserForward"326 // "BrowserHome"327 // "BrowserRefresh"328 // "BrowserSearch"329 // "BrowserStop"330 // "CapsLock"331 332 // "Clear"333 case NSClearLineFunctionKey:334 return String("Clear");335 336 // "CodeInput"337 // "Compose"338 // "Control"339 // "Crsel"340 // "Convert"341 // "Copy"342 // "Cut"343 344 // "Down"345 case NSDownArrowFunctionKey:346 return String("Down");347 // "End"348 case NSEndFunctionKey:349 return String("End");350 // "Enter"351 case 0x3: case 0xA: case 0xD: // Macintosh calls the one on the main keyboard Return, but Windows calls it Enter, so we'll do the same for the DOM352 return String("Enter");353 354 // "EraseEof"355 356 // "Execute"357 case NSExecuteFunctionKey:358 return String("Execute");359 360 // "Exsel"361 362 // "F1"363 case NSF1FunctionKey:364 return String("F1");365 // "F2"366 case NSF2FunctionKey:367 return String("F2");368 // "F3"369 case NSF3FunctionKey:370 return String("F3");371 // "F4"372 case NSF4FunctionKey:373 return String("F4");374 // "F5"375 case NSF5FunctionKey:376 return String("F5");377 // "F6"378 case NSF6FunctionKey:379 return String("F6");380 // "F7"381 case NSF7FunctionKey:382 return String("F7");383 // "F8"384 case NSF8FunctionKey:385 return String("F8");386 // "F9"387 case NSF9FunctionKey:388 return String("F9");389 // "F10"390 case NSF10FunctionKey:391 return String("F10");392 // "F11"393 case NSF11FunctionKey:394 return String("F11");395 // "F12"396 case NSF12FunctionKey:397 return String("F12");398 // "F13"399 case NSF13FunctionKey:400 return String("F13");401 // "F14"402 case NSF14FunctionKey:403 return String("F14");404 // "F15"405 case NSF15FunctionKey:406 return String("F15");407 // "F16"408 case NSF16FunctionKey:409 return String("F16");410 // "F17"411 case NSF17FunctionKey:412 return String("F17");413 // "F18"414 case NSF18FunctionKey:415 return String("F18");416 // "F19"417 case NSF19FunctionKey:418 return String("F19");419 // "F20"420 case NSF20FunctionKey:421 return String("F20");422 // "F21"423 case NSF21FunctionKey:424 return String("F21");425 // "F22"426 case NSF22FunctionKey:427 return String("F22");428 // "F23"429 case NSF23FunctionKey:430 return String("F23");431 // "F24"432 case NSF24FunctionKey:433 return String("F24");434 435 // "FinalMode"436 437 // "Find"438 case NSFindFunctionKey:439 return String("Find");440 441 // "FullWidth"442 // "HalfWidth"443 // "HangulMode"444 // "HanjaMode"445 446 // "Help"447 case NSHelpFunctionKey:448 return String("Help");449 450 // "Hiragana"451 452 // "Home"453 case NSHomeFunctionKey:454 return String("Home");455 // "Insert"456 case NSInsertFunctionKey:457 return String("Insert");458 459 // "JapaneseHiragana"460 // "JapaneseKatakana"461 // "JapaneseRomaji"462 // "JunjaMode"463 // "KanaMode"464 // "KanjiMode"465 // "Katakana"466 // "LaunchApplication1"467 // "LaunchApplication2"468 // "LaunchMail"469 470 // "Left"471 case NSLeftArrowFunctionKey:472 return String("Left");473 474 // "Meta"475 // "MediaNextTrack"476 // "MediaPlayPause"477 // "MediaPreviousTrack"478 // "MediaStop"479 480 // "ModeChange"481 case NSModeSwitchFunctionKey:482 return String("ModeChange");483 484 // "Nonconvert"485 // "NumLock"486 487 // "PageDown"488 case NSPageDownFunctionKey:489 return String("PageDown");490 // "PageUp"491 case NSPageUpFunctionKey:492 return String("PageUp");493 494 // "Paste"495 496 // "Pause"497 case NSPauseFunctionKey:498 return String("Pause");499 500 // "Play"501 // "PreviousCandidate"502 503 // "PrintScreen"504 case NSPrintScreenFunctionKey:505 return String("PrintScreen");506 507 // "Process"508 // "Props"509 510 // "Right"511 case NSRightArrowFunctionKey:512 return String("Right");513 514 // "RomanCharacters"515 516 // "Scroll"517 case NSScrollLockFunctionKey:518 return String("Scroll");519 // "Select"520 case NSSelectFunctionKey:521 return String("Select");522 523 // "SelectMedia"524 // "Shift"525 526 // "Stop"527 case NSStopFunctionKey:528 return String("Stop");529 // "Up"530 case NSUpArrowFunctionKey:531 return String("Up");532 // "Undo"533 case NSUndoFunctionKey:534 return String("Undo");535 536 // "VolumeDown"537 // "VolumeMute"538 // "VolumeUp"539 // "Win"540 // "Zoom"541 542 // More function keys, not in the key identifier specification.543 case NSF25FunctionKey:544 return String("F25");545 case NSF26FunctionKey:546 return String("F26");547 case NSF27FunctionKey:548 return String("F27");549 case NSF28FunctionKey:550 return String("F28");551 case NSF29FunctionKey:552 return String("F29");553 case NSF30FunctionKey:554 return String("F30");555 case NSF31FunctionKey:556 return String("F31");557 case NSF32FunctionKey:558 return String("F32");559 case NSF33FunctionKey:560 return String("F33");561 case NSF34FunctionKey:562 return String("F34");563 case NSF35FunctionKey:564 return String("F35");565 566 // Turn 0x7F into 0x08, because backspace needs to always be 0x08.567 case 0x7F:568 return String("U+0008");569 // Standard says that DEL becomes U+007F.570 case NSDeleteFunctionKey:571 return String("U+007F");572 573 // Always use 0x09 for tab instead of AppKit's backtab character.574 case NSBackTabCharacter:575 return String("U+0009");576 577 case NSBeginFunctionKey:578 case NSBreakFunctionKey:579 case NSClearDisplayFunctionKey:580 case NSDeleteCharFunctionKey:581 case NSDeleteLineFunctionKey:582 case NSInsertCharFunctionKey:583 case NSInsertLineFunctionKey:584 case NSNextFunctionKey:585 case NSPrevFunctionKey:586 case NSPrintFunctionKey:587 case NSRedoFunctionKey:588 case NSResetFunctionKey:589 case NSSysReqFunctionKey:590 case NSSystemFunctionKey:591 case NSUserFunctionKey:592 // FIXME: We should use something other than the vendor-area Unicode values for the above keys.593 // For now, just fall through to the default.594 default:595 return String::format("U+%04X", toASCIIUpper(c));596 }597 }598 599 281 static bool isKeypadEvent(NSEvent* event) 600 282 { … … 632 314 633 315 return false; 634 }635 636 static int windowsKeyCodeForKeyEvent(NSEvent* event)637 {638 switch ([event keyCode]) {639 // VK_TAB (09) TAB key640 case 48: return 0x09;641 642 // VK_APPS (5D) Right windows/meta key643 case 54: // Right Command644 return 0x5D;645 646 // VK_LWIN (5B) Left windows/meta key647 case 55: // Left Command648 return 0x5B;649 650 // VK_CAPITAL (14) caps locks key651 case 57: // Capslock652 return 0x14;653 654 // VK_SHIFT (10) either shift key655 case 56: // Left Shift656 case 60: // Right Shift657 return 0x10;658 659 // VK_MENU (12) either alt key660 case 58: // Left Alt661 case 61: // Right Alt662 return 0x12;663 664 // VK_CONTROL (11) either ctrl key665 case 59: // Left Ctrl666 case 62: // Right Ctrl667 return 0x11;668 669 // VK_CLEAR (0C) CLEAR key670 case 71: return 0x0C;671 672 // VK_NUMPAD0 (60) Numeric keypad 0 key673 case 82: return 0x60;674 // VK_NUMPAD1 (61) Numeric keypad 1 key675 case 83: return 0x61;676 // VK_NUMPAD2 (62) Numeric keypad 2 key677 case 84: return 0x62;678 // VK_NUMPAD3 (63) Numeric keypad 3 key679 case 85: return 0x63;680 // VK_NUMPAD4 (64) Numeric keypad 4 key681 case 86: return 0x64;682 // VK_NUMPAD5 (65) Numeric keypad 5 key683 case 87: return 0x65;684 // VK_NUMPAD6 (66) Numeric keypad 6 key685 case 88: return 0x66;686 // VK_NUMPAD7 (67) Numeric keypad 7 key687 case 89: return 0x67;688 // VK_NUMPAD8 (68) Numeric keypad 8 key689 case 91: return 0x68;690 // VK_NUMPAD9 (69) Numeric keypad 9 key691 case 92: return 0x69;692 // VK_MULTIPLY (6A) Multiply key693 case 67: return 0x6A;694 // VK_ADD (6B) Add key695 case 69: return 0x6B;696 697 // VK_SUBTRACT (6D) Subtract key698 case 78: return 0x6D;699 // VK_DECIMAL (6E) Decimal key700 case 65: return 0x6E;701 // VK_DIVIDE (6F) Divide key702 case 75: return 0x6F;703 }704 705 if ([event type] == NSFlagsChanged)706 return 0;707 708 NSString* s = [event charactersIgnoringModifiers];709 if ([s length] != 1)710 return 0;711 712 switch ([s characterAtIndex:0]) {713 // VK_LBUTTON (01) Left mouse button714 // VK_RBUTTON (02) Right mouse button715 // VK_CANCEL (03) Control-break processing716 // VK_MBUTTON (04) Middle mouse button (three-button mouse)717 // VK_XBUTTON1 (05)718 // VK_XBUTTON2 (06)719 720 // VK_BACK (08) BACKSPACE key721 case 8: case 0x7F: return 0x08;722 // VK_TAB (09) TAB key723 case 9: return 0x09;724 725 // VK_CLEAR (0C) CLEAR key726 // handled by key code above727 728 // VK_RETURN (0D)729 case 0xD: case 3: return 0x0D;730 731 // VK_SHIFT (10) SHIFT key732 // VK_CONTROL (11) CTRL key733 // VK_MENU (12) ALT key734 735 // VK_PAUSE (13) PAUSE key736 case NSPauseFunctionKey: return 0x13;737 738 // VK_CAPITAL (14) CAPS LOCK key739 // VK_KANA (15) Input Method Editor (IME) Kana mode740 // VK_HANGUEL (15) IME Hanguel mode (maintained for compatibility; use VK_HANGUL)741 // VK_HANGUL (15) IME Hangul mode742 // VK_JUNJA (17) IME Junja mode743 // VK_FINAL (18) IME final mode744 // VK_HANJA (19) IME Hanja mode745 // VK_KANJI (19) IME Kanji mode746 747 // VK_ESCAPE (1B) ESC key748 case 0x1B: return 0x1B;749 750 // VK_CONVERT (1C) IME convert751 // VK_NONCONVERT (1D) IME nonconvert752 // VK_ACCEPT (1E) IME accept753 // VK_MODECHANGE (1F) IME mode change request754 755 // VK_SPACE (20) SPACEBAR756 case ' ': return 0x20;757 // VK_PRIOR (21) PAGE UP key758 case NSPageUpFunctionKey: return 0x21;759 // VK_NEXT (22) PAGE DOWN key760 case NSPageDownFunctionKey: return 0x22;761 // VK_END (23) END key762 case NSEndFunctionKey: return 0x23;763 // VK_HOME (24) HOME key764 case NSHomeFunctionKey: return 0x24;765 // VK_LEFT (25) LEFT ARROW key766 case NSLeftArrowFunctionKey: return 0x25;767 // VK_UP (26) UP ARROW key768 case NSUpArrowFunctionKey: return 0x26;769 // VK_RIGHT (27) RIGHT ARROW key770 case NSRightArrowFunctionKey: return 0x27;771 // VK_DOWN (28) DOWN ARROW key772 case NSDownArrowFunctionKey: return 0x28;773 // VK_SELECT (29) SELECT key774 case NSSelectFunctionKey: return 0x29;775 // VK_PRINT (2A) PRINT key776 case NSPrintFunctionKey: return 0x2A;777 // VK_EXECUTE (2B) EXECUTE key778 case NSExecuteFunctionKey: return 0x2B;779 // VK_SNAPSHOT (2C) PRINT SCREEN key780 case NSPrintScreenFunctionKey: return 0x2C;781 // VK_INSERT (2D) INS key782 case NSInsertFunctionKey: case NSHelpFunctionKey: return 0x2D;783 // VK_DELETE (2E) DEL key784 case NSDeleteFunctionKey: return 0x2E;785 786 // VK_HELP (2F) HELP key787 788 // (30) 0 key789 case '0': case ')': return 0x30;790 // (31) 1 key791 case '1': case '!': return 0x31;792 // (32) 2 key793 case '2': case '@': return 0x32;794 // (33) 3 key795 case '3': case '#': return 0x33;796 // (34) 4 key797 case '4': case '$': return 0x34;798 // (35) 5 key799 case '5': case '%': return 0x35;800 // (36) 6 key801 case '6': case '^': return 0x36;802 // (37) 7 key803 case '7': case '&': return 0x37;804 // (38) 8 key805 case '8': case '*': return 0x38;806 // (39) 9 key807 case '9': case '(': return 0x39;808 // (41) A key809 case 'a': case 'A': return 0x41;810 // (42) B key811 case 'b': case 'B': return 0x42;812 // (43) C key813 case 'c': case 'C': return 0x43;814 // (44) D key815 case 'd': case 'D': return 0x44;816 // (45) E key817 case 'e': case 'E': return 0x45;818 // (46) F key819 case 'f': case 'F': return 0x46;820 // (47) G key821 case 'g': case 'G': return 0x47;822 // (48) H key823 case 'h': case 'H': return 0x48;824 // (49) I key825 case 'i': case 'I': return 0x49;826 // (4A) J key827 case 'j': case 'J': return 0x4A;828 // (4B) K key829 case 'k': case 'K': return 0x4B;830 // (4C) L key831 case 'l': case 'L': return 0x4C;832 // (4D) M key833 case 'm': case 'M': return 0x4D;834 // (4E) N key835 case 'n': case 'N': return 0x4E;836 // (4F) O key837 case 'o': case 'O': return 0x4F;838 // (50) P key839 case 'p': case 'P': return 0x50;840 // (51) Q key841 case 'q': case 'Q': return 0x51;842 // (52) R key843 case 'r': case 'R': return 0x52;844 // (53) S key845 case 's': case 'S': return 0x53;846 // (54) T key847 case 't': case 'T': return 0x54;848 // (55) U key849 case 'u': case 'U': return 0x55;850 // (56) V key851 case 'v': case 'V': return 0x56;852 // (57) W key853 case 'w': case 'W': return 0x57;854 // (58) X key855 case 'x': case 'X': return 0x58;856 // (59) Y key857 case 'y': case 'Y': return 0x59;858 // (5A) Z key859 case 'z': case 'Z': return 0x5A;860 861 // VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard)862 // VK_RWIN (5C) Right Windows key (Natural keyboard)863 // VK_APPS (5D) Applications key (Natural keyboard)864 // VK_SLEEP (5F) Computer Sleep key865 866 // VK_NUMPAD0 (60) Numeric keypad 0 key867 // VK_NUMPAD1 (61) Numeric keypad 1 key868 // VK_NUMPAD2 (62) Numeric keypad 2 key869 // VK_NUMPAD3 (63) Numeric keypad 3 key870 // VK_NUMPAD4 (64) Numeric keypad 4 key871 // VK_NUMPAD5 (65) Numeric keypad 5 key872 // VK_NUMPAD6 (66) Numeric keypad 6 key873 // VK_NUMPAD7 (67) Numeric keypad 7 key874 // VK_NUMPAD8 (68) Numeric keypad 8 key875 // VK_NUMPAD9 (69) Numeric keypad 9 key876 // VK_MULTIPLY (6A) Multiply key877 // VK_ADD (6B) Add key878 // handled by key code above879 880 // VK_SEPARATOR (6C) Separator key881 882 // VK_SUBTRACT (6D) Subtract key883 // VK_DECIMAL (6E) Decimal key884 // VK_DIVIDE (6F) Divide key885 // handled by key code above886 887 // VK_F1 (70) F1 key888 case NSF1FunctionKey: return 0x70;889 // VK_F2 (71) F2 key890 case NSF2FunctionKey: return 0x71;891 // VK_F3 (72) F3 key892 case NSF3FunctionKey: return 0x72;893 // VK_F4 (73) F4 key894 case NSF4FunctionKey: return 0x73;895 // VK_F5 (74) F5 key896 case NSF5FunctionKey: return 0x74;897 // VK_F6 (75) F6 key898 case NSF6FunctionKey: return 0x75;899 // VK_F7 (76) F7 key900 case NSF7FunctionKey: return 0x76;901 // VK_F8 (77) F8 key902 case NSF8FunctionKey: return 0x77;903 // VK_F9 (78) F9 key904 case NSF9FunctionKey: return 0x78;905 // VK_F10 (79) F10 key906 case NSF10FunctionKey: return 0x79;907 // VK_F11 (7A) F11 key908 case NSF11FunctionKey: return 0x7A;909 // VK_F12 (7B) F12 key910 case NSF12FunctionKey: return 0x7B;911 // VK_F13 (7C) F13 key912 case NSF13FunctionKey: return 0x7C;913 // VK_F14 (7D) F14 key914 case NSF14FunctionKey: return 0x7D;915 // VK_F15 (7E) F15 key916 case NSF15FunctionKey: return 0x7E;917 // VK_F16 (7F) F16 key918 case NSF16FunctionKey: return 0x7F;919 // VK_F17 (80H) F17 key920 case NSF17FunctionKey: return 0x80;921 // VK_F18 (81H) F18 key922 case NSF18FunctionKey: return 0x81;923 // VK_F19 (82H) F19 key924 case NSF19FunctionKey: return 0x82;925 // VK_F20 (83H) F20 key926 case NSF20FunctionKey: return 0x83;927 // VK_F21 (84H) F21 key928 case NSF21FunctionKey: return 0x84;929 // VK_F22 (85H) F22 key930 case NSF22FunctionKey: return 0x85;931 // VK_F23 (86H) F23 key932 case NSF23FunctionKey: return 0x86;933 // VK_F24 (87H) F24 key934 case NSF24FunctionKey: return 0x87;935 936 // VK_NUMLOCK (90) NUM LOCK key937 938 // VK_SCROLL (91) SCROLL LOCK key939 case NSScrollLockFunctionKey: return 0x91;940 941 // VK_LSHIFT (A0) Left SHIFT key942 // VK_RSHIFT (A1) Right SHIFT key943 // VK_LCONTROL (A2) Left CONTROL key944 // VK_RCONTROL (A3) Right CONTROL key945 // VK_LMENU (A4) Left MENU key946 // VK_RMENU (A5) Right MENU key947 // VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key948 // VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key949 // VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key950 // VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key951 // VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key952 // VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key953 // VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key954 // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key955 // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key956 // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key957 // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key958 // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key959 // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key960 // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key961 // VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key962 // VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key963 // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key964 // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key965 966 // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key967 case ';': case ':': return 0xBA;968 // VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key969 case '=': case '+': return 0xBB;970 // VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key971 case ',': case '<': return 0xBC;972 // VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key973 case '-': case '_': return 0xBD;974 // VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key975 case '.': case '>': return 0xBE;976 // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key977 case '/': case '?': return 0xBF;978 // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key979 case '`': case '~': return 0xC0;980 // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key981 case '[': case '{': return 0xDB;982 // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key983 case '\\': case '|': return 0xDC;984 // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key985 case ']': case '}': return 0xDD;986 // 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' key987 case '\'': case '"': return 0xDE;988 989 // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.990 // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard991 // VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key992 // 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_KEYUP993 // VK_ATTN (F6) Attn key994 // VK_CRSEL (F7) CrSel key995 // VK_EXSEL (F8) ExSel key996 // VK_EREOF (F9) Erase EOF key997 // VK_PLAY (FA) Play key998 // VK_ZOOM (FB) Zoom key999 // VK_NONAME (FC) Reserved for future use1000 // VK_PA1 (FD) PA1 key1001 // VK_OEM_CLEAR (FE) Clear key1002 }1003 1004 return 0;1005 316 } 1006 317 -
trunk/Tools/ChangeLog
r106416 r106422 1 2012-01-31 Alexey Proskuryakov <ap@apple.com> 2 3 REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian 4 https://bugs.webkit.org/show_bug.cgi?id=77473 5 <rdar://problem/10751357> 6 7 Reviewed by Darin Adler. 8 9 * DumpRenderTree/mac/EventSendingController.mm: 10 (-[EventSendingController keyDown:withModifiers:withLocation:]): 11 * WebKitTestRunner/mac/EventSenderProxy.mm: 12 (WTR::EventSenderProxy::keyDown): 13 Added a new special keyDown value to test this. 14 1 15 2012-01-31 Dirk Pranke <dpranke@chromium.org> 2 16 -
trunk/Tools/DumpRenderTree/mac/EventSendingController.mm
r85036 r106422 615 615 eventCharacter = [NSString stringWithCharacters:&ch length:1]; 616 616 keyCode = 0x0; // There is no known virtual key code for PrintScreen. 617 } else if ([character isEqualToString:@"cyrillicSmallLetterA"]) { 618 const unichar ch = 0x0430; 619 eventCharacter = [NSString stringWithCharacters:&ch length:1]; 620 keyCode = 0x3; // Shares key with "F" on Russian layout. 617 621 } 618 622 -
trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
r96439 r106422 249 249 eventCharacter = [NSString stringWithCharacters:&ch length:1]; 250 250 keyCode = 0x0; // There is no known virtual key code for PrintScreen. 251 } else if ([character isEqualToString:@"cyrillicSmallLetterA"]) { 252 const unichar ch = 0x0430; 253 eventCharacter = [NSString stringWithCharacters:&ch length:1]; 254 keyCode = 0x3; // Shares key with "F" on Russian layout. 251 255 } 252 256
Note: See TracChangeset
for help on using the changeset viewer.