From 0842501bb71ce037460c895170ee933bec3b3ae3 Mon Sep 17 00:00:00 2001 From: BigEd Date: Fri, 5 Nov 2010 17:38:47 +0000 Subject: [PATCH] [bug]direct keypresses to correct places: graphics, memtable, input box --- expert.html | 6 +++--- expertWires.js | 27 +++++++++++++++++++-------- memtable.js | 2 +- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/expert.html b/expert.html index 0b897d6..5e5a724 100644 --- a/expert.html +++ b/expert.html @@ -60,8 +60,8 @@ $().ready(function(){ e-tradition disassembler 
-
-
+
+
Please wait, graphics initialising... @@ -116,7 +116,7 @@ $().ready(function(){
-
+
diff --git a/expertWires.js b/expertWires.js index 621637e..c63bced 100644 --- a/expertWires.js +++ b/expertWires.js @@ -93,7 +93,6 @@ function setup_part3(){ // which saves a lot of memory and allows us to run on small systems updateChipLayoutVisibility(true); } - window.onkeypress = function(e){handleKey(e);} setStatus('resetting 6502...'); setTimeout(setup_part4, 0); } @@ -209,6 +208,8 @@ function updateChipLayoutAnimation(isOn){ // ///////////////////////// + +// these keyboard actions are primarily for the chip display function handleKey(e){ var c = e.charCode; c = String.fromCharCode(c); @@ -216,17 +217,21 @@ function handleKey(e){ if((c=='Z'||c=='x'||c=='<') && zoom>1) setZoom(zoom/1.2); else if((c=='z'||c=='>') && zoom=0x200) return; cellEl(n).style.background = '#ff8'; selected = n; - window.onkeydown = function(e){cellKeydown(e);}; + table.onkeydown = function(e){cellKeydown(e);}; } function unselectCell(){