| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const unsigned ShiftKey = WebInputEvent::ShiftKey; | 43 const unsigned ShiftKey = WebInputEvent::ShiftKey; |
| 44 const unsigned MetaKey = WebInputEvent::MetaKey; | 44 const unsigned MetaKey = WebInputEvent::MetaKey; |
| 45 #if OS(MACOSX) | 45 #if OS(MACOSX) |
| 46 // Aliases for the generic key defintions to make kbd shortcuts definitions more | 46 // Aliases for the generic key defintions to make kbd shortcuts definitions more |
| 47 // readable on OS X. | 47 // readable on OS X. |
| 48 const unsigned OptionKey = AltKey; | 48 const unsigned OptionKey = AltKey; |
| 49 | 49 |
| 50 // Do not use this constant for anything but cursor movement commands. Keys | 50 // Do not use this constant for anything but cursor movement commands. Keys |
| 51 // with cmd set have their |isSystemKey| bit set, so chances are the shortcut | 51 // with cmd set have their |isSystemKey| bit set, so chances are the shortcut |
| 52 // will not be executed. Another, less important, reason is that shortcuts | 52 // will not be executed. Another, less important, reason is that shortcuts |
| 53 // defined in the layoutObject do not blink the menu item that they triggered. S
ee | 53 // defined in the layoutObject do not blink the menu item that they triggered. |
| 54 // http://crbug.com/25856 and the bugs linked from there for details. | 54 // See http://crbug.com/25856 and the bugs linked from there for details. |
| 55 const unsigned CommandKey = MetaKey; | 55 const unsigned CommandKey = MetaKey; |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 // Keys with special meaning. These will be delegated to the editor using | 58 // Keys with special meaning. These will be delegated to the editor using |
| 59 // the execCommand() method | 59 // the execCommand() method |
| 60 struct KeyboardCodeKeyDownEntry { | 60 struct KeyboardCodeKeyDownEntry { |
| 61 unsigned virtualKey; | 61 unsigned virtualKey; |
| 62 unsigned modifiers; | 62 unsigned modifiers; |
| 63 const char* name; | 63 const char* name; |
| 64 }; | 64 }; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 #endif | 281 #endif |
| 282 | 282 |
| 283 return true; | 283 return true; |
| 284 } | 284 } |
| 285 } // namespace blink | 285 } // namespace blink |
| OLD | NEW |