From: Mike McCarty <Mike.McCarty@sbcglobal.net>
To: FreeDOS <linux-msdos@vger.kernel.org>
Subject: Re: piping escape into dosemu
Date: Mon, 08 Mar 2010 02:16:14 -0600 [thread overview]
Message-ID: <4B94B24E.4070804@sbcglobal.net> (raw)
In-Reply-To: <ca6f72e21003051850x4d940b12y9691d561f2c74098@mail.gmail.com>
TW wrote:
Oh, I forgot how to pipe a single space character
echo -n " " > dospipe
> Hi Mike,
>
>> From: Mike McCarty <Mike.McCarty@sbcglobal.net>
>>
>> $ man echo
>>
>> [...]
>>
>> -e enable interpretation of the backslash-escaped
>> characters
>> listed below
>>
>
> sorry if I totally misinterpret your post, but I think I do *not* want
> to enable the escaped characters because the keystroke command
> obviously expects to read the escape sequence, not the ascii value
I can't make sense out of this. You seem to be referring to a numeral
or something, but I can't tell. What do you mean by "the ascii value
that results from it"?
Please consider these results:
$ echo -n "033" | wc
0 1 3
$ echo -n "\033" | wc
0 1 4
$ echo -ne "\033" | wc
0 0 1
The first example passes three characters as output. They
are '0', '3', and '3'.
The second example passes four characters as output. They
are BACKSLASH, '0', '3', and '0'.
The third example passes one character as output, which
is the ESC character.
Isn't that what you want?
> that results from it. Otherwise you would for example not be able to
> send a carriage return, i.e.
I don't understand your objection. Do you or do you not
want the ESC character to appear in the input?
>
> echo "keystroke \r" > dospipe
>
> results in a carriage return in dosemu while
>
> echo -e "keystroke \r" > dospipe
>
> does not.
The -e enables conversion of the escape sequences of three
digit octal numbers into single characters in the output stream.
> I'm just using echo here because it's easily reproducible by everyone.
> I'm successfully using Ruby to remote control dosemu, but I can't
> pipe the escape key for the named reasons, neither through echo nor
> Ruby or whatever I may chose. Maybe there is a syntax that allows me
> to pipe ASCII codes (e.g. 27 or hex 1B or octal 033 for the escape
> key) into Dosemu, but I can't find it anywhere. The readme says
> something about \^[:
You are using words in a way which is not consistent with a single
interpretation of each word.
> \^x <Ctrl>x, where X is one of the usual C,M,L,[ ...
> (e.g.: \^[ == <Ctrl>[ == ESC )
>
> but I don't have luck with this. I tried several escape sequences
> that could possibly be used, like \0x1B, \x1B, \033, \0033, still
> nothing. What am I missing??
I don't know. It's difficult to interpret your language.
Let's try this. How about you describe, in careful detail, what
you want to happen, then describe in detail what you did, and
then describe in detail what you observed.
I have so far interpreted your request along these lines
I want an application running in a DOSEMU environment
to behave as if it received a hand typed ESC character.
I have tried using a pipe. I have used the echo command
in this manner
echo -ne "\033" > dospipe
and what the program running received was [fill in the blank].
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!
next prev parent reply other threads:[~2010-03-08 8:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 22:18 piping escape into dosemu Mike McCarty
2010-03-06 2:50 ` TW
2010-03-06 2:56 ` TW
2010-03-08 8:16 ` Mike McCarty [this message]
2010-03-08 8:29 ` Mike McCarty
2010-03-08 21:40 ` TW
2010-03-08 23:07 ` Mike McCarty
2010-03-10 20:11 ` TW
2010-03-11 6:26 ` Mike McCarty
2010-03-11 8:11 ` TW
2010-03-11 6:55 ` Mike McCarty
2010-03-11 9:11 ` TW
2010-03-11 9:19 ` Andrew Bird (Sphere Systems)
2010-03-11 12:50 ` TW
[not found] ` <4B98F8EC.9030206@pobox.com>
[not found] ` <ca6f72e21003111250x31e6ca3dt6732fefb59ef2a90@mail.gmail.com>
[not found] ` <4B995B03.40906@pobox.com>
2010-03-11 22:24 ` TW
-- strict thread matches above, loose matches on Subject: below --
2010-02-25 20:21 TW
2010-03-05 7:21 ` TW
2010-03-05 17:59 ` solarflow99
2010-02-24 21:09 x.zupftom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B94B24E.4070804@sbcglobal.net \
--to=mike.mccarty@sbcglobal.net \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox