| Index: webkit/api/src/gtk/WebInputEventFactory.cpp
|
| ===================================================================
|
| --- webkit/api/src/gtk/WebInputEventFactory.cpp (revision 22706)
|
| +++ webkit/api/src/gtk/WebInputEventFactory.cpp (working copy)
|
| @@ -208,10 +208,14 @@
|
| switch (event->keyval) {
|
| // We need to treat the enter key as a key press of character \r. This
|
| // is apparently just how webkit handles it and what it expects.
|
| + // On the other hand, IE and Firefox treat the control+enter keys as a key
|
| + // press of character '\n'. We also emulate this behavior since Google
|
| + // Docs and Spreadsheets depend on it.
|
| case GDK_ISO_Enter:
|
| case GDK_KP_Enter:
|
| case GDK_Return:
|
| - result.unmodifiedText[0] = result.text[0] = static_cast<WebUChar>('\r');
|
| + result.unmodifiedText[0] = result.text[0] =
|
| + static_cast<WebUChar>((event->state & GDK_CONTROL_MASK) ? '\n' : '\r');
|
| break;
|
| default:
|
| // This should set text to 0 when it's not a real character.
|
|
|