arch_debug_blue_screen_getchar() can now also return escape sequences for cursor
movement - IOW, the history of kernel debugger calls is now working also from the on-screen KDL. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14000 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ae124a62f8
commit
ed73e0eefa
@ -103,13 +103,27 @@ arch_debug_blue_screen_getchar(void)
|
|||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
};
|
};
|
||||||
enum keycodes {
|
enum keycodes {
|
||||||
LSHIFT = 42,
|
LSHIFT = 42,
|
||||||
RSHIFT = 54,
|
RSHIFT = 54,
|
||||||
|
CURSOR_LEFT = 75,
|
||||||
|
CURSOR_RIGHT = 77,
|
||||||
|
CURSOR_UP = 72,
|
||||||
|
CURSOR_DOWN = 80,
|
||||||
};
|
};
|
||||||
static bool shift = false;
|
static bool shift = false;
|
||||||
static uint8 last = 0;
|
static uint8 special = 0;
|
||||||
uint8 key, ascii = 0;
|
uint8 key, ascii = 0;
|
||||||
|
|
||||||
|
if (special & 0x80) {
|
||||||
|
special &= ~0x80;
|
||||||
|
return '[';
|
||||||
|
}
|
||||||
|
if (special != 0) {
|
||||||
|
key = special;
|
||||||
|
special = 0;
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
uint8 status = in8(PS2_PORT_CTRL);
|
uint8 status = in8(PS2_PORT_CTRL);
|
||||||
|
|
||||||
@ -133,10 +147,29 @@ arch_debug_blue_screen_getchar(void)
|
|||||||
shift = false;
|
shift = false;
|
||||||
} else {
|
} else {
|
||||||
// key down
|
// key down
|
||||||
if (key == LSHIFT || key == RSHIFT)
|
switch (key) {
|
||||||
shift = true;
|
case LSHIFT:
|
||||||
else
|
case RSHIFT:
|
||||||
return shift ? shifted_keymap[key] : unshifted_keymap[key];
|
shift = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// start escape sequence for cursor movement
|
||||||
|
case CURSOR_UP:
|
||||||
|
special = 0x80 | 'A';
|
||||||
|
return '\x1b';
|
||||||
|
case CURSOR_DOWN:
|
||||||
|
special = 0x80 | 'B';
|
||||||
|
return '\x1b';
|
||||||
|
case CURSOR_RIGHT:
|
||||||
|
special = 0x80 | 'C';
|
||||||
|
return '\x1b';
|
||||||
|
case CURSOR_LEFT:
|
||||||
|
special = 0x80 | 'D';
|
||||||
|
return '\x1b';
|
||||||
|
|
||||||
|
default:
|
||||||
|
return shift ? shifted_keymap[key] : unshifted_keymap[key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user