aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/termkey.c b/termkey.c
index 7c788c4..47c21f3 100644
--- a/termkey.c
+++ b/termkey.c
@@ -9,8 +9,8 @@
#include <stdio.h>
static struct termkey_driver *drivers[] = {
- &termkey_driver_ti,
&termkey_driver_csi,
+ &termkey_driver_ti,
NULL,
};
@@ -133,8 +133,10 @@ termkey_t *termkey_new_full(int fd, int flags, size_t buffsize, int waittime)
register_c0(tk, TERMKEY_SYM_ENTER, 0x0d, NULL);
register_c0(tk, TERMKEY_SYM_ESCAPE, 0x1b, NULL);
+ const char *term = getenv("TERM");
+
for(i = 0; drivers[i]; i++) {
- void *driver_info = (*drivers[i]->new_driver)(tk);
+ void *driver_info = (*drivers[i]->new_driver)(tk, term);
if(!driver_info)
continue;