aboutsummaryrefslogtreecommitdiff
path: root/cInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cInput.cpp')
-rw-r--r--cInput.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cInput.cpp b/cInput.cpp
index 2a6e11c..a862127 100644
--- a/cInput.cpp
+++ b/cInput.cpp
@@ -45,8 +45,11 @@ sInputEvent cInput::poll()
return ret;
read (STDIN_FILENO, &buff, 1);
-
- if (buff[0] == '\x1B') //Escape sequence
+ if (buff[0] == 3) {
+ // User pressd Ctr+C
+ ret.type = _EVENT_TERM;
+ }
+ else if (buff[0] == '\x1B') //Escape sequence
{
read (STDIN_FILENO, &buff, 5);
if(buff[0] == '[')