On 01-15, Vincent Lefevre wrote:
> On 2016-01-14 14:10:04 -0800, Jeffery Small wrote:
> > >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.
> 
> Perhaps your keyboard has some problem, e.g. some physical keys are
> not working properly. Or your system may have some bug. You can try
> with Emacs running in the same terminal (do not use Emacs's own GUI)
> by doing C-h k (which is a bit similar to Mutt's what-key function).
> 
> > 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.
> 
> However, not all keys have a terminfo name. This means that you may be
> forced to use ";" in a key sequence for a binding.

Vincent:

Like you, at first I thought that their might be a flaky key, but I did
enough testing in and out of mutt to rule out the likelyhood of that.  I
have the escape sequences with ';' defined in other programs (vim for
example) and they work without problem.

I just did a test by trying to define a mutt macro that did not have a
semi-colon but which was defined in the xterm terminfo definition.

My insert key issues <esc>[2~  and this is defined as kich1 in terminfo.

If I define the macro using this sequence it fails.  However, if I define
it using the mnemonic <insert>, then it works fine.  This tells me that
mutt is using the keysym to identify the key and only falls back on the
escape code sequence if there is no keysym -- which, of course, is what
what-key was reporting.

I believe it was Ian who stated that he had a successful binding using a
semi-colon for a key that didn't have a keysym, so the semi-colon was a
red herring.  It just turns out that all of the keys on my keyboard that
issue codes with semi-colons are also defined in the terminfo definition as
function keys.  If I had one that was not defined, I probably would have
stumbled onto the solution sooner.

To avoid confusion in the future, I would like to suggest that the :exec
what-key information be documented in the user manual under section "3.6
Keyboard macros" so that users have a simple and direct way to do their
key-mappings.  I only found the what-key information in the Wiki FAQ Action
document by doing a google search once it had been brought to my attention
here.

Again, I really appreciate the help of everyone here.  I'm glad there is
still an active development community for this program.

Here's a new question:  On the Ubuntu machine I am seeing a new:

    Mix: <no chain defined>

header.  Where in the documentation can I read about this?  Thanks.

Regards,
--
Jeff

Reply via email to