Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 1923023002: [Mac] Pressing unsupported key should not generate keyevents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 1c9ce1e430de8821450808b9dd533f7c5999f680..a1f526ab8b5002623409212db423728fe3f751b5 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -2112,8 +2112,10 @@ void RenderWidgetHostViewMac::OnDisplayMetricsChanged(
if ([theEvent type] == NSFlagsChanged) {
// Ignore NSFlagsChanged events from the NumLock and Fn keys as
// Safari does in -[WebHTMLView flagsChanged:] (of "WebHTMLView.mm").
+ // Also ignore unsupported |keyCode| (255) generated by Convert, NonConvert
+ // and KanaMode from JIS PC keyboard.
int keyCode = [theEvent keyCode];
- if (!keyCode || keyCode == 10 || keyCode == 63)
+ if (!keyCode || keyCode == 10 || keyCode == 63 || keyCode == 255)
return;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698