I remembered the chvt (change foreground virtual terminal) command, so that seems
like a good place to start. I looked at BusyBox's implementation in
console-tools/chvt.c, hoping that it would be small enough to skim through.
At 33 lines, with only 9 lines containing code I wasn't disappointed.
The call to console_make_active looks interesting. console_make_active can
be found in libbb/get_console.c: