Escape key no longer clears command line in v24

Oct 24, 2011
73
1
I've been using the escape key for many years to clear the command line. I just updated from v21 and escape no long works, I've also used escape in the past to exit from LIST. That no long works either. I can get used to Q to leave LIST, but how do I clear the command line?
 
May 20, 2008
11,437
99
Syracuse, NY, USA
The first thing I'd try is (in TCC) OPTION ... Tab = Keyboard ... Category = Editing ... KeyCommands = EraseLine ... see what the assignments are and add Esc if necessary.
 
Oct 24, 2011
73
1
Thanks, but I had already tried that. I don't believe those commands are for the console command line because the assigned key is Crtl+y and that doesn't work either.
 
Oct 24, 2011
73
1
Actually, I found by further checking the the Escape key to clear the command line is a feature of Windows' Console. Apparently TCC 24 is blocking the Escape somehow because I have a TCC 21 console open and Escape clears the command line in that console.
 
May 20, 2008
11,437
99
Syracuse, NY, USA
Thanks, but I had already tried that. I don't believe those commands are for the console command line because the assigned key is Crtl+y and that doesn't work either.
As far as I know they are precisely for the console. And Ctrl-Y should be Clipboard\Copy. If you have Ctrl-Y for Editing\EraseLine repalce it with Esc.
 
Oct 24, 2011
73
1
As far as I know they are precisely for the console. And Ctrl-Y should be Clipboard\Copy. If you have Ctrl-Y for Editing\EraseLine repalce it with Esc.

That doesn't help. As I said, Escape to clear the command line is a Windows console shortcut, not a TCC shortcut. TCC 24 must be blocking the escape from reaching windows. Escape also clears the command line in a CMD.EXE window.

The Editing shortcuts in Option are apparently for the IDE and Editor.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
It all works as expected for me, except that I can not assign the ESC key using the dialog. Pressing ESC while "New Shortcut Key" has the focus gives me a backarrow, not the "Esc" string it ought to:

EscAsBackarrow.png

So here's my low-tech solution:
Code:
echo %@iniwrite["%_ininame",Keys,EraseLine,]
echo %@iniwrite["%_ininame",Keys,EraseLine,Esc]
... then exit and restart Take Command.

(The first line deletes any existing EraseLine directive; the second recreates it with the correct value. Deleting the directive first should not usually be necessary, but if the existing line contains control characters it can confuse WritePrivateProfileString(). And my putzing around with the OPTION dialog managed to put -- you guessed it -- an ESC character into the .INI file. Urk!)
 
Oct 24, 2011
73
1
It all works as expected for me, except that I can not assign the ESC key using the dialog. Pressing ESC while "New Shortcut Key" has the focus gives me a backarrow, not the "Esc" string it ought to:

View attachment 2232

So here's my low-tech solution:
Code:
echo %@iniwrite["%_ininame",Keys,EraseLine,]
echo %@iniwrite["%_ininame",Keys,EraseLine,Esc]
... then exit and restart Take Command.

(The first line deletes any existing EraseLine directive; the second recreates it with the correct value. Deleting the directive first should not usually be necessary, but if the existing line contains control characters it can confuse WritePrivateProfileString(). And my putzing around with the OPTION dialog managed to put -- you guessed it -- an ESC character into the .INI file. Urk!)

I'm not sure I'm being understood. I'm talking about the command line in a console window. EraseLine in the options shouldn't effect that because it's a built-in Windows shortcut. ESC clears the command line in a Windows console and it works in a TCC21 console window and in a CMD console window, but it does not work in a TCC24 console window.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
I'm not sure I'm being understood. I'm talking about the command line in a console window. EraseLine in the options shouldn't effect that because it's a built-in Windows shortcut. ESC clears the command line in a Windows console and it works in a TCC21 console window and in a CMD console window, but it does not work in a TCC24 console window.

If you detach TCC from Take Command, does the ESC key start working? (Right-click on the tab and choose "Detach Tab".)
Conversely, if you run CMD.EXE in a Take Command tab, does the ESC key stop working?
 
Oct 24, 2011
73
1
I have the same problem running a standalone TCC. If I run CMD in a Take Command tab, -ESC works as expected.

But I still have TCC21 installed and there is no problem in 21, only in 24.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
I have the same problem running a standalone TCC. If I run CMD in a Take Command tab, -ESC works as expected.

If Take Command were swallowing ESC keystrokes, I would expect it to affect CMD.EXE too; and standalone TCC windows would not have the issue.

If you run TCC.EXE with the /I startup option, do you still have the problem?
 
Oct 24, 2011
73
1
Esc works as expected with two Is.
I notice there''s a bunch of new stuff in the .ini file in the keys section that wasn't there before installing 24.0.
 
Oct 24, 2011
73
1
But I have a TCC21 console open. It's using the same .ini file and ESC works as expected. It seems maybe some addition to the .ini file that 21 doesn't respond to but 24 does.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
Esc works as expected with two Is.
I notice there''s a bunch of new stuff in the .ini file in the keys section that wasn't there before installing 24.0.

Okay; the problem is definitely in your .INI file, almost certainly in that [Keys] section. I suggest that you close all instances of Take Command and TCC, then open your .INI file in a text editor and delete that entire section. The whole thing, the [Keys] header line and all the directives under it.

I understand that you're using the same file for Take Command 21. That's okay. Version 21 does not use that [Keys] section at all, so deleting it will not affect v21.
 
Oct 24, 2011
73
1
I found the problem, and you led me there. Thanks.

ERASELINE was in the .ini file twice. Once in the [4NT] section and once in the [KEYS] section.
EraseLine=Ctrl-Y

I changed both instances to
EraseLine=Ctrl-Y Esc

That fixed it and the options under keyboard now lists the ESC key. That's apparently a bug in the Options that you can't enter the escape key.
 
Oct 24, 2011
73
1
Yes, it is. Even though Ctrl-Y is there, it does not clear the command line. I'll remove it.
Thanks very much.
 
May 20, 2008
11,437
99
Syracuse, NY, USA
I'm not sure I'm being understood. I'm talking about the command line in a console window. EraseLine in the options shouldn't effect that because it's a built-in Windows shortcut. ESC clears the command line in a Windows console and it works in a TCC21 console window and in a CMD console window, but it does not work in a TCC24 console window.
TCC opts out of Windows normal console input-output so it can provide better command line editing. It has always done that. TCC processes Esc. You should have
EraseLine=Esc
in the [Keys] section of your TCMD.INI.
 
Oct 24, 2011
73
1
I readily admit that I know very little about the internal workings of Take Command. It's a tool I use to get my real work done. I'm often reluctant to upgrade because invariably something has changed that gives me trouble and I don't really want to deal with it. :smile:
In any case, thanks for the help. I'll test 24 for a few more days before removing 21. Now back to work.
 
Similar threads
Thread starter Title Forum Replies Date
H Escape key no longer closes Help Support 3
vefatica ECHOERR and color escape sequences Support 4
D Regexes and escape characters Support 5
D Can ANSI escape sequences be used in keystroke aliases? Support 8
jbanaszczyk How to escape? Support 2
tmaynard How to? Control-U alias for Escape (command line editing) Support 5
A Escape characters on right side of pipe Support 0
M Escape-character issue... Support 7
vefatica Escape sequences and DO? Support 13
N Unable to bind multiple keys to the same key mapping directive Support 9
bwawsc2 v28 license key Support 1
C v28 key files Support 2
D How to? Windows Key-Left and Windows Key-Right Support 9
Jay Sage How To Use a "USB (Portable) Key" Support 7
Joe Caverly The requested lookup key was not found in any active activation context Support 3
Joe Caverly Changing the TAB key Support 10
B Request Manual Key fails Support 3
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
rainburger Query machine names registered with activation key Support 4
Chen Touboul Overtyping issue - i press the Insert key, help till press enter for new line in TCC Support 2
A TCC24 not recognizing key definitions Support 4
A Key Commands missing? Support 3
vefatica New Shortcut Key box Support 1
vefatica REGDIR not showing time for top level key Support 3
F Update 21.00.34 -> 37, key no longer recognised Support 2
M Activation Key does not correspond… Support 2
C Computer ID for Manual Key Support 6
B when doing SFTP via IFTP to my secure site my users always get the finger print key prompt Support 1
P Access denied TakeCommand.19.0.key Support 2
R Shortcut key assignments - default Support 0
nickles Move takecommand.18.0.key location to installation directory Support 4
P Offline key Support 0
C Which reg key? Support 2
S Documentation Key mapping directives and defaults Support 4
N Key Activation Error Support 2
T V14 Key? Support 1
ehab aboudaya How to? change ALT-F6 to another key Support 1
D copy /uf and usb key Support 5
Stefano Piccardi Why did Windows create an encryption key? Support 5
Joe Caverly How to? Function Key With INPUT Support 5
T Fixed Key mapping does not work anymore Support 1
R Key Strokes in TCMD 8 und TC 13 Support 4
vefatica Append command line to @@key alias? Support 13
R key aliases no longer working Support 2
S Registration key not recognized after upgrading to 12.10.63 Support 0
vefatica @@key aliases cause new prompt? Support 16
N Problem with tab (next file) key in TCC64 Support 2
D LIST 'e' key to edit file Support 23
R Block a key stroke Support 1
J 4nt 5.0 Registration key won't work Support 6

Similar threads