mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +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:
parent
621217ffeb
commit
10b666f69a
11 changed files with 94 additions and 38 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue