diff options
author | nicm <nicm> | 2022-06-14 07:29:00 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-06-14 07:29:00 +0000 |
commit | 616bde08ac74d4be0ae06087aa3103df54833f86 (patch) | |
tree | 6379e3b7e204f65ce18f12db9f5369cb9a29d201 /tty-features.c | |
parent | 42ddf02ffce2002ed5ded5e03e1a51516fc2d710 (diff) | |
download | rtmux-616bde08ac74d4be0ae06087aa3103df54833f86.tar.gz rtmux-616bde08ac74d4be0ae06087aa3103df54833f86.tar.bz2 rtmux-616bde08ac74d4be0ae06087aa3103df54833f86.zip |
kf* terminfo capabilities are poorly defined and rxvt uses them in a
different way from xterm, so add a feature flag for rxvt to make tmux
ignore the capabilities and instead rely on its builtin definitions.
Diffstat (limited to 'tty-features.c')
-rw-r--r-- | tty-features.c | 77 |
1 files changed, 76 insertions, 1 deletions
diff --git a/tty-features.c b/tty-features.c index 2848b4d6..477925e3 100644 --- a/tty-features.c +++ b/tty-features.c @@ -250,6 +250,80 @@ static const struct tty_feature tty_feature_rectfill = { TERM_DECFRA }; +/* Use builtin function keys only. */ +static const char *tty_feature_ignorefkeys_capabilities[] = { + "kf0@", + "kf1@", + "kf2@", + "kf3@", + "kf4@", + "kf5@", + "kf6@", + "kf7@", + "kf8@", + "kf9@", + "kf10@", + "kf11@", + "kf12@", + "kf13@", + "kf14@", + "kf15@", + "kf16@", + "kf17@", + "kf18@", + "kf19@", + "kf20@", + "kf21@", + "kf22@", + "kf23@", + "kf24@", + "kf25@", + "kf26@", + "kf27@", + "kf28@", + "kf29@", + "kf30@", + "kf31@", + "kf32@", + "kf33@", + "kf34@", + "kf35@", + "kf36@", + "kf37@", + "kf38@", + "kf39@", + "kf40@", + "kf41@", + "kf42@", + "kf43@", + "kf44@", + "kf45@", + "kf46@", + "kf47@", + "kf48@", + "kf49@", + "kf50@", + "kf51@", + "kf52@", + "kf53@", + "kf54@", + "kf55@", + "kf56@", + "kf57@", + "kf58@", + "kf59@", + "kf60@", + "kf61@", + "kf62@", + "kf63@", + NULL +}; +static const struct tty_feature tty_feature_ignorefkeys = { + "ignorefkeys", + tty_feature_ignorefkeys_capabilities, + 0 +}; + /* Available terminal features. */ static const struct tty_feature *tty_features[] = { &tty_feature_256, @@ -259,6 +333,7 @@ static const struct tty_feature *tty_features[] = { &tty_feature_cstyle, &tty_feature_extkeys, &tty_feature_focus, + &tty_feature_ignorefkeys, &tty_feature_margins, &tty_feature_mouse, &tty_feature_osc7, @@ -372,7 +447,7 @@ tty_default_features(int *feat, const char *name, u_int version) ",ccolour,cstyle,focus,overline,usstyle" }, { .name = "rxvt-unicode", - .features = "256,bpaste,ccolour,cstyle,mouse,title" + .features = "256,bpaste,ccolour,cstyle,mouse,title,ignorefkeys" }, { .name = "iTerm2", .features = TTY_FEATURES_BASE_MODERN_XTERM |