Hi there,
I was playing around with minix3 on vmware and I noticed that when I
pressed ALT-LEFTARROW or ALT-RIGHTARROW I was able to switch from one
console to another, but if I were on the last console and I wanted to
go to the first one (and vice-versa), I had to pass through the other
consoles first...

As an example:

ttyc1 <-> ttyc2 <-> ttyc3 <-> ttyc4

to switch from ttyc1 to ttyc4 I had to press ALT-LEFT four times. This
was annoying to me, so I wanted to make a minor change and I wrote
this very little patch for /usr/src/drivers/tty/keyboard.c

oops! I'm trying to 'diff' the two files, but it says 'diff: memory
exhausted'

I have to manually write down the changes I made:
file: /usr/src/drivers/tty/keyboard.c
line: about 550-560

[...]

if (ch == ALEFT) {
if (ccurrent == 0) {
select_console(NR_CONS-1);
} else {
select_console(ccurrent - 1);
}
set_leds();
} else
if (ch == ARIGHT) {
if (ccurrent == NR_CONS-1) {
select_console(0);
} else {
select_console(ccurrent + 1);
}
set_leds;
}

[...]

while the original one was:

[...]
if (ch == ALEFT) {
select_console(ccurrent - 1);
set_leds();
} else
if (ch == ARIGHT) {
select_console(ccurrent + 1);
set_leds;
}
[...]

Now it works fine for me. I can change the console with a "circular"
switching.

I hope this little fix could be useful for someone.

Antonio Barba (TheKaneB)