There are a number of “key” challenges to emulating all the keys on IBM PC and PC AT keyboards, due to differences that have evolved over time between the early PC keyboards and keyboards people are using today.
Modern keyboards, like the keyboard on my MacBook Pro, have some extra keys (like “F11” and “F12”), which are easily ignored. The bigger problem is missing keys. The more obvious ones include:
which PCjs allows you to simulate by simply clicking on the “Num” and “Scroll” LED indicators in top right corner of a PCjs machine. Unfortunately, that doesn’t help much when you need to type:
Ctrl-Num-Lock(also known as Ctrl-Pause, this spins inside the ROM BIOS keyboard interrupt handler)
Ctrl-Scroll-Lock(also known as Ctrl-Break, this is the only way to abort a BASIC
LISTcommand, for example)
Less obvious missing keys are all the “numeric keypad” keys. Granted, you can type any of
- using other keys on your modern keyboard, but the PC had those other keys as well, so typing those “other” keys
won’t make your DOS application happy if it requires input from the PC’s numeric keypad.
Fortunately, your modern keyboard does contain many keys that map to the IBM PC’s numeric keypad; those include:
So if you press any of those keys, the corresponding IBM PC numeric keypad key will be pressed. If the PC’s “Num-Lock” is ON, you’ll see the corresponding numbers, and if it’s OFF, you’ll see the corresponding cursor movement – although that’s dependent on what the underlying PC application does with the key.
Unfortunately, that still leaves a number of keys on the PC’s keypad that cannot be typed directly:
SysReq) [PC AT keyboards only]
When you connect a full-size keyboard to your computer, with a real numeric keypad, it becomes possible to type a few
more of those keys. For example, all browsers generate unique codes for the
- keys on the numeric keypad.
Sadly, the results were mixed for other keys, including all the numeric keypad digits.
And since a lot of people aren’t using full-size keyboards anymore, those results are largely moot.
And then there are keys that have simply evaporated over time, like
SysReq key never
got much attention, in part because it didn’t exist on the original 83-key keyboard, and even software that required a
PC AT, like early versions of OS/2, chose to use key combinations like
Ctrl-Esc instead of
SysReq. Go figure.
PrtSc key did have several useful functions:
Shift-PrtSc(prints the entire contents of the screen to LPT1)
Ctrl-PrtSc(enables echo of DOS output to LPT1)
Shift-PrtSc is handled entirely by the PC ROM BIOS,
Ctrl-PrtSc is simply passed on to DOS, which converts
the key internally to
Ctrl-P. PC DOS uses
Ctrl-P to toggle printer echo, while other OEM versions of DOS
Ctrl-P to enable printer echo and
Ctrl-N to disable it.
The problem of “untypeable” keys can be worsened by whatever operating system and browser combination you’re using. For example, if you’re running Windows, then it intercepts a variety of Alt-key combinations, such as Alt-Tab, which means that if you’re running an old version of Windows inside a PCjs machine, that machine won’t be able to receive Alt-Tab.
I’ve not fully addressed that problem yet, but I have started to define some alternative keyboard shortcuts in PCjs. Two of the most useful ones are:
Ctrl-Scroll-Lock, aka Ctrl-Break)
On some modern operating systems, like macOS, Ctrl-Alt-Delete is not intercepted, so you may be able to type it directly.
But first, you need to understand which key is your Delete key. On a MacBook Pro, you might think it’s the key labeled
“delete”, but you’d be wrong. That key is actually your Backspace key. To type a Delete key, you must hold your
“fn” key and then press “delete”. So, putting that all together, if you want to reboot a PCjs machine with
press “fn”, “ctrl”, “alt”, and “delete”.
Now, if you forget to hold the “fn” key, you might notice that your machine still reboots. But that’s not because you
actually typed the correct sequence; it’s because of another handy shortcut that PCjs defined for you: Ctrl-Alt-Backspace,
like Ctrl-Alt-Period, is mapped to
When all else fails (or when you’re running on a touchscreen device with no physical keyboard at all), PCjs now offers
the ultimate solution: soft keyboards. Most PCjs machines now sport a
Keys button that will show/hide a full-size
virtual keyboard. PC and PC XT-class machines use IBM’s original 83-key layout, while PC AT-class machines use IBM’s
These new “soft keyboards” should make PCjs machines more usable on iOS and other touch-based devices. PCjs did (and still does) work with the built-in iOS soft keyboard, but iOS has lots of annoying quirks and limitations, including:
By fake events, I mean that 1) no events are generated until a key is released (ie, when you lift your finger off the key), and 2) all the generated events (the down, the press, and the up) arrive back-to-back, as if the key was pressed and released instantly – which is not how a real keyboard behaves. Android soft keyboards are generally even worse, because in most cases, no key events are generated until an entire line of input is “entered”.
PCjs soft keyboards operate much more like the original IBM PC keyboards. Keys not only press when you press them and
release when you release them, but they also auto-repeat when you hold them. What a concept! And they support multi-touch,
so you can type
Ctrl-Alt-Delete exactly as you would on a real keyboard.
For users who only have a mouse or trackpad, you can still type any of those multi-key sequences by first double-clicking
any of the
Shift modifier keys; they will remain “locked” in the down position while you click other keys.
To “unlock” them, simply click them once more.
Check out the new and improved soft keyboard support in the machine below, or in any of the other PCx86 Machines.
[PCjs Machine "ibm5150"]
Waiting for machine "ibm5150" to load....
The following table summarizes the key codes generated by various browsers running on macOS, using an Apple full-size (109-key) wireless keyboard. The data illustrates how access to more physical keys isn’t really all that helpful, in part because of inconsistent results across browsers.
|` ~||1 !||2 @||3 #||4 $||5 %||6 ^||7 &||8 *||9 (||0 )||- _||= +||Del||Help||Home||PgUp||Clr||=||/||*|
Feb 15, 2018