[8.0ß16-x64] Ctrl+Enter in cmdline selects all

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

[8.0ß16-x64] Ctrl+Enter in cmdline selects all

Post by *Flint »

Unfortunately, I cannot find out how to reproduce this problem 100% reliably, but in most cases it works for me this way:

1. Start TC with fresh INI.
2. In the command line type some word, then space.
3. While the keyboard focus is still in command line, press Ctrl+Enter or Ctrl+Shift+Enter.
4. The name of the file/dir under cursor is appended into the command line, and the whole command line becomes selected.

Video:
Video/EXE (player/codec included)
Video/AVI (needs MSU Screen Capture Lossless Codec)
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Confirmed!
TC8.0ß16 x64, Windows7

Regards
Holger
Make our planet great again
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's probably the same cause as when invoking cm_renameonly with ENTER - it's seen by the edit box, which then selects the text. Btw, it doesn't happen when the focus is in one of the listboxes...
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Seems to be fixed in 8.0β17.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
tarkett2012
Junior Member
Junior Member
Posts: 12
Joined: 2011-12-11, 22:14 UTC

Post by *tarkett2012 »

Please check this handling again. Today I found this bug also in 8.0ß20.

It seems to be a different handling between left Ctrl and right Ctrl. With left Ctrl it seems to be okay. With the right Ctrl I get the problem that the complete line is marked.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Cannot confirm, left and right Ctrl behave the same way here. Tested on Windows 7 with English, German, Russian and Simplified Chinese keyboard layouts.
Author of Total Commander
https://www.ghisler.com
tarkett2012
Junior Member
Junior Member
Posts: 12
Joined: 2011-12-11, 22:14 UTC

Post by *tarkett2012 »

I found out the reason. It has something to do with my handling and nothing with left or right Ctrl key.

Example scenario:
1. Input "settime"
2. Press and hold Ctrl and Enter in this order --> the actual file/dir will be inserted
3. Left Ctrl and Enter in exactly this order --> The complete line will be marked

If I change the order and left first Enter and than Ctrl it is not marked.
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

I confirm this observation (tested in β21).
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't understand your point 3. If you press and release Ctrl, this has no effect on the ENTER afterwards - TC will execute the command line then. Please explain.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
Do the following quickly enough to avoid repeated keypress events (generated because of holding the Enter key for too long):
1. Press and hold Ctrl.
2. Press and hold Enter (file name inserted into command line).
3. Release Ctrl.
4. Release Enter (command line contents becomes selected).

If you reverse steps 3 and 4 (that is, first release Enter, then release Ctrl), selection is not applied.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Ah, I see - it's very diffcicult to reproduce here because I have set a very short key repeat delay. But I don't think that this is such a big problem.
Author of Total Commander
https://www.ghisler.com
tarkett2012
Junior Member
Junior Member
Posts: 12
Joined: 2011-12-11, 22:14 UTC

Post by *tarkett2012 »

Many thanks for the fix in ß22. Now it is fine.
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Indeed, confirm the fix.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks! I had to check whether Ctrl was pressed already in the keydown function, checking it in the keyup function wasn't sufficient because the user had already released the key.
Author of Total Commander
https://www.ghisler.com
Post Reply