Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Fix native key code under X11.
Browse files Browse the repository at this point in the history
The WebKeyboardEvent.nativeKeyCode was incorrectly set
to the X keysym (interpretation of the key) rather than
the X keycode (physical key identifier), which broke
Chromoting.

BUG=412435

Review URL: https://codereview.chromium.org/626433003

Cr-Commit-Position: refs/heads/master@{#298080}
(cherry picked from commit e07fa56)

TBR=ben

Review URL: https://codereview.chromium.org/629843003

Cr-Commit-Position: refs/branch-heads/2171@{#51}
Cr-Branched-From: 267aeeb-refs/heads/master@{#297060}
  • Loading branch information
Kevin Schoedel committed Oct 6, 2014
1 parent 4a1e0b4 commit df348c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions content/browser/renderer_host/web_input_event_aura.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "ui/events/event.h"
#include "ui/events/event_utils.h"

#if defined(USE_OZONE)
#include "ui/events/keycodes/keyboard_code_conversion.h"
#if defined(USE_X11) || defined(USE_OZONE)
#include "ui/events/keycodes/dom4/keycode_converter.h"
#endif

namespace content {
Expand Down Expand Up @@ -50,7 +50,8 @@ blink::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent(
webkit_event.isSystemKey = true;

webkit_event.windowsKeyCode = event->GetLocatedWindowsKeyboardCode();
webkit_event.nativeKeyCode = event->platform_keycode();
webkit_event.nativeKeyCode =
ui::KeycodeConverter::CodeToNativeKeycode(event->code().c_str());
webkit_event.unmodifiedText[0] = event->GetUnmodifiedText();
webkit_event.text[0] = event->GetText();

Expand Down

0 comments on commit df348c6

Please sign in to comment.