Note: I just joined this list and my news reader was mis-configured, so my response went to the mutt-users list instead of this one. I'm reposting here and combining responses to two previous posts.
First message: --------------------------------------------------------------------------- Vincent Lefevre <[email protected]> writes: >> I wrote: >> However, none of the bindings or macros that have a ";" in them are working >> when mutt runs. >I have no such problem. For instance, I have: >bind index,pager "\e[1;3A" previous-unread >so that I can type Meta-Up to trigger this function. >> Outside of mutt, on the command line I can type ^V and the key and see that >> it is definitely issuing the proper string. >No, this does not guarantee to give the same string because Mutt >runs in app mode, and escape sequences can be different in this mode. >You can check with "tack". In "tack", type n f n then try your keys. >For instance, on the commande line (or in cooked mode), the left arrow >yields ^[[D, but in app mode (e.g. in tack), it yields ^[OD. I installed tack(1). Thanks, that's a good program to have. When pressing the keypad keys I get (for example): ^[[20;2~ (kf21) /* NOTE: See second message below ^[[1;5P (kf25) as well as the expected result for all other keys. All of these keys with ';' in them work without problem in every other program I use, such as vim(1) and my nn(1) news reader. >> All key assignments without a ';' in them work fine and all that >> include a ';' fail. >You can try to type the individual keys like Esc [ 2 0 ; 2 ~ to >see if these key assignments actually work. If they work, then this >is because the special key does not give the sequence you expect. I tried this for quite some time with different key combinations. It almost always fails with mutt reporting: "Key is not bound. Press '?' for help." However, every once in a while, these manually entered sequences DO work! They might work two or three times in a row and then stop working again. I have tested over and over and I cannot find any sequence of actions that will reproduce the condition where they start or stop working. I have never yet seen a case where the actual keypad key worked. Remember that mutt is reporting that these sequences are properly defined in its internal tables. Does any of this shed additional light on what might be wrong. I'm perplexed by the fact that the manual entry very occasionally works. This seems very odd. ****** However, see the following: >-- >Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> >100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> >Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) --------------------------------------------------------------------------- Second message: --------------------------------------------------------------------------- Ian Collier <[email protected]> writes: >The GNU/Linux curses implementation may well be recognising this as a >function key. >To be sure, open Mutt and type :exec what-key (press return and it >should reply "Enter keys (^G to abort):") then press your function >key. If it says "Char = <F21>" then that's your answer. If it says >"Char = ~" then it recognised the key as a sequence of individual bytes >(of which that's the last) and we're no nearer to an answer. If it says >something else then the key is probably not producing the byte sequence >you think it is. >imc I did the :exec (nice trick to know!) and got: Keypad 5: Char = <F21> Keypad 6: Char = <F22> Keypad 7: Char = <F23> Keypad 8: Char = <F24> Keypad 9: Char = <F25> In .muttrc I replaced the bindings with <f21> through <f25> and YES, the keys were recognized by mutt! A guess I never ran into this overlap of F-keys with the auxiliary on the Solaris system. So that's the answer. Thank you Vincent and Ian for your invaluable help. I used to be heavily involved with early curses, but haven't looked at it for years now. Does this mean that curses is literally returning a "kf21" (or "f21") string to mutt rather than the actual escape sequences? If so, I assume that it returns the terminfo mnemonic for all such definitions. This makes me wonder why I could occasionally trick mutt into accepting the escape sequences when I typed them manually. Hmmmm. One more question: How do you exit from the :exec mode and is there documentation available on its usage? Regards, -- Jeff C. Jeffery Small CJSA LLC 206-232-3338 [email protected] 7000 E Mercer Way, Mercer Island, WA 98040
