To support multiple keyboards and multiple monitors, KGI needs to add more tty devices to the dev directory. UNIX tradition says that a tty device should consist of one keyboard and one monitor, paired together. KGI has to bend this tradition a little bit to support systems with mismatched numbers of monitors and keyboards. To achieve this with minimal alterations to the accepted way of doing things, KGI represents extra monitors as ttys which are missing their keyboards, and extra keyboards as ttys which are missing their monitors.
Bear in mind that while the tty devices seem to pair the monitors with the keyboards, there's no reason you actually have to use them in pairs. If an application program needs two monitors and three keyboards, it need merely open two ttys for writing, and three ttys for reading.
Traditional Linux provides 64 "virtual consoles". To put it differently, the keyboard emulates 64 virtual keyboards, the monitor emulates 64 virtual monitors, and when joined pairwise, these devices become 64 ttys. KGI allows more keyboards and more monitors, and it virtualizes them all. With KGI, each physical keyboard is treated as 16 virtual keyboards, and each physical monitor is treated as 16 virtual monitors. A set of 16 virtual keyboards and 16 virtual monitors can be combined pairwise into a set of 16 tty devices. As stated earlier, the pairing does not have to be perfect --- it is legal to make a set of 16 tty devices without keyboards, or 16 tty devices without monitors.
Because each physical device emulates 16 virtual devices, tty device files always occur in sets of 16. We've arranged the dev directory into subdirectories to make this grouping clear (notice that the files are named "vty" for the moment, but they're basically ttys):
/dev/display/head0/vty1
/dev/display/head0/vty2
/dev/display/head0/...
/dev/display/head0/vty16
/dev/display/head1/vty1
/dev/display/head1/vty2
/dev/display/head1/...
/dev/display/head1/vty16
With KGI, the display drivers can be loadable modules. When you load the module, you specify (by means of insmod parameters) which set of 16 ttys the display should attach itself to. Likewise, when you load a keyboard driver, you specify (by means of insmod parameters) which set of 16 ttys the keyboard should attach itself to. There are also configuration calls that can change these settings later.
It would be traditional to attach the main keyboard to the first set of 16 ttys. And it would also be traditional to attach the main monitor to the same 16 ttys. Then, you'd run "getty" on the first several ttys. This would give you the old-fashioned Linux behavior.
But, KGI doesn't enforce anything like that. If you have one monitor and one keyboard, you could associate the monitor with 3rd set of 16 ttys, and the keyboard with the 8th set of 16 ttys. If you did that, you'd have to open /dev/display/head2/tty1 for writing to get to the monitor, and you'd have to open /dev/display/head7/tty1 for reading to get the keyboard. This would break almost every user program, since almost every program expects a tty to have both a keyboard and a monitor. But, there's nothing in KGI stopping you from doing it.
When a physical keyboard and physical display are caused to share a set of 16 ttys, "echo" from the 16 virtual keyboards goes to the 16 virtual displays, as you would expect. And, if you hit ALT-Fn on the keyboard, the display will flip as well, as expected.
Of course, you can compile a keyboard and a display driver into the kernel, and by default, they automatically attach themselves to the first 16 ttys. And, as always, these settings can be reconfigured on the fly.