Re: piping escape into dosemu

TW <[email protected]>
Newsgroups org.kernel.vger.linux-msdos
Message-ID <[email protected]>
2010/3/9 Mike McCarty <[email protected]>:
> 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 ^[.
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

(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...

>
>> pretty basic.  All I figured out is that the uhook_keystroke()
>> function in dosemu/src/base/misc/userhook.c must be the function that
>> handles the keystroke command.
>
> Well, let's hope that gets you going!
>

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.

Thanks for your help!

Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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.