On 11Jun2012 20:37, John Magolske <[email protected]> wrote:
| * Cameron Simpson <[email protected]> [120611 07:20]:
| > On 10Jun2012 17:41, John Magolske <[email protected]> wrote:
| > | [...] 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.
|
| > It does occur to me that you could do something cunning with your
| > terminfo definitions. [...]
|
| Interesting idea...if it did work, would it not mess up autorepeated
| <right>s across the board?
Yep.
But you could invoke mutt via a wrapper script that went:
TERM=$TERM-mutt mutt ${1+"$@"}
and have the "-mutt" terminfo entry be the modified one.
Of course, you'd need to set $editor in mutt to invoke a wrapper to undo the
$TERM hacking and then run up your preferred editor so you can autorepeat in
it.
| I'm still wondering if there might be a way to construct a macro that
| would call <next-entry> then maybe an external script that "stalls"
| until another keypress is issued.
I would think an external script would be too slow, and nothing internal
to mutt will do (unless this is essentially the same as my awful macro
idea of before).
| The showkey command shows this when
| pressing & releasing the <right> key:
|
| keycode 106 press
| keycode 106 release
Is that really nicely delayed? i.e. if you hold down <right> (not too
long!) is the "release" really deferred until to "up".
Also, if you hold it down long enough to autorepeat, do you only get the
opening press and final release, or lots and lots of press/release
pairs?
I'd also point out that showkey will only work on a linux console.
It may not in an xterm, and definitely won't over a remote connection.
| I'm wondering if there's a way to differentiate the "press" and
| "release" events here in a script that gets called by a macro...
By having <right> bind to a macro that odes whatever <right> was going
to do, then calls an external script to wait for the release? I think it
would be slow and clunky, and if it didn't start quickly enough it could
eaily miss th "release" entirely. And if it didn't quit faster enough
mutt might miss a following keystroke. Potential problems, anyway.
Cheers,
--
Cameron Simpson <[email protected]>