2024-12-09 - Fixing The PgDn and PgUp Keys In MS-Kermit
=======================================================

FreeDOS ships mskermit 3.16, which emulates a DEC vt320 terminal. I
configured my getty as a vt220 terminal in /etc/inittab. When i press
PgUp it will "roll back screen" and when i press PgDn it will
"roll screen forward", scrolling through kermit's screen history.  I
would rather it send control codes like xterm and other terminal
emulators do.

At the Linux command prompt, i looked up the control codes from
terminfo.

   $ infocmp -1 vt220 | grep 'k[np]p'
       knp=\E[6~,
       kpp=\E[5~,

That is <Esc>[6~ for PgDn and <Esc>[5~ for PgUp.

At the mskermit prompt, i looked up the keyboard scan codes according
to kermit.

   [C:\FREEDOS\NET\MSKERMIT] MS-Kermit>SET KEY
    Push key to be defined: <press PgDn>
    Scan Code \4433 decimal is defined as
    Verb: dnscn  \Kdnscn

    Enter new definition: ...

   [C:\FREEDOS\NET\MSKERMIT] MS-Kermit>SET KEY
    Push key to be defined: <press PgUp>
    Scan Code \4425 decimal is defined as
    Verb: upscn  \Kupscn

    Enter new definition: ...

That is \4433 for PgDn and \4425 for PgUp.

I added the following lines to my mskermit.ini

   SET KEY \4433 \27[6~
   SET KEY \4425 \27[5~

Now, when i connect with mskermit and press PgUp and PgDn, Linux
applications behave as i expect them to.

I can still use Ctrl+PgUp and Ctrl+PgDn to scroll through kermit's
screen history.

p.s.

I also remapped the End and Home keys to vt220 control codes.
This fixes the End and Home keys in the lynx browser.

SET KEY \4431 \27[4~
SET KEY \4423 \27[1~

tags: bencollver,retrocomputing,technical,unix

Tags
====

bencollver
<gopher://tilde.pink/1/~bencollver/log/tag/bencollver/>
retrocomputing
<gopher://tilde.pink/1/~bencollver/log/tag/retrocomputing/>
technical
<gopher://tilde.pink/1/~bencollver/log/tag/technical/>
unix
<gopher://tilde.pink/1/~bencollver/log/tag/unix/>