Lots of people answer, but nobody points out that one simple
loadkeys command will achieve this.
Roeland Th. Jansen:
: use alt <###> where <333> is the number of the VC you want to switch to. The
: <###> is on the numpad. for the event that you need to send raw keys, escape
: first with alt <999> to switch VC switching off and atl <998> to switch it
: back on or so. A few system calls to have it done from a program and all is
: OK.
Even this strange construction is already possible today
(exercise: how?) using loadkeys.
Concerning system calls, in fact they are ioctls and also exist already.
For an example, see the source of chvt.
Andries