Anyone know the keycode for PgUp/PgDn on old IBM keyboard

June 19, 2020 at 19:25:08
Specs: Windows 10, Pentium
I'm running an old shareware program called Freebase in VDOS Plus emulator under Windows 10, or 7, or Vista. Scrolling through records requires PgUp / PgDn keys, which do not work on any modern laptop/PC I try. Did get it to work on an old Compaq laptop. Newer ones apparently have a different code for these keys?!?!? Anyone know the old key code for those 2 keys? Alt codes under Ansi.sys do not have a code for Pg/Up or Down. I appreciate any help.

See More: Anyone know the keycode for PgUp/PgDn on old IBM keyboard

Reply ↓  Report •

#1
June 19, 2020 at 21:07:49
A program I wrote in MS DOS QBASIC in 1994 is currently on my
Dell laptop, made in 1998. It shows what key is being pressed, the
ASCII code, the key scan code, and the character printed on screen
(the character returned by the QBASIC INKEY$ command).

I was probably using an IBM keyboard from about 1983 when I wrote
the program, if that makes any difference. I do not currently have a
computer that the IBM keyboard can plug into, and the keyboard is in
storage where it is difficult to get at.

Running it in DOS under Windows 98 SE on the Dell laptop, my
program shows that the key scan code for PgUp is 73, and the printed
character is " I". (the capital letter between H and J.) The key scan
code for PgDn is 81, and the printed character is " Q". Notice the
space before the letter. There is no such space when typing a capital
"I" or "Q" on the keyboard.

At the time I wrote the program, I think I understood what the relation
is between the "character printed on screen" and the actual page-up
and page-down functions, but I have since forgotten.

Curiously, my program shows that the ASCII value of most keys for cursor
movement (PgUp, PgDn, Home, End, Ins, Del, and the arrow keys) is 224.
That is puzzling. I don't remember it being that way on the computer I was
using when I wrote the program.

I think I'll give you the key scan codes for all of those keys:

71   G  Home
72   H  Up arrow
73   I  PgUp
75   K  Left arrow
77   M  Right arrow
79   O  End
80   P  Down arrow
81   Q  PgDn
82   R  Ins
83   S  Del
 

Also, the "Ins" key puts a value of 128 into the shift register,
indicating that insert mode has been turned on. Pressing it
again removes the value of 128.

My program does not handle the Windows menu key, the
context menu key (I think that's what it is called), or the Dell
laptop's fn key, which did not exist on the IBM keyboard.

-- Jeff, in Minneapolis

message edited by Jeff Root


Reply ↓  Report •

#2
June 19, 2020 at 23:51:57
http://www.quadibloc.com/comp/scan.htm

Set 1 for the original XT keyboard.
Set 2 for the AT keyboard.


Reply ↓  Report •

#3
June 22, 2020 at 13:06:33
Thank you for your reply; however, I was looking in the wrong direction. For the heck of it, I loaded up DosBox, and ran this program, and the PgUp and PgDn keys worked just fine. So the issue has to do with VDOS +. I'm not going to worry about it anymore- I'll just use this particular program in DosBox.

DosBox keeps saying it's only for DOS games, but I'm able to run all kinds of DOS programs in it. I only wish it could emulate ansi.sys because I used to have a wicked C: prompt with colors and everything. Ansi.sys is emulated in VDOS+, but then you always seem to have quirks with other things when using this emulator- this is one of them.

Thanks again...Jonathan in SE Pennsylvania, formerly from the twin cities area. GO Twins! (if they ever play)


Reply ↓  Report •
Related Solutions


Ask Question