Skip to content

Commit

Permalink
Handle Ctrl+D and Ctrl+L input
Browse files Browse the repository at this point in the history
  • Loading branch information
ktg-123 committed May 9, 2021
1 parent caaa695 commit 16ded1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ void roosh_loop(std::istream &in)
keyboard.buffer.erase(keyboard.position, 1);
recover_console(keyboard);
}
else if(keyword == 0x4 || keyword == 0xc){
// If the Ctrl+D or Ctrl+L is pressed
raise(SIGINT);
}
else if (keyword == '\n')
{
cout << "\n";
Expand Down

0 comments on commit 16ded1a

Please sign in to comment.