Re: Alt+function keys and other keys
On Fri, Mar 12, 2010 at 02:14:37PM +0100, Miguel Pérez wrote: 2010/3/12 Thomas Dickey dic...@his.com On Fri, 12 Mar 2010, Miguel Pérez wrote: It does, but they are not recognized. Here's an example of different alt-f1 sequences I've seen: Konsole (TERM=konsole), native keyboard (xterm XFree 4.x.x): ^[O3P xterm (TERM=xterm): ^[[1;3P urxvt (TERM=rxvt-unicode): ^[^[[11~ mlterm (TERM=mlterm): ^[[11;3~ Midnight Commander doesn't recognize any of these. I wonder what kind of terminal does it expect (shouldn't it be flexibly detected from TERM?). terminfo should provide the details (using the convention from xterm, which encodes 12 function-keys with control-, shift-, alt-modifiers). The last I noticed, Konsole doesn't _set_ $TERM, but has a keyboard setting (analogous to the predefined flavors in xterm for Sun, HP, etc). Then something seems to be wrong, because I have TERM properly set in the various terminals, yet Midnight Commander doesn't seem to understand many of the posible escape sequences (mostly Alt/Control combinations with Fn/Ins/Del/Home/End and Shift+Tab). Midnight Commander could be modified to use ncurses' extended terminal descriptions. Here's some detail on that: http://invisible-island.net/ncurses/ncurses.faq.html#modified_keys -- Thomas E. Dickey dic...@invisible-island.net http://invisible-island.net ftp://invisible-island.net signature.asc Description: Digital signature ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Alt+function keys and other keys
On Fri, 12 Mar 2010, Miguel P??rez wrote: It does, but they are not recognized. Here's an example of different alt-f1 sequences I've seen: Konsole (TERM=konsole), native keyboard (xterm XFree 4.x.x): ^[O3P xterm (TERM=xterm): ^[[1;3P urxvt (TERM=rxvt-unicode): ^[^[[11~ mlterm (TERM=mlterm): ^[[11;3~ Midnight Commander doesn't recognize any of these. I wonder what kind of terminal does it expect (shouldn't it be flexibly detected from TERM?). terminfo should provide the details (using the convention from xterm, which encodes 12 function-keys with control-, shift-, alt-modifiers). The last I noticed, Konsole doesn't _set_ $TERM, but has a keyboard setting (analogous to the predefined flavors in xterm for Sun, HP, etc). ~Miguel 2010/3/11 Thomas Dickey dic...@his.com On Thu, 11 Mar 2010, Miguel P??rez wrote: What I wonder is why even on the reference terminal xterm, some key escape sequences aren't even recognized, including simple enough ones such as ctrl-f1 or alt-f1. It depends on the keyboard configuration. (The vt220 flavor won't do much with control/F1). The (default) Sun/PC does send different sequences... -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- Antes de imprimir este correo electr??nico, considera tu responsabilidad medioambiental. Please consider your environmental responsibility before printing this email. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Alt+function keys and other keys
2010/3/12 Thomas Dickey dic...@his.com On Fri, 12 Mar 2010, Miguel Pérez wrote: It does, but they are not recognized. Here's an example of different alt-f1 sequences I've seen: Konsole (TERM=konsole), native keyboard (xterm XFree 4.x.x): ^[O3P xterm (TERM=xterm): ^[[1;3P urxvt (TERM=rxvt-unicode): ^[^[[11~ mlterm (TERM=mlterm): ^[[11;3~ Midnight Commander doesn't recognize any of these. I wonder what kind of terminal does it expect (shouldn't it be flexibly detected from TERM?). terminfo should provide the details (using the convention from xterm, which encodes 12 function-keys with control-, shift-, alt-modifiers). The last I noticed, Konsole doesn't _set_ $TERM, but has a keyboard setting (analogous to the predefined flavors in xterm for Sun, HP, etc). Then something seems to be wrong, because I have TERM properly set in the various terminals, yet Midnight Commander doesn't seem to understand many of the posible escape sequences (mostly Alt/Control combinations with Fn/Ins/Del/Home/End and Shift+Tab). ~Miguel 2010/3/11 Thomas Dickey dic...@his.com On Thu, 11 Mar 2010, Miguel Pérez wrote: What I wonder is why even on the reference terminal xterm, some key escape sequences aren't even recognized, including simple enough ones such as ctrl-f1 or alt-f1. It depends on the keyboard configuration. (The vt220 flavor won't do much with control/F1). The (default) Sun/PC does send different sequences... -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- Antes de imprimir este correo electrónico, considera tu responsabilidad medioambiental. Please consider your environmental responsibility before printing this email. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- Antes de imprimir este correo electrónico, considera tu responsabilidad medioambiental. Please consider your environmental responsibility before printing this email. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Alt+function keys and other keys
What I wonder is why even on the reference terminal xterm, some key escape sequences aren't even recognized, including simple enough ones such as ctrl-f1 or alt-f1. A possible way to fix all of this could be to allow raw character sequences to be assigned to commands in mc.keymap, such as PanelSortOrderByName = \eO5P though this would make it more difficult to use. The best solution would be to properly support all escape sequences. Date: Wed, 10 Mar 2010 22:37:04 +0100 From: Yury V. Zaytsev y...@shurup.com To: R. Steven Rainwater srainwa...@ncc.com Cc: mc-devel@gnome.org Subject: Re: Alt+function keys and other keys Message-ID: 1268257024.7065.13.ca...@mypride Content-Type: text/plain On Wed, 2010-03-10 at 09:55 -0600, R. Steven Rainwater wrote: Maybe there needs to be a policy that key combination changes must be tested on mainline terminals before they are accepted in released versions of MC. The issue here is that xterm is considered to be the reference, and in fact in what concerns the PgUp / PgDown problem, it's a Gnome terminal bug that VTE maintainers are unwilling to fix. -- Sincerely yours, Yury V. Zaytsev -- Antes de imprimir este correo electrónico, considera tu responsabilidad medioambiental. Please consider your environmental responsibility before printing this email. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Alt+function keys and other keys
On Thu, 11 Mar 2010, Miguel P??rez wrote: What I wonder is why even on the reference terminal xterm, some key escape sequences aren't even recognized, including simple enough ones such as ctrl-f1 or alt-f1. It depends on the keyboard configuration. (The vt220 flavor won't do much with control/F1). The (default) Sun/PC does send different sequences... -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Alt+function keys and other keys
It does, but they are not recognized. Here's an example of different alt-f1 sequences I've seen: Konsole (TERM=konsole), native keyboard (xterm XFree 4.x.x): ^[O3P xterm (TERM=xterm): ^[[1;3P urxvt (TERM=rxvt-unicode): ^[^[[11~ mlterm (TERM=mlterm): ^[[11;3~ Midnight Commander doesn't recognize any of these. I wonder what kind of terminal does it expect (shouldn't it be flexibly detected from TERM?). ~Miguel 2010/3/11 Thomas Dickey dic...@his.com On Thu, 11 Mar 2010, Miguel Pérez wrote: What I wonder is why even on the reference terminal xterm, some key escape sequences aren't even recognized, including simple enough ones such as ctrl-f1 or alt-f1. It depends on the keyboard configuration. (The vt220 flavor won't do much with control/F1). The (default) Sun/PC does send different sequences... -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- Antes de imprimir este correo electrónico, considera tu responsabilidad medioambiental. Please consider your environmental responsibility before printing this email. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Alt+function keys and other keys
Hello, Following the bug I reported ( http://www.midnight-commander.org/ticket/2064 ), I've been trying different terminal emulators and combinations and wasn't able to get these keys (mostly function keys with Alt, Ctrl-Alt, Ctrl-Shift, Alt-Shift, Ctrl-Alt-Shift, also Home/End/PgUp/PgDown disturbances) to work on Midnight Commander. Upon pressing the key, mc will ignore it and print part of the escape sequence. I've been trying with the various terminal modes in Konsole (xterm XFree 4, xterm XFree 3, Linux, VT420PC, VT100, Solaris) with the correct TERM settings (as well as some which were slightly incorrect), as well as xterm with the default options, urxvt (TERM=rxvt-unicode) and some other terminal emulators I could find, with and without the configuration for learnt keys in ~/.mc/ini . I have been unable to get these keys to work in an X terminal. Do they work for any of you in any X terminal with any settings? If so, could you tell me which? I'm using mc from the Debian sid package: GNU Midnight Commander 4.7.0.1 Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish With builtin Editor Using system-installed S-Lang library with terminfo database With subshell support as default With support for background operations With mouse support on xterm and Linux console With internationalization support With multiple codepages support Data types: char 8 int 32 long 64 void * 64 off_t 64 ecs_char 8 Any tips? Thanks in advance. ~Miguel Pérez -- Antes de imprimir este correo electrónico, considera tu responsabilidad medioambiental. Please consider your environmental responsibility before printing this email. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Alt+function keys and other keys
On Wed, 2010-03-10 at 09:35 +0100, Miguel Pérez wrote: Following the bug I reported ( http://www.midnight-commander.org/ticket/2064 ), I've been trying different terminal emulators and combinations and wasn't able to get these keys (mostly function keys with Alt, Ctrl-Alt, Ctrl-Shift, Alt-Shift, Ctrl-Alt-Shift, also Home/End/PgUp/PgDown disturbances) to work on Midnight Commander. Thanks, I'm glad to see someone working on this. I use GNOME terminal on Fedora and I first noticed the problem with F12, when the Ctrl-pgup and Ctrl-pgdn stopped working (it turned out developers had switched that functionality to some other key bindings that don't work on GNOME terminal). The bug reports related to that incident are here: https://bugzilla.redhat.com/show_bug.cgi?id=551062 http://www.midnight-commander.org/ticket/1938 It seems like a good idea to see which terminals are the most commonly used and focus testing on those. My guess is the GNOME terminal and KDE Konsole terminals are at the top of the list since nearly every modern distro runs one of those two desktops. Maybe there needs to be a policy that key combination changes must be tested on mainline terminals before they are accepted in released versions of MC. -Steve ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Alt+function keys and other keys
On Wed, 2010-03-10 at 22:37 +0100, Yury V. Zaytsev wrote: On Wed, 2010-03-10 at 09:55 -0600, R. Steven Rainwater wrote: Maybe there needs to be a policy that key combination changes must be tested on mainline terminals before they are accepted in released versions of MC. The issue here is that xterm is considered to be the reference, and in fact in what concerns the PgUp / PgDown problem, it's a Gnome terminal bug that VTE maintainers are unwilling to fix. I agree the bug is in Gnome terminal but if we know it isn't going to be fixed, then intentionally using that key combination seems like an intentional choice to drop support for a high profile terminal. To me, it makes more sense to map the key combinations that work in the majority of widely used terminals and then select among those the ones to be used in MC. In other words, why not try to make MC work with the maximum number of terminals instead of intentionally breaking compatibility with some of them? The key combos can be remapped by the end user, so it should be possible to offer an MC that works out of the box for nearly everybody. Then, if a particular user really wants to use a key mapping that works only in his terminal and no others, he can manually change it without breaking things for everyone else. -Steve ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel