Keyboard - issinoho/veetee GitHub Wiki

Keyboard

veetee maps PC keys by position to the DEC LK401 keyboard, so the keypad and editing keys sit where DEC users expect them. What each key sends depends on the host-selected modes (cursor key mode, keypad application mode, 7-bit or 8-bit controls, VT52 mode), exactly as on the terminal.

The map is a TOML file you can change with the Keyboard Map window; the tables below are the built-in map.

Function keys

PC key DEC key
F1 or Pause Hold Screen
F2 or Print Screen Print Screen
F3 Set-Up
F4 Session — moves the keyboard to the next session
Alt+1–Alt+4 Session 1 to 4 directly (Sessions)
Ctrl+F4 One window or two
Ctrl+Shift+Up, Ctrl+Shift+Down Move the line between two windows
F5 or Break Break
Scroll Lock Do — the EVE and TPU command line
Ctrl+F2 or Ctrl+Print Screen Auto print on or off (Printing)
Ctrl+F5 or Ctrl+Break Answerback
F6–F12 F6–F12
Shift+F1–F10 F11–F20 (Shift+F5 = Help, Shift+F6 = Do)
Ctrl+F6–F12, Ctrl+Shift+F1–F10 User-defined keys (DEC Shift+F6–F20)

In VT100 mode F11, F12 and F13 send ESC, BS and LF, like an LK201 in VT100 mode.

On the VT500 models a host can give F1–F4 to the application or disable them (DECLFKC), and disable the copy and paste keys (DECELF).

Editing keypad

PC key DEC key
Insert Find
Home Insert Here
Page Up Remove
Delete Select
End Prev Screen
Page Down Next Screen
Arrow keys Arrow keys

Numeric keypad

PC key DEC key
Num Lock, /, *, − PF1, PF2, PF3, PF4
+ , (comma)
Shift + − (minus)
0–9, ., Enter 0–9, ., Enter

Keys click as they do on the terminal; the volume is in Keyboard Set-Up.

PF1 is the EDT and EVE Gold key; PF2 is EDT's Help. The keypad works the same whether Num Lock's light is on or off. If your keyboard has no numeric keypad, bind PF1–PF4 to other keys in the Keyboard Map window.

On Windows up to 1.9.0 the keypad Enter key sent a carriage return rather than DEC ENTER (EDT left ^M at its prompt), and every other press of PF1 turned the keypad into cursor keys, so GOLD 4 worked only on the second try. GTK's Windows backend drops the extended-key bit that tells these keys apart; from 1.9.1 veetee reads it itself, and the keypad behaves as on Linux.

Main keypad

PC key DEC key
Backspace <X] — sends DEL, the DEC default (DECBKM)
Ctrl+Space, Ctrl+2 NUL
Ctrl+3 … Ctrl+7 ESC, FS, GS, RS, US
Ctrl+8 DEL

Characters typed in an 8-bit session use DEC Multinational or ISO Latin-1, whichever the host selected as the user-preferred supplemental set. In national replacement character (NRC) mode the keyboard follows the national layout.

veetee's own keys

PC key Function
Ctrl+Shift+C / Ctrl+Shift+V Copy / Paste
Ctrl+↑ / Ctrl+↓ Pan the view one line through page memory
Ctrl+End / Ctrl+Page Down Pan to the previous / next page
Ctrl+Shift+M Mark a checkpoint in the session recording
Shift+PgUp, Shift+PgDn Review the history
Ctrl+Shift+F Find in the history

Ctrl, Alt and Shift with DEC keys

Modifiers that a binding does not use pass on to the DEC key. A VT510, VT520 or VT525 then sends its modified-key sequences (DECFNK, CSI n ; m ~ with m = 1 + Shift + 2×Alt + 4×Ctrl): for example Ctrl+Insert is Ctrl+Find, CSI 1;5~. Older models send the unmodified key.

The Keyboard Map window

Keyboard Map… in the window menu shows an LK401 keyboard. Click a DEC key (or one of veetee's functions) to see which PC keys produce it, then:

  • Add PC Key…, then press the key combination you want.
  • The remove button beside a PC key takes that binding away.
  • Save writes your map to ~/.config/veetee/keymap.toml (%LOCALAPPDATA%\veetee\keymap.toml on Windows); Restore Defaults goes back to the built-in map.

--keymap FILE starts with another map. A map file lists bindings:

name = "My LK401"

[bind](/issinoho/veetee/wiki/bind)
pc = "Ctrl+Alt+2"
dec = "pf2"

[bind](/issinoho/veetee/wiki/bind)
pc = "F12"
dec = "do"

PC keys are GDK key names with Ctrl+, Shift+ and Alt+ prefixes. DEC names include pf1–pf4, kp0–kp9, kp-comma, kp-minus, kp-period, kp-enter, find, insert-here, remove, select, prev-screen, next-screen, up, down, left, right, f6–f20, help, do, delete, return, tab, escape, udk6–udk20, and the local functions hold-screen, print-screen, auto-print, set-up, session, break, answerback, copy, paste, mark-checkpoint, pan-up, pan-down, pan-prev-page, pan-next-page, review-back, review-forward, search, session-1 to session-4, split-screen, split-up and split-down. A keymap saved before a function existed gains it on its default key, where that key is free in it (from 1.8.0).

User-defined and programmed keys

Hosts load user-defined keys with DECUDK. On a DEC keyboard they are Shift+F6–F20; in veetee use Ctrl+F6–F12 and Ctrl+Shift+F1–F10.

A VT520 or VT525 host can also program keys by LK411 key position: function keys with DECPFK, main keypad keys with DECPAK (up to seven codes per key, for each modifier combination), and copy the factory definitions back with DECCKD. It can ask for the definitions (DECRQKD), the free key memory (DECRQPKFM) and a key's type (DECRQKT). A key programmed to a local function (Hold Screen, Print Screen, Set-Up, Session, Break, Answerback) runs veetee's own function.