OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |