From 90eaae1725511bbc039f84f684b7b080e0fa2d44 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 25 Mar 2017 15:22:28 -0700 Subject: wip --- ext/mixed/js/display.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ext/mixed/js') diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index f3423878..30f703bb 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -207,6 +207,10 @@ class Display { } onKeyDown(e) { + const notifyParent = action => { + window.parent.postMessage(action, '*'); + }; + const handlers = { 36: /* home */ () => { this.entryScroll(0, true); @@ -246,6 +250,18 @@ class Display { 8: /* backspace */ () => { + }, + + 27: /* escape */ () => { + notifyParent('popupClose'); + }, + + 37: /* left */ () => { + notifyParent('scanLeft'); + }, + + 39: /* right */ () => { + notifyParent('scanRight'); } }; -- cgit v1.2.3