Re: bindkey sequence

Sadrul Habib Chowdhury <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <[email protected]>
On Tue, Jan 18, 2011 at 1:17 PM, Todd Freed <[email protected]> wrote:
> Hi,
>
> I'm attempting to match a sequence of 6-7 keystrokes and can't quite get the
> bindkey to work.
>
> I find myself frequently copying the line-just-above the cursor into screens
> buffer, so I can paste it somewhere. So, the key sequence I use (and which I
> want to map) looks like this:
>
> Ctrl-A # command
> Escape # copy mode
> Up Arrow # previous line
> Shift + Pipe # move cursor to beginning of line
> Enter # Start copying
> Shift + 4 # move cursor to end of line
> Enter # done copying
>
> I can't get the key selector (say, for Alt+Shift+C) but even if I use an
> easy one, I can't even approach what the right hand side of this bindkey
> would look like .. something with the stuff command im guessing.

Try, for example:

  bind P eval "copy" "stuff -k ku" "stuff Y" "stuff \033"

So pressing C-a P will (1) go into copy mode, (2) press the up arrow
key (3) press Y to yank the entire line (4) press escape to leave the
copy mode.

Cheers.
Sadrul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.