| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 /** | 249 /** |
| 250 * @param {string|!WebInspector.KeyboardShortcut.Key} key | 250 * @param {string|!WebInspector.KeyboardShortcut.Key} key |
| 251 * @return {string} | 251 * @return {string} |
| 252 */ | 252 */ |
| 253 WebInspector.KeyboardShortcut._keyName = function(key) | 253 WebInspector.KeyboardShortcut._keyName = function(key) |
| 254 { | 254 { |
| 255 if (typeof key === "string") | 255 if (typeof key === "string") |
| 256 return key.toUpperCase(); | 256 return key.toUpperCase(); |
| 257 if (typeof key.name === "string") | 257 if (typeof key.name === "string") |
| 258 return key.name; | 258 return key.name; |
| 259 return key.name[WebInspector.platform()] || key.name.other || ''; | 259 return key.name[WebInspector.platform()] || key.name.other || ""; |
| 260 } | 260 } |
| 261 | 261 |
| 262 /** | 262 /** |
| 263 * @param {number} keyCode | 263 * @param {number} keyCode |
| 264 * @param {?number} modifiers | 264 * @param {?number} modifiers |
| 265 * @return {number} | 265 * @return {number} |
| 266 */ | 266 */ |
| 267 WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers = function(keyCode, m
odifiers) | 267 WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers = function(keyCode, m
odifiers) |
| 268 { | 268 { |
| 269 return (keyCode & 255) | (modifiers << 8); | 269 return (keyCode & 255) | (modifiers << 8); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 298 * @param {number} m | 298 * @param {number} m |
| 299 * @return {string} | 299 * @return {string} |
| 300 */ | 300 */ |
| 301 function mapModifiers(m) | 301 function mapModifiers(m) |
| 302 { | 302 { |
| 303 return modifiers & m ? /** @type {string} */ (modifierNames.get(m)) : ""
; | 303 return modifiers & m ? /** @type {string} */ (modifierNames.get(m)) : ""
; |
| 304 } | 304 } |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 WebInspector.KeyboardShortcut.SelectAll = WebInspector.KeyboardShortcut.makeKey(
"a", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta); | 307 WebInspector.KeyboardShortcut.SelectAll = WebInspector.KeyboardShortcut.makeKey(
"a", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta); |
| OLD | NEW |