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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingBehavior.cpp

Issue 2474083002: [DomKey X11] Produce correct DomKey when Control is down (Closed)
Patch Set: Produce correct DomKey when ctrl is down Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved.
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // Don't insert ASCII character if ctrl w/o alt or meta is on. 271 // Don't insert ASCII character if ctrl w/o alt or meta is on.
272 // On Mac, we should ignore events when meta is on (Command-<x>). 272 // On Mac, we should ignore events when meta is on (Command-<x>).
273 if (ch < 0x80) { 273 if (ch < 0x80) {
274 if (event.ctrlKey() && !event.altKey()) 274 if (event.ctrlKey() && !event.altKey())
275 return false; 275 return false;
276 #if OS(MACOSX) 276 #if OS(MACOSX)
277 if (event.metaKey()) 277 if (event.metaKey())
278 return false; 278 return false;
279 #endif 279 #endif
280 } 280 }
281 #if OS(LINUX)
282 // According to XKB map no keyboard combinations with ctrl key are mapped to
dtapuska 2016/11/07 22:04:37 Can we move this to be above the !OS(WIN) and chan
chongz 2016/11/07 22:44:35 Done.
283 // printable characters, however we need the filter as the DomKey/text could
284 // contain printable characters.
285 if (event.ctrlKey())
286 return false;
287 #endif
281 #endif 288 #endif
282 289
283 return true; 290 return true;
284 } 291 }
285 } // namespace blink 292 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698