From: b4283 <da....@gm...> - 2009-02-20 08:14:56
|
Thank you for such detailed infomation ! It helps me understand a lot of things. I finally realized that Ctrl-Home isn't VT100 compatible key after all. Such limitation looks little bit stupid nowadays cause usually ppl don't use them anymore. Now I've turned to urxvt (rxvt-unicode), it's compact and fast, I love it. It's interpretations for key combinations are different from xterm style: for Home: ^[[8~ for Ctrl-Home: ^[[8^ there's a extra ^ on the end. However, for my purpose, as long as there are differences, they could be binded by vim, so it's not a problem at all. Finally, thank you again. Regards, b4283. 2009/2/19 Benjamin R. Haskell <ml...@be...> > On Wed, 18 Feb 2009, b4283 wrote: > > > Hi, > > So far as I know, the best way to check terminals' capabilities is to > > use cat. For my example, usage of Ctrl-Home and Ctrl-End is needed, but > > somehow their keycode are all the same: ^[0F and ^[OH, with or without > > CTRL keymods. Is this a bug or intended feature? > > AFAIK, Mlterm uses terminfo, which doesn't have an official way to > represent "Control+Home". Xterm (and probably terminals derived from > Xterm?) uses a set of conventions to indicate various modifiers. > > >From the sources for Xterm, the file: xterm-242/terminfo: > ( from http://invisible-island.net/xterm/ ) > > # Encode modifiers using parameters (see "Xterm Control Sequences" > ctlseqs.ms). > [...] > # > # Some names are extensions allowed by ncurses, e.g., > # kDN, kDN5, kDN6, kLFT5, kLFT6, kRIT5, kRIT6, kUP, kUP5, kUP6 > # > # The uppercase names are made up, since there are no standards that apply. > [...] > # The numbers correspond to the modifier parameters documented in Xterm > # Control Sequences: > # > # 2 Shift > # 3 Alt > # 4 Shift + Alt > # 5 Control > # 6 Shift + Control > # 7 Alt + Control > # 8 Shift + Alt + Control > > So, for example, pressing Home with various modifiers in UXterm: > $ cat > ^[[H^[[1;2H^[[1;9H^[[1;10H^[[1;13H^[[1;6H^[[1;14H > > The problem is that this is an Xterm extension that Mlterm doesn't > support. And it appears to be a nonstandard terminfo property, too. > (Ctrl+Home gives me '^[[1;5H' which appears to correspond to the terminfo > line: > kHOM5=\E[1;5H, > ) > > Mlterm uses the terminfo definition of key_home (kh): > > $ infocmp -L | grep key_home > key_f9=\E[20~, key_home=\EOH, key_ic=\E[2~, > $ cat > ^[OH^[OH^[OH^[^[OH^[OH^[^[OH^[OH > > (Only the variants with 'Alt+' produce a difference for me: the ones with > the extra '^[' (== \E == escape)). > > I'm not sure how involved a change this would be. But, I'm also not a > heavy Mlterm user. (Only when I need CJK or RTL language support.) > > See https://bugs.launchpad.net/ubuntu/+source/screen/+bug/82708 for a > similar problem. (Not mlterm-related, but might give you more inspiration > for googling some workarounds/info.) > > Best, > Ben > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Mlterm-dev-en mailing list > Mlt...@li... > https://lists.sourceforge.net/lists/listinfo/mlterm-dev-en > |