On Wed, Dec 02, 2020 at 09:27:49PM +0100, Yuri D'Elia wrote: > On Sat, Nov 21 2020, Sven Joachim wrote: > >> If the mlterm package changed that ut-default setting, then providing your > >> own termcap settings may have reset the behavior to match the compiled-in > >> NON-ut default. > > > > That seems to have hit the mark. Indeed, if ":ut" is added to Yuri's > > termcap example, mlterm works correctly again. > > > > Yuri, would you like to bring this to the attention of the mlterm > > developers? > > So I think there's another problem here. The reason I had to change > ~/.mlterm/termcap was to fix the behavior of F[1-4] keys by making > mlterm send a different sequence. > > mlterm sends ^[OP for F1, but all mlterm terminfo definitions seem to > expect \[[11~
I noticed that earlier, but was busy. Revisiting the topic: a) just considering Debian, I could have overlooked F1-F4, because mlterm hardcodes shift/control modifiers for those keys to do special (and apparently undocumented) operations. b) the developer used to provide a termcap and terminfo, but removed that a while back: -------------------------------------------------------------------------------- commit 00cbfd76d180bbf9025324a863cd124ec027a7f7 Author: arakiken <devnull@localhost> Date: Sat Nov 21 23:51:43 2015 +0900 * README.ja, man/mlterm.1: Updated. * doc/term: Removed. * ml_vt100_parser.c: Conversion from Unicode to ISCII is disabled if use_ctl = false. -------------------------------------------------------------------------------- (the termcap/terminfo were in doc/term) c) of course those were incomplete or in error (which is what I test for). d) not only are those keys hard-coded, but a look at the source tells me that they may depend upon the system on which mlterm was built. https://github.com/arakiken/mlterm/blob/f2bb9eba4e6918ad2df5149a3e1f02c8b130a87a/uitoolkit/fb/ui_display.c#L932 (look for "XK_F3", for instance) However, that's in the "fb" GUI. I don't see anything relevant in uitoolkit/xlib or in the input-method code. e) at one point, the terminfo was (more) correct. That changed a while back: -------------------------------------------------------------------------------- commit 19bfa85d50d05862126f59a9c7d4f0275e2c1faa Author: arakiken <devnull@localhost> Date: Tue Sep 4 07:20:10 2012 +0900 * MLTerm.java: Application-cursor-keys sequences for Home and End keys are ^[OH and ^[OF instead of ^[[H and ^[[F. * x_screen.c, x_termcap.c, etc/termcap: - code cleanup - ML_F1(k1), ML_F2(k2), ML_F3(k3), ML_F4(k4) are added. - Application-cursor-keys sequences for XK_Home and XK_End are ^[OH and ^[OF instead of ^[[H and ^[[F. - Following key sequences are changed. XK_BackSpace: \x7f -> \x08 XK_Home: \x1bOH -> \x1b[H XK_End: \x1bOF -> \x1b[F XK_F1: \x1b[11~ -> \x1bOP XK_F2: \x1b[12~ -> \x1bOQ XK_F3: \x1b[13~ -> \x1bOR XK_F4: \x1b[14~ -> \x1bOS * x_screen.c: PAGE_DOWN shortcut is checked even if it is not backscroll mode. * ml_edit.c, ml_edit_util.c, ml_line.c: ml_line_t::is_continued_to_next flag is reset ml_edit_clear_line_to_right(), ml_edit_clear_below(), ml_edit_clear_above(), ml_edit_fill_all() and ml_edit_clear_lines() by using the new function ml_line_clear_with() instead of ml_line_fill(). -------------------------------------------------------------------------------- I had that (or a test-report) in my notes in March 2014, but on closing out those notes, overlooked the F1-F4 change. > ls mlterm* | xargs -l infocmp | grep kf1= > kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~, > kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~, > kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~, > kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\E[11~, > kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~, > > Either all these definitions are broken, or I need some enlightenment? > If I remove my customization, bce works as it should, but F[1-4] are > broken. > > Sure I can also add :ut to my ~/.mlterm/termcap, then mlterm sends what > the terminfo says, but it doesn't look like I'm fixing the right thing > here. yes. It would be nice if mlterm's developer documented things, so that it's not necessary to read the source code and experiment for a while to develop a terminal description. -- Thomas E. Dickey <dic...@invisible-island.net> https://invisible-island.net ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature