From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McCarty Subject: Re: piping escape into dosemu Date: Thu, 11 Mar 2010 00:26:27 -0600 Message-ID: <4B988D13.70008@sbcglobal.net> References: <4B918324.6000308@sbcglobal.net> <4B94B24E.4070804@sbcglobal.net> <4B958348.4050802@sbcglobal.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-msdos-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: FreeDOS TW wrote: > 2010/3/9 Mike McCarty : >> TW wrote: >>> [...] I start dosemu like >>> >>> dosemu -input 'thedosapp.exe\r\^[' >>> >>> because in the readme[1] I'm told that "\^[" is the syntax for the >>> escape key. At least that's how I interpret the "\^x" section. >> [...] I suspect >> that you are typing three characters '\', '^', and '['. That >> is not the intended action. What is intended is that you type >> a BACKSLASH ('\'), and an ESC. The shell displays on your >> screen two characters when you type ESC, but that is a single keystroke. >> > > O.K., I'm beginning to understand what you're talking about. Up to > now I didn't really use anything but bash. At least for me, pressing > the escape key (however often) does not display anything, but when > trying sh and dash, I see that pressing ESC "visually" resuts in ^[. $ set | grep SHELL SHELL=/bin/bash SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor $ /bin/bash --version GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu) Copyright (C) 2002 Free Software Foundation, Inc. Perhaps something in SHELLOPTS is different, and modifies that behavior. > And yes, now something like > > dosemu -input 'thedosapp.exe\r\^[' > > indeed works, many thanks for pointing me to this! Unfortunately, for > some reason this only works with the -input switch, but not when > piping, like > > echo "keystroke \^[" > dospipe Please note that "some string" and 'some string' are NOT the same. However, in this case, I don't see what difference it would make. > (where ^[ is what results from pressing ESC). It doesn't work through > dosctrl or Ruby either. I wonder why this is supported by the -input > switch, but not by the keystroke command... > > I may try to find out more, but I believe fixing it (i.e. making the > string representing a piped keystroke sequence is parsed in the same > manner that a keystroke string passed on the command line is) will be > beyond my possibilities. I'm not ready to throw in the towel. If we keep plugging at it, I think we can get there. > Thanks for your help! What do you get when you do this: $ echo -n "^[" | wc 0 0 1 Do you get the " 0 0 1" output I do? If so, then we can get there. Or try $ echo -n '^[' | wc 0 0 1 Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} Oppose globalization and One World Governments like the UN. This message made from 100% recycled bits. You have found the bank of Larn. I speak only for myself, and I am unanimous in that!