diff --git a/devices/pc8080/machine/vt100/debugger/machine-left.xml b/devices/pc8080/machine/vt100/debugger/machine-left.xml
index e3f1c180d..40a86c463 100644
--- a/devices/pc8080/machine/vt100/debugger/machine-left.xml
+++ b/devices/pc8080/machine/vt100/debugger/machine-left.xml
@@ -26,11 +26,14 @@
- SET-UP
+ BREAK
+ CTRL
+ ESC
+ TAB
+ LINE FEED
+ SET-UP
-
- TEST RECEIVER
-
+
diff --git a/devices/pc8080/machine/vt100/debugger/machine-right.xml b/devices/pc8080/machine/vt100/debugger/machine-right.xml
index 14e4102b1..610858cbe 100644
--- a/devices/pc8080/machine/vt100/debugger/machine-right.xml
+++ b/devices/pc8080/machine/vt100/debugger/machine-right.xml
@@ -26,11 +26,14 @@
- SET-UP
+ BREAK
+ CTRL
+ ESC
+ TAB
+ LINE FEED
+ SET-UP
-
- TEST RECEIVER
-
+
diff --git a/devices/pc8080/machine/vt100/debugger/machine.xml b/devices/pc8080/machine/vt100/debugger/machine.xml
index 84b41d26f..75087d063 100644
--- a/devices/pc8080/machine/vt100/debugger/machine.xml
+++ b/devices/pc8080/machine/vt100/debugger/machine.xml
@@ -26,10 +26,15 @@
- SET-UP
+ BREAK
+ CTRL
+ ESC
+ TAB
+ LINE FEED
+ SET-UP
- TEST RECEIVER
+ TEST RECEIVER
diff --git a/devices/pc8080/machine/vt100/machine-left.xml b/devices/pc8080/machine/vt100/machine-left.xml
index e8cee8427..aa09c7581 100644
--- a/devices/pc8080/machine/vt100/machine-left.xml
+++ b/devices/pc8080/machine/vt100/machine-left.xml
@@ -24,11 +24,16 @@
+
+ RESET
+
+ BREAK
+ CTRL
+ ESC
+ TAB
+ LINE FEED
SET-UP
-
- RESET
-
diff --git a/devices/pc8080/machine/vt100/machine-right.xml b/devices/pc8080/machine/vt100/machine-right.xml
index b57361f98..546048a44 100644
--- a/devices/pc8080/machine/vt100/machine-right.xml
+++ b/devices/pc8080/machine/vt100/machine-right.xml
@@ -24,11 +24,16 @@
-
- SET-UP
-
RESET
+
+ BREAK
+ CTRL
+ ESC
+ TAB
+ LINE FEED
+ SET-UP
+
diff --git a/devices/pc8080/machine/vt100/machine.xml b/devices/pc8080/machine/vt100/machine.xml
index 667228feb..76468bb71 100644
--- a/devices/pc8080/machine/vt100/machine.xml
+++ b/devices/pc8080/machine/vt100/machine.xml
@@ -24,11 +24,18 @@
+
+ RESET
+
+ BREAK
+ CTRL
+ ESC
+ TAB
+ LINE FEED
SET-UP
-
- RESET
-
-
+
+ TEST RECEIVER
+
diff --git a/modules/pc8080/lib/keyboard.js b/modules/pc8080/lib/keyboard.js
index 351eef25d..3351f5c22 100644
--- a/modules/pc8080/lib/keyboard.js
+++ b/modules/pc8080/lib/keyboard.js
@@ -145,16 +145,24 @@ class Keyboard8080 extends Component {
control.onclick = function(kbd, keyCode) {
return function onKeyboardBindingDown(event) {
/*
- * iOS Usability Improvement: Calling preventDefault() prevents rapid clicks from
+ * iOS usability improvement: calling preventDefault() prevents rapid clicks from
* also being (mis)interpreted as a desire to "zoom" in on the machine.
*/
if (event.preventDefault) event.preventDefault();
- kbd.onSoftKeyDown(keyCode, true, true);
/*
- * I'm assuming we only need to give focus back on the "up" event...
- *
- * if (kbd.cmp) kbd.cmp.updateFocus();
+ * TODO: Add some additional SOFTCODES configuration info that will tell us which soft
+ * keys (eg, CTRL) should be treated as toggles, instead of hard-coding that knowledge below.
*/
+ var fDown = true;
+ var fAutoRelease = (keyCode != Keys.KEYCODE.CTRL);
+ if (!fAutoRelease) {
+ control.style.fontWeight = "normal";
+ fDown = !(kbd.bitsState & Keyboard8080.STATE.CTRL);
+ if (fDown) control.style.fontWeight = "bold";
+ kbd.checkModifierKeys(keyCode, fDown);
+ }
+ kbd.onSoftKeyDown(keyCode, fDown, fAutoRelease);
+ if (kbd.cmp) kbd.cmp.updateFocus();
};
}(this, this.config.SOFTCODES[sBinding]);
//
@@ -394,7 +402,7 @@ class Keyboard8080 extends Component {
* @this {Keyboard8080}
* @param {number} keyCode (ie, either a keycode or string ID)
* @param {boolean} fDown (true if key going down, false if key going up)
- * @param {boolean} fRight (true if key is on the right, false if not or unknown or n/a)
+ * @param {boolean} [fRight] (true if key is on the right, false if not or unknown or n/a)
*/
checkModifierKeys(keyCode, fDown, fRight)
{
@@ -1045,6 +1053,9 @@ Keyboard8080.VT100 = {
ALTCODES: {},
LEDCODES: {},
SOFTCODES: {
+ 'ctrl': Keys.KEYCODE.CTRL,
+ 'esc': Keys.KEYCODE.ESC,
+ 'tab': Keys.KEYCODE.TAB,
'num-comma': Keys.KEYCODE.F5,// since modern keypads don't typically have a comma...
'break': Keys.KEYCODE.F6,
'line-feed': Keys.KEYCODE.F7,