From 74ca008c37ed7ab10432394e739d66a4de59ca45 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Thu, 15 Aug 2013 21:06:29 -0700 Subject: [PATCH] Use screen for keyboard input --- index.htm | 5 +---- index.js | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/index.htm b/index.htm index 4e23e5e..6dc3140 100644 --- a/index.htm +++ b/index.htm @@ -39,13 +39,10 @@ By Joshua Bell
-
+
- - -
Enter code:    diff --git a/index.js b/index.js index a9114d6..3d0b9cb 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ window.onload = function () { } ()); - var tty = new TTY($('#screen'), $('#keyboard'), bell); + var tty = new TTY($('#screen'), $('#screen'), bell); var dos = new DOS(tty); var lores = new LoRes($('#lores'), 40, 48); @@ -98,10 +98,10 @@ window.onload = function () { addEvent($('#frame'), 'click', keyboardFocus); addEvent($('#frame'), 'blur', keyboardFocus); // Needed on IE, not sure why it tries to get focus - addEvent($('#keyboard'), 'focus', function () { + addEvent($('#screen'), 'focus', function () { getClassList($('#frame')).add('focused'); }); - addEvent($('#keyboard'), 'blur', function () { + addEvent($('#screen'), 'blur', function () { getClassList($('#frame')).remove('focused'); });