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

Unified Diff: ui/keyboard/resources/elements/kb-keyboard.html

Issue 16972006: Insert text directly from the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/keyboard/resources/api_adapter.js ('k') | ui/keyboard/resources/keysets.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/elements/kb-keyboard.html
diff --git a/ui/keyboard/resources/elements/kb-keyboard.html b/ui/keyboard/resources/elements/kb-keyboard.html
index 0f19ccd2a80736e5ee3245b2c1d7e6e78121e972..9bda72673bdf5bcc2f845d67a54fe22b0f8fb797 100644
--- a/ui/keyboard/resources/elements/kb-keyboard.html
+++ b/ui/keyboard/resources/elements/kb-keyboard.html
@@ -95,12 +95,12 @@
this.lastPressedKey.classList.add('active');
repeatKey.cancel();
if (detail.repeat) {
- sendKey(detail.char);
+ insertText(detail.char);
repeatKey.key = this.lastPressedKey;
repeatKey.timer = setTimeout(function() {
repeatKey.timer = undefined;
repeatKey.interval = setInterval(function() {
- sendKey(detail.char);
+ insertText(detail.char);
}, REPEAT_INTERVAL_MSEC);
}, Math.max(0, REPEAT_DELAY_MSEC - REPEAT_INTERVAL_MSEC));
}
@@ -127,7 +127,7 @@
var char = detail.char;
if (enterUpperOnSpace) {
enterUpperOnSpace = false;
- if (char == 'Spacebar')
+ if (char == ' ')
this.keyset = 'upper';
}
switch(char) {
@@ -141,17 +141,10 @@
case '!':
enterUpperOnSpace = true;
break;
- case 'Tab':
- case 'Spacebar':
- case 'Enter':
- sendKey(char);
- return;
default:
break;
}
- for (var i = 0; i < char.length; i++) {
- sendKey(char.charAt(i));
- }
+ insertText(char);
}
});
</script>
« no previous file with comments | « ui/keyboard/resources/api_adapter.js ('k') | ui/keyboard/resources/keysets.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698