minor changes
This commit is contained in:
@ -324,7 +324,7 @@ void Keyboard::set_led(char led, bool on) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Registriert die Tastatur ISR im IntDispatcher
|
// Registriert die Tastatur ISR im IntDispatcher
|
||||||
// und erlaubt den keyboard interrupt
|
// und erlaubt den keyboard interrupt im PIC
|
||||||
void Keyboard::plugin(IntDispatcher& intdis, PIC& pic) {
|
void Keyboard::plugin(IntDispatcher& intdis, PIC& pic) {
|
||||||
intdis.assign(IntDispatcher::keyboard, *this);
|
intdis.assign(IntDispatcher::keyboard, *this);
|
||||||
pic.allow(PIC::keyboard);
|
pic.allow(PIC::keyboard);
|
||||||
@ -340,9 +340,11 @@ void Keyboard::trigger() {
|
|||||||
// NOTE: My keyboard has no delete key...
|
// NOTE: My keyboard has no delete key...
|
||||||
if (key.ctrl_left() && key.alt_left() && (char)key == 'r') {
|
if (key.ctrl_left() && key.alt_left() && (char)key == 'r') {
|
||||||
this->reboot();
|
this->reboot();
|
||||||
|
} else if ((char)key == 'k' || (char)key == 'j') {
|
||||||
|
scroll_mode(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
scroll_mode(key);
|
// TODO: Keyboard insert mode
|
||||||
|
|
||||||
// kout.show(0, 0, (char)key);
|
// kout.show(0, 0, (char)key);
|
||||||
}
|
}
|
||||||
@ -350,8 +352,6 @@ void Keyboard::trigger() {
|
|||||||
// TODO: Where to place this?
|
// TODO: Where to place this?
|
||||||
// Waits for keys to control the scrollback buffer display
|
// Waits for keys to control the scrollback buffer display
|
||||||
void scroll_mode(Key key) {
|
void scroll_mode(Key key) {
|
||||||
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.current_page));
|
|
||||||
|
|
||||||
switch ((char)key) {
|
switch ((char)key) {
|
||||||
case 'k':
|
case 'k':
|
||||||
kout.scroll_page_backward();
|
kout.scroll_page_backward();
|
||||||
|
|||||||
@ -23,6 +23,7 @@ int main() {
|
|||||||
|
|
||||||
// Initialize scrollback buffer after allocator.init()
|
// Initialize scrollback buffer after allocator.init()
|
||||||
kout.init(5);
|
kout.init(5);
|
||||||
|
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.current_page)); // Show current page
|
||||||
|
|
||||||
// text_demo();
|
// text_demo();
|
||||||
// sound_demo();
|
// sound_demo();
|
||||||
|
|||||||
Reference in New Issue
Block a user