Added raw input to suppress ctrl + c

This commit is contained in:
2017-12-15 16:14:24 +01:00
parent 010a663fc0
commit a4e95087e1

View File

@@ -3,7 +3,7 @@
#include <string.h> #include <string.h>
#include <ncurses.h> #include <ncurses.h>
#include <getopt.h> #include <getopt.h>
#include <ao/ao.h> #include <ao/ao.h> //needed to release on close (ao_shutdown)
#include "csoundbox.h" #include "csoundbox.h"
#include "config.h" #include "config.h"
@@ -59,6 +59,7 @@ void inputLocal(void) {
initscr(); initscr();
nonl(); //no newline nonl(); //no newline
noecho(); noecho();
raw(); //raw input (suppress ctrl + c)
keypad(stdscr, TRUE); //Disable the F1-12 keypad keypad(stdscr, TRUE); //Disable the F1-12 keypad
curs_set(0); //Disable the cursor curs_set(0); //Disable the cursor
@@ -78,6 +79,7 @@ void inputNetwork(char *server) {
initscr(); initscr();
nonl(); //no newline nonl(); //no newline
noecho(); noecho();
raw(); //raw input (suppress ctrl + c)
keypad(stdscr, TRUE); //Disable the F1-12 keypad keypad(stdscr, TRUE); //Disable the F1-12 keypad
curs_set(0); //Disable the cursor curs_set(0); //Disable the cursor