diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-08-27 08:33:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-08-27 08:33:56 +0000 |
commit | c7f9b9172248d71ffa03f1f65b1d67de023bfa15 (patch) | |
tree | 2cd77981f3d85c8965d31d854b33ccc9e1f7ea6d /usr.bin | |
parent | b6471a2a745d1b17a6f9bf85db827a059aec12f3 (diff) |
Use kind and kri for S-Up/Down as well as kUP and kDN.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/tmux.h | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tty-keys.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tty-term.c | 46 |
3 files changed, 30 insertions, 24 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index c8ad282a046..34affdb6bdd 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.800 2017/08/16 12:12:54 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.801 2017/08/27 08:33:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -361,6 +361,7 @@ enum tty_code_code { TTYC_KIC6, TTYC_KIC7, TTYC_KICH1, + TTYC_KIND, TTYC_KLFT2, TTYC_KLFT3, TTYC_KLFT4, @@ -382,6 +383,7 @@ enum tty_code_code { TTYC_KPRV5, TTYC_KPRV6, TTYC_KPRV7, + TTYC_KRI, TTYC_KRIT2, TTYC_KRIT3, TTYC_KRIT4, diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c index 38b7bb58370..03dd5baeef0 100644 --- a/usr.bin/tmux/tty-keys.c +++ b/usr.bin/tmux/tty-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-keys.c,v 1.99 2017/06/23 15:36:52 nicm Exp $ */ +/* $OpenBSD: tty-keys.c,v 1.100 2017/08/27 08:33:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -271,6 +271,7 @@ static const struct tty_default_key_code tty_default_code_keys[] = { { TTYC_KDC5, KEYC_DC|KEYC_CTRL|KEYC_XTERM }, { TTYC_KDC6, KEYC_DC|KEYC_SHIFT|KEYC_CTRL|KEYC_XTERM }, { TTYC_KDC7, KEYC_DC|KEYC_ESCAPE|KEYC_CTRL|KEYC_XTERM }, + { TTYC_KIND, KEYC_UP|KEYC_SHIFT|KEYC_XTERM }, { TTYC_KDN2, KEYC_DOWN|KEYC_SHIFT|KEYC_XTERM }, { TTYC_KDN3, KEYC_DOWN|KEYC_ESCAPE|KEYC_XTERM }, { TTYC_KDN4, KEYC_DOWN|KEYC_SHIFT|KEYC_ESCAPE|KEYC_XTERM }, @@ -319,6 +320,7 @@ static const struct tty_default_key_code tty_default_code_keys[] = { { TTYC_KRIT5, KEYC_RIGHT|KEYC_CTRL|KEYC_XTERM }, { TTYC_KRIT6, KEYC_RIGHT|KEYC_SHIFT|KEYC_CTRL|KEYC_XTERM }, { TTYC_KRIT7, KEYC_RIGHT|KEYC_ESCAPE|KEYC_CTRL|KEYC_XTERM }, + { TTYC_KRI, KEYC_UP|KEYC_SHIFT|KEYC_XTERM }, { TTYC_KUP2, KEYC_UP|KEYC_SHIFT|KEYC_XTERM }, { TTYC_KUP3, KEYC_UP|KEYC_ESCAPE|KEYC_XTERM }, { TTYC_KUP4, KEYC_UP|KEYC_SHIFT|KEYC_ESCAPE|KEYC_XTERM }, diff --git a/usr.bin/tmux/tty-term.c b/usr.bin/tmux/tty-term.c index 86f337ae41f..c6fd2a81487 100644 --- a/usr.bin/tmux/tty-term.c +++ b/usr.bin/tmux/tty-term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-term.c,v 1.56 2017/06/16 11:50:06 nicm Exp $ */ +/* $OpenBSD: tty-term.c,v 1.57 2017/08/27 08:33:55 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -65,36 +65,36 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_CNORM] = { TTYCODE_STRING, "cnorm" }, [TTYC_COLORS] = { TTYCODE_NUMBER, "colors" }, [TTYC_CR] = { TTYCODE_STRING, "Cr" }, - [TTYC_CS] = { TTYCODE_STRING, "Cs" }, [TTYC_CSR] = { TTYCODE_STRING, "csr" }, - [TTYC_CUB] = { TTYCODE_STRING, "cub" }, + [TTYC_CS] = { TTYCODE_STRING, "Cs" }, [TTYC_CUB1] = { TTYCODE_STRING, "cub1" }, - [TTYC_CUD] = { TTYCODE_STRING, "cud" }, + [TTYC_CUB] = { TTYCODE_STRING, "cub" }, [TTYC_CUD1] = { TTYCODE_STRING, "cud1" }, - [TTYC_CUF] = { TTYCODE_STRING, "cuf" }, + [TTYC_CUD] = { TTYCODE_STRING, "cud" }, [TTYC_CUF1] = { TTYCODE_STRING, "cuf1" }, + [TTYC_CUF] = { TTYCODE_STRING, "cuf" }, [TTYC_CUP] = { TTYCODE_STRING, "cup" }, - [TTYC_CUU] = { TTYCODE_STRING, "cuu" }, [TTYC_CUU1] = { TTYCODE_STRING, "cuu1" }, + [TTYC_CUU] = { TTYCODE_STRING, "cuu" }, [TTYC_CVVIS] = { TTYCODE_STRING, "cvvis" }, - [TTYC_DCH] = { TTYCODE_STRING, "dch" }, [TTYC_DCH1] = { TTYCODE_STRING, "dch1" }, + [TTYC_DCH] = { TTYCODE_STRING, "dch" }, [TTYC_DIM] = { TTYCODE_STRING, "dim" }, - [TTYC_DL] = { TTYCODE_STRING, "dl" }, [TTYC_DL1] = { TTYCODE_STRING, "dl1" }, + [TTYC_DL] = { TTYCODE_STRING, "dl" }, [TTYC_E3] = { TTYCODE_STRING, "E3" }, [TTYC_ECH] = { TTYCODE_STRING, "ech" }, [TTYC_ED] = { TTYCODE_STRING, "ed" }, - [TTYC_EL] = { TTYCODE_STRING, "el" }, [TTYC_EL1] = { TTYCODE_STRING, "el1" }, + [TTYC_EL] = { TTYCODE_STRING, "el" }, [TTYC_ENACS] = { TTYCODE_STRING, "enacs" }, [TTYC_FSL] = { TTYCODE_STRING, "fsl" }, [TTYC_HOME] = { TTYCODE_STRING, "home" }, [TTYC_HPA] = { TTYCODE_STRING, "hpa" }, - [TTYC_ICH] = { TTYCODE_STRING, "ich" }, [TTYC_ICH1] = { TTYCODE_STRING, "ich1" }, - [TTYC_IL] = { TTYCODE_STRING, "il" }, + [TTYC_ICH] = { TTYCODE_STRING, "ich" }, [TTYC_IL1] = { TTYCODE_STRING, "il1" }, + [TTYC_IL] = { TTYCODE_STRING, "il" }, [TTYC_INDN] = { TTYCODE_STRING, "indn" }, [TTYC_INVIS] = { TTYCODE_STRING, "invis" }, [TTYC_KCBT] = { TTYCODE_STRING, "kcbt" }, @@ -109,20 +109,19 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KDC6] = { TTYCODE_STRING, "kDC6" }, [TTYC_KDC7] = { TTYCODE_STRING, "kDC7" }, [TTYC_KDCH1] = { TTYCODE_STRING, "kdch1" }, - [TTYC_KDN2] = { TTYCODE_STRING, "kDN" }, + [TTYC_KDN2] = { TTYCODE_STRING, "kDN" }, /* not kDN2 */ [TTYC_KDN3] = { TTYCODE_STRING, "kDN3" }, [TTYC_KDN4] = { TTYCODE_STRING, "kDN4" }, [TTYC_KDN5] = { TTYCODE_STRING, "kDN5" }, [TTYC_KDN6] = { TTYCODE_STRING, "kDN6" }, [TTYC_KDN7] = { TTYCODE_STRING, "kDN7" }, - [TTYC_KEND] = { TTYCODE_STRING, "kend" }, [TTYC_KEND2] = { TTYCODE_STRING, "kEND" }, [TTYC_KEND3] = { TTYCODE_STRING, "kEND3" }, [TTYC_KEND4] = { TTYCODE_STRING, "kEND4" }, [TTYC_KEND5] = { TTYCODE_STRING, "kEND5" }, [TTYC_KEND6] = { TTYCODE_STRING, "kEND6" }, [TTYC_KEND7] = { TTYCODE_STRING, "kEND7" }, - [TTYC_KF1] = { TTYCODE_STRING, "kf1" }, + [TTYC_KEND] = { TTYCODE_STRING, "kend" }, [TTYC_KF10] = { TTYCODE_STRING, "kf10" }, [TTYC_KF11] = { TTYCODE_STRING, "kf11" }, [TTYC_KF12] = { TTYCODE_STRING, "kf12" }, @@ -133,7 +132,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KF17] = { TTYCODE_STRING, "kf17" }, [TTYC_KF18] = { TTYCODE_STRING, "kf18" }, [TTYC_KF19] = { TTYCODE_STRING, "kf19" }, - [TTYC_KF2] = { TTYCODE_STRING, "kf2" }, + [TTYC_KF1] = { TTYCODE_STRING, "kf1" }, [TTYC_KF20] = { TTYCODE_STRING, "kf20" }, [TTYC_KF21] = { TTYCODE_STRING, "kf21" }, [TTYC_KF22] = { TTYCODE_STRING, "kf22" }, @@ -144,7 +143,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KF27] = { TTYCODE_STRING, "kf27" }, [TTYC_KF28] = { TTYCODE_STRING, "kf28" }, [TTYC_KF29] = { TTYCODE_STRING, "kf29" }, - [TTYC_KF3] = { TTYCODE_STRING, "kf3" }, + [TTYC_KF2] = { TTYCODE_STRING, "kf2" }, [TTYC_KF30] = { TTYCODE_STRING, "kf30" }, [TTYC_KF31] = { TTYCODE_STRING, "kf31" }, [TTYC_KF32] = { TTYCODE_STRING, "kf32" }, @@ -155,7 +154,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KF37] = { TTYCODE_STRING, "kf37" }, [TTYC_KF38] = { TTYCODE_STRING, "kf38" }, [TTYC_KF39] = { TTYCODE_STRING, "kf39" }, - [TTYC_KF4] = { TTYCODE_STRING, "kf4" }, + [TTYC_KF3] = { TTYCODE_STRING, "kf3" }, [TTYC_KF40] = { TTYCODE_STRING, "kf40" }, [TTYC_KF41] = { TTYCODE_STRING, "kf41" }, [TTYC_KF42] = { TTYCODE_STRING, "kf42" }, @@ -166,7 +165,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KF47] = { TTYCODE_STRING, "kf47" }, [TTYC_KF48] = { TTYCODE_STRING, "kf48" }, [TTYC_KF49] = { TTYCODE_STRING, "kf49" }, - [TTYC_KF5] = { TTYCODE_STRING, "kf5" }, + [TTYC_KF4] = { TTYCODE_STRING, "kf4" }, [TTYC_KF50] = { TTYCODE_STRING, "kf50" }, [TTYC_KF51] = { TTYCODE_STRING, "kf51" }, [TTYC_KF52] = { TTYCODE_STRING, "kf52" }, @@ -177,11 +176,12 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KF57] = { TTYCODE_STRING, "kf57" }, [TTYC_KF58] = { TTYCODE_STRING, "kf58" }, [TTYC_KF59] = { TTYCODE_STRING, "kf59" }, - [TTYC_KF6] = { TTYCODE_STRING, "kf6" }, + [TTYC_KF5] = { TTYCODE_STRING, "kf5" }, [TTYC_KF60] = { TTYCODE_STRING, "kf60" }, [TTYC_KF61] = { TTYCODE_STRING, "kf61" }, [TTYC_KF62] = { TTYCODE_STRING, "kf62" }, [TTYC_KF63] = { TTYCODE_STRING, "kf63" }, + [TTYC_KF6] = { TTYCODE_STRING, "kf6" }, [TTYC_KF7] = { TTYCODE_STRING, "kf7" }, [TTYC_KF8] = { TTYCODE_STRING, "kf8" }, [TTYC_KF9] = { TTYCODE_STRING, "kf9" }, @@ -199,6 +199,7 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KIC6] = { TTYCODE_STRING, "kIC6" }, [TTYC_KIC7] = { TTYCODE_STRING, "kIC7" }, [TTYC_KICH1] = { TTYCODE_STRING, "kich1" }, + [TTYC_KIND] = { TTYCODE_STRING, "kind" }, [TTYC_KLFT2] = { TTYCODE_STRING, "kLFT" }, [TTYC_KLFT3] = { TTYCODE_STRING, "kLFT3" }, [TTYC_KLFT4] = { TTYCODE_STRING, "kLFT4" }, @@ -226,7 +227,8 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_KRIT5] = { TTYCODE_STRING, "kRIT5" }, [TTYC_KRIT6] = { TTYCODE_STRING, "kRIT6" }, [TTYC_KRIT7] = { TTYCODE_STRING, "kRIT7" }, - [TTYC_KUP2] = { TTYCODE_STRING, "kUP" }, + [TTYC_KRI] = { TTYCODE_STRING, "kri" }, + [TTYC_KUP2] = { TTYCODE_STRING, "kUP" }, /* not kUP2 */ [TTYC_KUP3] = { TTYCODE_STRING, "kUP3" }, [TTYC_KUP4] = { TTYCODE_STRING, "kUP4" }, [TTYC_KUP5] = { TTYCODE_STRING, "kUP5" }, @@ -239,11 +241,11 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_RMACS] = { TTYCODE_STRING, "rmacs" }, [TTYC_RMCUP] = { TTYCODE_STRING, "rmcup" }, [TTYC_RMKX] = { TTYCODE_STRING, "rmkx" }, - [TTYC_SE] = { TTYCODE_STRING, "Se" }, [TTYC_SETAB] = { TTYCODE_STRING, "setab" }, [TTYC_SETAF] = { TTYCODE_STRING, "setaf" }, [TTYC_SETRGBB] = { TTYCODE_STRING, "setrgbb" }, [TTYC_SETRGBF] = { TTYCODE_STRING, "setrgbf" }, + [TTYC_SE] = { TTYCODE_STRING, "Se" }, [TTYC_SGR0] = { TTYCODE_STRING, "sgr0" }, [TTYC_SITM] = { TTYCODE_STRING, "sitm" }, [TTYC_SMACS] = { TTYCODE_STRING, "smacs" }, @@ -255,8 +257,8 @@ static const struct tty_term_code_entry tty_term_codes[] = { [TTYC_SS] = { TTYCODE_STRING, "Ss" }, [TTYC_TC] = { TTYCODE_FLAG, "Tc" }, [TTYC_TSL] = { TTYCODE_STRING, "tsl" }, - [TTYC_VPA] = { TTYCODE_STRING, "vpa" }, [TTYC_U8] = { TTYCODE_NUMBER, "U8" }, + [TTYC_VPA] = { TTYCODE_STRING, "vpa" }, [TTYC_XENL] = { TTYCODE_FLAG, "xenl" }, [TTYC_XT] = { TTYCODE_FLAG, "XT" }, }; |