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

Side by Side Diff: chrome/test/data/extensions/test_file_with_ctrl-d_keybinding.html

Issue 388313002: mac: Allow WebContents key handling to supplant extension overrides of the bookmark shortcut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment from wittman. Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 <head> 1 <head>
2 <script type="text/javascript"> 2 <script type="text/javascript">
3 var ctrlDown = false; 3 var ctrlDown = false;
4 document.onkeyup = function(e) { 4 document.onkeyup = function(e) {
5 if (e.keyCode == 17) 5 if (e.keyCode == 17 || e.keyCode == 91 || e.keyCode == 93)
Yoyo Zhou 2014/07/15 19:46:37 It would be nice to comment on what these values m
erikchen 2014/07/15 20:48:40 Done.
6 ctrlDown = false; 6 ctrlDown = false;
7 } 7 }
8 document.onkeydown = function(e) { 8 document.onkeydown = function(e) {
9 if (e.keyCode == 17) 9 if (e.keyCode == 17 || e.keyCode == 91 || e.keyCode == 93) {
10 ctrlDown = true; 10 ctrlDown = true;
11 else if (String.fromCharCode(e.keyCode) == 'D' && ctrlDown) { 11 } else if (String.fromCharCode(e.keyCode) == 'D' && ctrlDown) {
12 document.body.bgColor = "magenta"; 12 document.body.bgColor = "magenta";
13 return false; 13 return false;
14 } 14 }
15 }; 15 };
16 </script> 16 </script>
17 </head> 17 </head>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698