mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 15:14:13 +00:00
Basic ^C interrupt implementation.
For testing, I made cat put itself into a new process group. This should eventually be done by sh between fork() and exec().
This commit is contained in:
@@ -384,9 +384,15 @@ void VirtualConsole::on_char(byte ch, bool shouldEmit)
|
||||
set_cursor(m_cursor_row, m_cursor_column);
|
||||
}
|
||||
|
||||
void VirtualConsole::onKeyPress(byte ch)
|
||||
void VirtualConsole::onKeyPress(Keyboard::Key key)
|
||||
{
|
||||
emit(ch);
|
||||
if (key.ctrl() && key.character == 'C') {
|
||||
interrupt();
|
||||
return;
|
||||
}
|
||||
if (key.ctrl())
|
||||
emit('^');
|
||||
emit(key.character);
|
||||
}
|
||||
|
||||
void VirtualConsole::onConsoleReceive(byte ch)
|
||||
|
||||
Reference in New Issue
Block a user