kbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc.
This commit is contained in:
parent
e85aa1089d
commit
fad1b3f7f7
2 changed files with 39 additions and 2 deletions
|
@ -179,6 +179,32 @@ This is used to provide a serial console when
|
||||||
.B $console
|
.B $console
|
||||||
environment variable is set. (see
|
environment variable is set. (see
|
||||||
.IR plan9.ini (8)).
|
.IR plan9.ini (8)).
|
||||||
|
.PP
|
||||||
|
Holding
|
||||||
|
.LR Ctrl
|
||||||
|
+
|
||||||
|
.LR Alt
|
||||||
|
and then pressing the
|
||||||
|
.LR Del
|
||||||
|
key will
|
||||||
|
trigger a reboot of the terminal.
|
||||||
|
To forward this sequence downstream,
|
||||||
|
.LR Shift
|
||||||
|
+
|
||||||
|
.LR Ctrl
|
||||||
|
+
|
||||||
|
.LR Alt
|
||||||
|
and then pressing
|
||||||
|
.LR Del
|
||||||
|
will cause to send a
|
||||||
|
.LR Shift
|
||||||
|
up before the
|
||||||
|
.LR Del
|
||||||
|
key.
|
||||||
|
This is usefull for programs like
|
||||||
|
.IR vnc (1)
|
||||||
|
and
|
||||||
|
.IR vmx (1).
|
||||||
.SS Keyboard
|
.SS Keyboard
|
||||||
A read on the
|
A read on the
|
||||||
.BR kbd
|
.BR kbd
|
||||||
|
|
|
@ -371,6 +371,13 @@ shutdown(void)
|
||||||
threadexitsall(nil);
|
threadexitsall(nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
shiftup(void)
|
||||||
|
{
|
||||||
|
Key key = { .down = 0, .r = Kshift, .b = Kshift };
|
||||||
|
send(keychan, &key);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scan code processing
|
* Scan code processing
|
||||||
*/
|
*/
|
||||||
|
@ -433,8 +440,12 @@ kbdputsc(Scan *scan, int c)
|
||||||
if(scan->caps && key.r<='z' && key.r>='a')
|
if(scan->caps && key.r<='z' && key.r>='a')
|
||||||
key.r += 'A' - 'a';
|
key.r += 'A' - 'a';
|
||||||
|
|
||||||
if(scan->ctl && scan->alt && key.r == Kdel)
|
if(scan->ctl && scan->alt && key.r == Kdel){
|
||||||
reboot();
|
if(scan->shift)
|
||||||
|
shiftup();
|
||||||
|
else
|
||||||
|
reboot();
|
||||||
|
}
|
||||||
|
|
||||||
if(key.b)
|
if(key.b)
|
||||||
send(keychan, &key);
|
send(keychan, &key);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue