bugGNU Screen - Bugs: bug #27713, Please add a string escape for...


bug #27713: Please add a string escape for "escape key was pressed".

Submitted by:  Friedrich Delgado Friedrichs <taupan>
Submitted on:  Thu 15 Oct 2009 08:52:16 PM UTC  
Category:  Feature Request Severity:  3 - Normal
Priority:  5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  None
Fixed Release:  4.1.0 Planned Release:  None
Work Required:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 14 Mar 2012 06:05:37 PM UTC, comment #4:

Hi! Thanks a lot for the patch. It is now in the tree: http://git.savannah.gnu.org/gitweb/?p=screen.git;a=commit;h=db59704c1297c056cec0cc9305ae92e44a15bf33

Sadrul Habib Chowdhury <sadrul>
Project Administrator
Wed 24 Feb 2010 10:01:09 PM UTC, comment #3:

I finally got around to test this.

Using this on all my hosts makes me happy:

hardstatus alwayslastline "%{= wd}%?%-Lw%?%?%E%{= RK}%:%{=br WB}%?%n*%f %t%{=r dw}%?(%u)%?%{= wd}%?%+Lw%?%{=r dw}"

Thanks you! :)

Friedrich Delgado Friedrichs <taupan>
Wed 27 Jan 2010 08:45:24 AM UTC, comment #2:

I am using StringEscapeForEscapeKey.diff for a few days and it is really useful. Especially in nested screen sessions. It probably should get upstream.

Artur Skonecki <askonecki>
Fri 22 Jan 2010 03:50:38 AM UTC, comment #1:

I independently thought of this same idea today. Indeed, I even picked the same %E string escape sequence!

I have attached a patch that will do precisely this. I tested it successfully using nested sessions when I typed the escape character. I'm not sure what other ways the escape sequence can be generated, but I believe this patch will work there too. (I searched for all occurrences of D_ESCseen.)

I followed the same format as the patch for %P added in December.

This is my first attempt at a patch using git, so I'm not quite sure how to describe what I patched against. I believe I created it against the master branch as of this evening when I pulled it down.

(file #19528)

Ben Love <blove>
Thu 15 Oct 2009 08:52:16 PM UTC, original submission:

I frequently use nested screens and I don't want to remap escape in the inside screens for several reasons. So it would be convenient if I could 'mark' the escape status of my screens.

I could think of a string escape like this:

%E sets %? to true if the escape sequence was just pressed and screen is waiting for the next key

If all nested screens use the same hardstatus, the workflow could be like this:

^A first screen is marked as waiting for next key, e.g. the hardstatus line is inverted
a first screen is unmarked, nested screen gets marked
d nested screen unmarked and detached

I have no idea if this is at all possible with the current codebase, so feel free to ignore this request until it is ;)

Kind regards

Friedrich Delgado Friedrichs <taupan>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #19528:  StringEscapeForEscapeKey.diff added by blove (3KiB - text/x-diff - Add %E escape string that sets %? to true if the escape sequence has been seen.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sadrul (Posted a comment)
  • -email is unavailable- added by askonecki (Posted a comment)
  • -email is unavailable- added by blove (Updated the item)
  • -email is unavailable- added by taupan (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-14 sadrul StatusNone => Fixed
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.1.0
    2010-01-22 blove Attached File- => Added StringEscapeForEscapeKey.diff, #19528

    Back to the top

    Powered by Savane 3.3