Title: [116452] trunk
Revision
116452
Author
[email protected]
Date
2012-05-08 13:24:53 -0700 (Tue, 08 May 2012)

Log Message

[EFL] Handling of numeric-pad keys in EFL's PlatformKeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=85479

Patch by Mikhail Pozdnyakov <[email protected]> on 2012-05-08
Reviewed by Gustavo Noronha Silva.

Source/WebCore:

EFL's PlatformKeyboardEvent::isKeypad() now returns meaningful value.
Added numeric-pad keys to the Key Map and Windows Key Map.

No new tests.

* platform/efl/EflKeyboardUtilities.cpp:
(WebCore::createKeyMap):
(WebCore::createWindowsKeyMap):
* platform/efl/PlatformKeyboardEventEfl.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

LayoutTests:

Unskipped fast/events/keydown-numpad-keys.html.

* platform/efl/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (116451 => 116452)


--- trunk/LayoutTests/ChangeLog	2012-05-08 19:44:17 UTC (rev 116451)
+++ trunk/LayoutTests/ChangeLog	2012-05-08 20:24:53 UTC (rev 116452)
@@ -1,3 +1,14 @@
+2012-05-08  Mikhail Pozdnyakov  <[email protected]>
+
+        [EFL] Handling of numeric-pad keys in EFL's PlatformKeyboardEvent
+        https://bugs.webkit.org/show_bug.cgi?id=85479
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Unskipped fast/events/keydown-numpad-keys.html.
+
+        * platform/efl/Skipped:
+
 2012-05-04  Nikolas Zimmermann  <[email protected]>
 
         Tie lifetime of SVGAnimateElement::m_animatedType to the duration of the animation

Modified: trunk/LayoutTests/platform/efl/Skipped (116451 => 116452)


--- trunk/LayoutTests/platform/efl/Skipped	2012-05-08 19:44:17 UTC (rev 116451)
+++ trunk/LayoutTests/platform/efl/Skipped	2012-05-08 20:24:53 UTC (rev 116452)
@@ -951,7 +951,6 @@
 fast/events/js-keyboard-event-creation.html
 fast/events/key-events-in-input-button.html
 fast/events/key-events-in-input-text.html
-fast/events/keydown-numpad-keys.html
 fast/events/option-tab.html
 fast/events/special-key-events-in-input-text.html
 fast/forms/enter-clicks-buttons.html

Modified: trunk/Source/WebCore/ChangeLog (116451 => 116452)


--- trunk/Source/WebCore/ChangeLog	2012-05-08 19:44:17 UTC (rev 116451)
+++ trunk/Source/WebCore/ChangeLog	2012-05-08 20:24:53 UTC (rev 116452)
@@ -1,3 +1,21 @@
+2012-05-08  Mikhail Pozdnyakov  <[email protected]>
+
+        [EFL] Handling of numeric-pad keys in EFL's PlatformKeyboardEvent
+        https://bugs.webkit.org/show_bug.cgi?id=85479
+
+        Reviewed by Gustavo Noronha Silva.
+
+        EFL's PlatformKeyboardEvent::isKeypad() now returns meaningful value.
+        Added numeric-pad keys to the Key Map and Windows Key Map.
+
+        No new tests.
+
+        * platform/efl/EflKeyboardUtilities.cpp:
+        (WebCore::createKeyMap):
+        (WebCore::createWindowsKeyMap):
+        * platform/efl/PlatformKeyboardEventEfl.cpp:
+        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+
 2012-05-04  Nikolas Zimmermann  <[email protected]>
 
         Tie lifetime of SVGAnimateElement::m_animatedType to the duration of the animation

Modified: trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp (116451 => 116452)


--- trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp	2012-05-08 19:44:17 UTC (rev 116451)
+++ trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp	2012-05-08 20:24:53 UTC (rev 116452)
@@ -78,6 +78,17 @@
     keyMap().set("ISO_Left_Tab", "U+0009");
     keyMap().set("BackSpace", "U+0008");
     keyMap().set("space", "U+0020");
+    // Keypad location
+    keyMap().set("KP_Left", "Left");
+    keyMap().set("KP_Right", "Right");
+    keyMap().set("KP_Up", "Up");
+    keyMap().set("KP_Down", "Down");
+    keyMap().set("KP_Prior", "PageUp");
+    keyMap().set("KP_Next", "PageDown");
+    keyMap().set("KP_Home", "Home");
+    keyMap().set("KP_End", "End");
+    keyMap().set("KP_Insert", "Insert");
+    keyMap().set("KP_Delete", "U+007F");
 }
 
 static void createWindowsKeyMap()
@@ -131,6 +142,17 @@
     windowsKeyMap().set("braceright", VK_OEM_6);
     windowsKeyMap().set("apostrophe", VK_OEM_7);
     windowsKeyMap().set("quotedbl", VK_OEM_7);
+    // Keypad location
+    windowsKeyMap().set("KP_Left", VK_LEFT);
+    windowsKeyMap().set("KP_Right", VK_RIGHT);
+    windowsKeyMap().set("KP_Up", VK_UP);
+    windowsKeyMap().set("KP_Down", VK_DOWN);
+    windowsKeyMap().set("KP_Prior", VK_PRIOR);
+    windowsKeyMap().set("KP_Next", VK_NEXT);
+    windowsKeyMap().set("KP_Home", VK_HOME);
+    windowsKeyMap().set("KP_End", VK_END);
+    windowsKeyMap().set("KP_Insert", VK_INSERT);
+    windowsKeyMap().set("KP_Delete", VK_DELETE);
 
     // Set alphabet to the windowsKeyMap.
     const char* alphabet = "abcdefghijklmnopqrstuvwxyz";

Modified: trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp (116451 => 116452)


--- trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp	2012-05-08 19:44:17 UTC (rev 116451)
+++ trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp	2012-05-08 20:24:53 UTC (rev 116452)
@@ -49,7 +49,7 @@
     , m_nativeVirtualKeyCode(0)
     , m_macCharCode(0)
     , m_autoRepeat(false)
-    , m_isKeypad(false)
+    , m_isKeypad(String(event->key).startsWith("KP_"))
     , m_isSystemKey(false)
 {
 }
@@ -63,7 +63,7 @@
     , m_nativeVirtualKeyCode(0)
     , m_macCharCode(0)
     , m_autoRepeat(false)
-    , m_isKeypad(false)
+    , m_isKeypad(String(event->key).startsWith("KP_"))
     , m_isSystemKey(false)
 {
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to