aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demo.c3
-rw-r--r--termkey.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/demo.c b/demo.c
index a2d431c..4a96b64 100644
--- a/demo.c
+++ b/demo.c
@@ -14,7 +14,8 @@ int main(int argc, char *argv[]) {
}
int old_lflag = termios.c_lflag;
- termios.c_lflag &= ~(ICANON|ECHO);
+ termios.c_iflag &= ~(IXON|INLCR|ICRNL);
+ termios.c_lflag &= ~(ICANON|ECHO|ISIG);
tcsetattr(0, TCSANOW, &termios);
diff --git a/termkey.c b/termkey.c
index d511b4a..411d958 100644
--- a/termkey.c
+++ b/termkey.c
@@ -112,8 +112,7 @@ termkey_t *termkey_new_full(int fd, int flags, size_t buffsize, int waittime)
termkey_register_c0(tk, TERMKEY_SYM_BACKSPACE, 0x08, "Backspace");
termkey_register_c0(tk, TERMKEY_SYM_TAB, 0x09, "Tab");
- termkey_register_c0(tk, TERMKEY_SYM_ENTER, 0x0a, "Enter");
- termkey_register_c0(tk, TERMKEY_SYM_ENTER, 0x0d, NULL);
+ termkey_register_c0(tk, TERMKEY_SYM_ENTER, 0x0d, "Enter");
termkey_register_c0(tk, TERMKEY_SYM_ESCAPE, 0x1b, "Escape");
// G1