summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-11-11 08:20:19 +0000
committered <ed@FreeBSD.org>2009-11-11 08:20:19 +0000
commitfcc8740e5f98d5a779e7925466919cb22d750137 (patch)
tree0727d54b551a5437ffd2abdee66ef48b4016605c /sys/pc98/cbus
parent74d077dc934272cd3839f573aeeb27a6c77c4273 (diff)
downloadFreeBSD-src-fcc8740e5f98d5a779e7925466919cb22d750137.zip
FreeBSD-src-fcc8740e5f98d5a779e7925466919cb22d750137.tar.gz
Allow Syscons terminal emulators to provide function key strings.
xterm and cons25 have some incompatibilities when it comes to escape sequences for special keys, such as F1 to F12, home, end, etc. Add a new te_fkeystr() that can be used to override the strings. scterm-sck won't do anything with this, but scterm-teken will use teken_get_sequences() to obtain the proper sequence.
Diffstat (limited to 'sys/pc98/cbus')
-rw-r--r--sys/pc98/cbus/scterm-sck.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/pc98/cbus/scterm-sck.c b/sys/pc98/cbus/scterm-sck.c
index ce2324f..b4bf70f 100644
--- a/sys/pc98/cbus/scterm-sck.c
+++ b/sys/pc98/cbus/scterm-sck.c
@@ -94,15 +94,16 @@ typedef struct {
color_t dflt_rev_color; /* default reverse color */
} term_stat;
-static sc_term_init_t scterm_init;
-static sc_term_term_t scterm_term;
-static sc_term_puts_t scterm_puts;
-static sc_term_ioctl_t scterm_ioctl;
-static sc_term_reset_t scterm_reset;
+static sc_term_init_t scterm_init;
+static sc_term_term_t scterm_term;
+static sc_term_puts_t scterm_puts;
+static sc_term_ioctl_t scterm_ioctl;
+static sc_term_reset_t scterm_reset;
static sc_term_default_attr_t scterm_default_attr;
-static sc_term_clear_t scterm_clear;
-static sc_term_notify_t scterm_notify;
-static sc_term_input_t scterm_input;
+static sc_term_clear_t scterm_clear;
+static sc_term_notify_t scterm_notify;
+static sc_term_input_t scterm_input;
+static sc_term_fkeystr_t scterm_fkeystr;
static sc_term_sw_t sc_term_sc = {
{ NULL, NULL },
@@ -120,6 +121,7 @@ static sc_term_sw_t sc_term_sc = {
scterm_clear,
scterm_notify,
scterm_input,
+ scterm_fkeystr,
};
SCTERM_MODULE(sc, sc_term_sc);
@@ -1191,6 +1193,13 @@ scterm_input(scr_stat *scp, int c, struct tty *tp)
return FALSE;
}
+static const char *
+scterm_fkeystr(scr_stat *scp, int c)
+{
+
+ return (NULL);
+}
+
/*
* Calculate hardware attributes word using logical attributes mask and
* hardware colors
OpenPOWER on IntegriCloud