summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp')
-rw-r--r--Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp b/Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
index b82ea52b3..72db521d5 100644
--- a/Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
+++ b/Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
@@ -79,6 +79,12 @@ void resetClickCountState()
gLastClickButton = WebKit::WebMouseEvent::ButtonNone;
}
+bool isKeyPadKeyval(guint keyval)
+{
+ // Keypad keyvals all fall into one range.
+ return keyval >= GDK_KP_Space && keyval <= GDK_KP_9;
+}
+
} // namespace
namespace WebKit {
@@ -365,7 +371,9 @@ WebKeyboardEvent WebInputEventFactory::keyboardEvent(const GdkEventKey* event)
result.setKeyIdentifierFromWindowsKeyCode();
- // FIXME: Do we need to set IsAutoRepeat or IsKeyPad?
+ // FIXME: Do we need to set IsAutoRepeat?
+ if (isKeyPadKeyval(event->keyval))
+ result.modifiers |= WebInputEvent::IsKeyPad;
return result;
}