mirror of
https://github.com/trebonian/visual6502.git
synced 2024-12-29 11:31:16 +00:00
Fix expert mode's keyboard handling too.
This commit is contained in:
parent
1c66a8af28
commit
8a89310e96
@ -236,7 +236,7 @@ function updateChipLayoutAnimation(isOn){
|
|||||||
|
|
||||||
// these keyboard actions are primarily for the chip display
|
// these keyboard actions are primarily for the chip display
|
||||||
function handleKey(e){
|
function handleKey(e){
|
||||||
var c = e.charCode;
|
var c = e.charCode || e.keyCode;
|
||||||
c = String.fromCharCode(c);
|
c = String.fromCharCode(c);
|
||||||
if('<>?npZzx'.indexOf(c)==-1) return;
|
if('<>?npZzx'.indexOf(c)==-1) return;
|
||||||
if((c=='Z'||c=='x'||c=='<') && zoom>1) setZoom(zoom/1.2);
|
if((c=='Z'||c=='x'||c=='<') && zoom>1) setZoom(zoom/1.2);
|
||||||
@ -405,7 +405,7 @@ var consolebox;
|
|||||||
|
|
||||||
function setupConsole(){
|
function setupConsole(){
|
||||||
consolebox=document.getElementById('consolebox');
|
consolebox=document.getElementById('consolebox');
|
||||||
consolebox.onkeypress=function(e){consolegetc=e.charCode;};
|
consolebox.onkeypress=function(e){consolegetc=e.charCode || e.keyCode;};
|
||||||
}
|
}
|
||||||
|
|
||||||
var chipsurround;
|
var chipsurround;
|
||||||
|
Loading…
Reference in New Issue
Block a user