INKEY observations

#1
I suppose starting INKEY's unquoted prompt with a / is a no-no (trying to make an option out of it).

Code:
inkey /m /x /prompt/ %%key
TCC: (Sys) The parameter is incorrect.
 "prompt/"
Usage : INKEY [/C /D /K"keys" /M /P /Wn /X] [prompt ] %%varname
But this one, first observed by Stefano Piccardi, causes no error message, high CPU use, and is uninterruptible:

Code:
inkey /m /x /%char[27]/ %%key
Either of these (below) sort of work except that the prompt isn't seen until **after** the mouse click!


Code:
inkey /m /x ^e %%key

inkey /m /x  ← %%key  (Esc entered with Alt0255-Esc)
 

rconn

Administrator
Staff member
May 14, 2008
10,506
94
#2
vefatica wrote:

> I suppose starting INKEY's unquoted prompt with a / is a no-no (trying to make an option out of it).
Yes.


> Either of these (below) sort of work except that the prompt isn't seen until **after** the mouse click!
>
> Code:
> ---------
> inkey /m /x ^e %%key
>
> inkey /m /x ↠%%key (Esc entered with Alt0255-Esc)
> ---------
WAD -- you probably have ANSI output enabled, so TCC can't tell that you
want to print a (useless?) escape character instead of starting an ANSI
sequence.

Turn off ANSI if you want to print escapes.

Rex Conn
JP Software
 
#3
On Sun, 26 Apr 2009 21:37:28 -0500, rconn <> wrote:

|WAD -- you probably have ANSI output enabled, so TCC can't tell that you
|want to print a (useless?) escape character instead of starting an ANSI
|sequence.
|
|Turn off ANSI if you want to print escapes.

Yes I do have ANSI output enabled. Can INKEY's prompt use ANSI escape sequences
(if done correctly)?
--
- Vince
 

rconn

Administrator
Staff member
May 14, 2008
10,506
94
#4
vefatica wrote:

> On Sun, 26 Apr 2009 21:37:28 -0500, rconn <> wrote:
>
> |WAD -- you probably have ANSI output enabled, so TCC can't tell that you
> |want to print a (useless?) escape character instead of starting an ANSI
> |sequence.
> |
> |Turn off ANSI if you want to print escapes.
>
> Yes I do have ANSI output enabled. Can INKEY's prompt use ANSI escape sequences
> (if done correctly)?
Yes -- all output from all commands (except for direct screen writes
like SCRPUT) can use ANSI sequences.

Rex Conn
JP Software