On 10Jun2012 17:41, John Magolske <listm...@b79.net> wrote:
| I have this set in my muttrc:
| 
|     bind pager <Down> next-line
|     bind pager <Up> previous-line
|     bind pager <left> previous-entry
|     bind pager <right> next-entry
| 
| Which works well for me, with the exception of when I accidentally
| press & hold down the <right> key instead of the <Down> key and go
| flying through a bunch of messages at a rate somewhat related to the
| keyboard repeat rate (which I have set very high). What I would find
| ideal is if there were some way to set <right> to go to the next entry
| and wait, so that for example cycling through five entries would
| require five distinct key presses. Any ideas about how to accomplish
| this? I was trying out some macros, but couldn't get anything to work.

Unless you can disable autorepeat just for <right> (and/or selected
others) I can only think of a horrible hack: bind <right> to a macro
that unmaps <right>. You'll need a different key to rebind it, which
means that while autorepeat won't do too much, you won't get to
explicitly tap <right> repeatedly. Like I said, horrible.

It does occur to me that you could do something cunning with your
terminfo definitions. IIRC, curses watches the timing of incoming bytes
to distinguish certain things. Since curses delivers a bare ESC if you
just tap escape, and the other keys send ESC-blah-blah, curses
distinguishes them by the delay after a "real" ESC. In principle you
could make your terminfo entry describe some unused keystroke as having
the escape sequence send by two <right>s in succession. In this way
curses might present your autorepeated <right>s as the other key, and
only send a real <right> when you tap it once. Haven't tried it yes.

Following this, "man terminfo" tells us:

  key_right    kcuf1      kr     right-arrow key

and on a terminal here, this command:

  infocmp $TERM | grep kcuf1

says:

  kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,

So maybe you could add:

  kMSG=\EOC\EOC,

to your terminfo (supplanting "shifted message key").

Just a thought.

Cheers,
-- 
Cameron Simpson <c...@zip.com.au>

Reply via email to