diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-12 00:33:53 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-03-12 00:34:10 +0200 |
| commit | 9e002baeb5e2770411e46b9dfd91e1bb26d4d668 (patch) | |
| tree | dd669f0d144839196ad67f99b71db2638f0c51b0 /src/client/view/textanalyser_input.js | |
| parent | ad98e69a60a012f6ea065be80e660fdc29c178ed (diff) | |
client: use some more VK constants
Diffstat (limited to 'src/client/view/textanalyser_input.js')
| -rw-r--r-- | src/client/view/textanalyser_input.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/view/textanalyser_input.js b/src/client/view/textanalyser_input.js index 113489aa..9defdef3 100644 --- a/src/client/view/textanalyser_input.js +++ b/src/client/view/textanalyser_input.js @@ -7,7 +7,8 @@ var value = util.value; // Constants var nbsp = String.fromCharCode(160), VK_UP = consts.VK_UP, - VK_DOWN = consts.VK_DOWN; + VK_DOWN = consts.VK_DOWN, + VK_ENTER = consts.VK_ENTER; function textanalyser_input(spec) { var selectionStart = function () { @@ -107,7 +108,7 @@ function textanalyser_input(spec) { util.assert(1 === element.length); - var enters = element.asEventStream('keydown').filter(key(13)) + var enters = element.asEventStream('keydown').filter(key(VK_ENTER)) .map(function (e) { var text; e.preventDefault(); |
