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

Side by Side Diff: sky/framework/sky-input.sky

Issue 872233002: Switch KeyboardEvents over to NewEventHandler (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename virtualKeyCode to key Created 5 years, 11 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
« no previous file with comments | « sky/engine/web/WebViewImpl.cpp ('k') | sky/tests/services/event-sender.sky » ('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 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <import src="/sky/framework/shell.sky" as="shell" /> 6 <import src="/sky/framework/shell.sky" as="shell" />
7 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> 7 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
8 <import src="/mojo/services/keyboard/public/interfaces/keyboard.mojom.sky" as="k eyboard" /> 8 <import src="/mojo/services/keyboard/public/interfaces/keyboard.mojom.sky" as="k eyboard" />
9 9
10 <sky-element name="sky-input" attributes="value:string"> 10 <sky-element name="sky-input" attributes="value:string">
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 }.bind(this)); 50 }.bind(this));
51 51
52 observer.observe(control, { 52 observer.observe(control, {
53 subtree: true, 53 subtree: true,
54 characterData: true, 54 characterData: true,
55 childList: true, 55 childList: true,
56 }); 56 });
57 } 57 }
58 handleKeyDown(event) { 58 handleKeyDown(event) {
59 // TODO(abarth): You can still get newlines if the user pastes them. 59 // TODO(abarth): You can still get newlines if the user pastes them.
60 if (event.keyCode == 0xD) 60 if (event.key == 0xD)
61 event.preventDefault(); 61 event.preventDefault();
62 } 62 }
63 handleFocus(event) { 63 handleFocus(event) {
64 keyboard.show(); 64 keyboard.show();
65 } 65 }
66 handleBlur(event) { 66 handleBlur(event) {
67 keyboard.hide(); 67 keyboard.hide();
68 } 68 }
69 }.register(); 69 }.register();
70 </script> 70 </script>
71 </sky-element> 71 </sky-element>
OLDNEW
« no previous file with comments | « sky/engine/web/WebViewImpl.cpp ('k') | sky/tests/services/event-sender.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698