Merge branch 'BetterTerm' into cpu
This commit is contained in:
commit
0243d09d1f
|
@ -100,12 +100,22 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
|
||||||
// Main loop
|
// Main loop
|
||||||
while ((rc = bgetc(BStdIn, &ch)) == EOK) {
|
while ((rc = bgetc(BStdIn, &ch)) == EOK) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
|
||||||
|
case 7: // BEL
|
||||||
|
if (rand() % 32 == 0) {
|
||||||
|
IoDoStarWars();
|
||||||
|
}
|
||||||
|
else IoDoBeep();
|
||||||
|
break;
|
||||||
|
|
||||||
case 17: // DC1
|
case 17: // DC1
|
||||||
IoScrollUp();
|
IoScrollUp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18: // DC2
|
case 18: // DC2
|
||||||
IoScrollDown();
|
IoScrollDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 27: // ESC
|
case 27: // ESC
|
||||||
BFlushBuf(BStdOut);
|
BFlushBuf(BStdOut);
|
||||||
PoShutdownQemu();
|
PoShutdownQemu();
|
||||||
|
|
|
@ -96,6 +96,8 @@ void ScanCodesInit(void)
|
||||||
ScanCodes[0x1C] = '\n';
|
ScanCodes[0x1C] = '\n';
|
||||||
ScanCodes[0x39] = ' ';
|
ScanCodes[0x39] = ' ';
|
||||||
|
|
||||||
|
ScanCodes[0x40] = 7; // BEL
|
||||||
|
|
||||||
// Numpad
|
// Numpad
|
||||||
ScanCodes[0x48] = 17; // DC1, will serve as Arrow Up
|
ScanCodes[0x48] = 17; // DC1, will serve as Arrow Up
|
||||||
ScanCodes[0x50] = 18; // DC2, will serve as Arrow Down
|
ScanCodes[0x50] = 18; // DC2, will serve as Arrow Down
|
||||||
|
|
Loading…
Reference in New Issue