Dark Mode on and off: different msgbox box sizes, copied style and translation

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: sheep, Hacker, Stefan2, white

User avatar
DrShark
Power Member
Power Member
Posts: 1468
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark » 2019-11-28, 17:07 UTC

ghisler(Author) wrote:
2019-11-28, 11:26 UTC
Maybe some other program is locking the clipboard
I tried with terminated PuntoSwitcher which monitored clipboard, but issue still happens. Also instead of pasting the text to some editor I tried to check clipboard content with Windows NT ClipBook Viewer (clipbrd.exe): there I see that sometimes when I press Ctrl+C on active msgbox window first time, clipboard content is not updated. Since there is no beep at this moment too, it looks like msgbox window sometimes fails to catch first Ctrl+C keypress. Right now I don't know what can I do to get more information on the issue. Is there any way to make sure Ctrl+C reaches TC's msgbox window?
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38738
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) » 2019-11-29, 15:44 UTC

The check for ctrl+c is very simple: on OnKeyup of the form, I call:

Code: Select all

if (key=ord('C')) and (Shift=[ssCtrl]) then begin
Maybe some other modifier keys like Shift or Alt were still pressed?
Author of Total Commander
http://www.ghisler.com

User avatar
DrShark
Power Member
Power Member
Posts: 1468
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark » 2019-12-02, 14:35 UTC

I can reproduce this Ctrl+C fails even after PC reboot. In email I asked to add some logging on this, but it silently goes to Behavior will no be changed now... Well... In that email I also wrote that system msgbox supports text copy by Ctrl+Ins, and it doesn't work with dark msgboxes of Total Commander.
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38738
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) » 2019-12-04, 18:14 UTC

Maybe it's Vista-specific? I will have to make some tests on Vista...
Author of Total Commander
http://www.ghisler.com

User avatar
DrShark
Power Member
Power Member
Posts: 1468
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark » 2020-01-03, 17:44 UTC

I can reproduce dark msgbox copy fail problem on 3 notebooks with different Windows (32-bit Vista and 7, 64-bit Windows 10) with both classic and aero themes, using both 32-bit and 64-bit Total Commander.

It seems it's easier to reproduce it if to press Ctrl+C with one hand. It's really strange that even this way Christian Ghisler cannot reproduce it on any of his PCs.

So I need help with reproducing it from other users. Try following test case:
1. Start TC in dark mode.
2. Open some file in (like history.txt) Lister
3. Either open some text editor, or launch some clipboard watcher like clipbrd.exe (this tool isn't part of modern Windows, but it's possible to download it from Internet and use there).
4. (optional) use some keylogger like Carnac tool mentioned in this topic.
5. In Lister, press Ctrl+F, enter some random characters, press Enter.
6. When "Not found" dark msgbox will appear, press Ctrl+C using fingers of left hand, close msgbox with Esc or Enter.
Repeat steps 5 and 6 several times.
If after Ctrl+C sometimes you can't hear a beep, and you don't use clipboard monitoring tool, you can paste text to some editor to make sure current message box text wasn't copied.

If you can confirm sometimes dark msgbox text is not copied, you can also try some other tests with left-handed Ctrl+C:
a) In Lister's Ctrl+F dialog, after entering random characters, select them and copy with Ctrl+C using left hand.
Repeat this many times: new entered text should always appear in clipboard.
b) Select random parts of text in file opened in Lister and copy with Ctrl+C using left hand: selected text should always appear in clipboard.
c) switch TC to regular theme (disable dark mode), try main test case may times with system "Not found" msgbox: new msgbox text should always appear in clipboard after copying it with Ctrl+C using left hand.

If everything goes as described above, please write here. Would be nice to find if any additional factor is required to reproduce the problem, if such exists.
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
petermad
Power Member
Power Member
Posts: 9189
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad » 2020-01-03, 22:33 UTC

1. Start TC in dark mode.
2. Open some file in (like history.txt) Lister
3. Either open some text editor, or launch some clipboard watcher like clipbrd.exe (this tool isn't part of modern Windows, but it's possible to download it from Internet and use there).
4. (optional) use some keylogger like Carnac tool mentioned in this topic.
5. In Lister, press Ctrl+F, enter some random characters, press Enter.
6. When "Not found" dark msgbox will appear, press Ctrl+C using fingers of left hand, close msgbox with Esc or Enter.
Repeat steps 5 and 6 several times.
If after Ctrl+C sometimes you can't hear a beep, and you don't use clipboard monitoring tool, you can paste text to some editor to make sure current message box text wasn't copied.

If you can confirm sometimes dark msgbox text is not copied, you can also try some other tests with left-handed Ctrl+C:
a) In Lister's Ctrl+F dialog, after entering random characters, select them and copy with Ctrl+C using left hand.
Repeat this many times: new entered text should always appear in clipboard.
b) Select random parts of text in file opened in Lister and copy with Ctrl+C using left hand: selected text should always appear in clipboard.
c) switch TC to regular theme (disable dark mode), try main test case may times with system "Not found" msgbox: new msgbox text should always appear in clipboard after copying it with Ctrl+C using left hand.
I can reproduce all of this in TC 9.5b11 32bit and 64 bit, so far tested under Windows 7 x64 w. aero theme, Windows 10 1909 x64 w. standard theme and Windows XP x86 w. luna theme.

But I can only reproduce it reliably if I press the Ctrl and the C key at exactly the same time (one hand).
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b13 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38738
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) » 2020-01-06, 15:47 UTC

2petermad
Does Ctrl+C work for you in the search results (Alt+F7, do a search, Ctrl+C)?
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 9189
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad » 2020-01-06, 16:18 UTC

Does Ctrl+C work for you in the search results (Alt+F7, do a search, Ctrl+C)?
Yes, every time also in Dark mode and also if I press Ctrl and C at exactly the same time.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b13 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
DrShark
Power Member
Power Member
Posts: 1468
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark » 2020-01-07, 16:46 UTC

petermad wrote:
2020-01-03, 22:33 UTC
I can only reproduce it reliably if I press the Ctrl and the C key at exactly the same time (one hand).
I can confirm it. Can you also reproduce dark message box copy fail if to press Ctrl+C in "jump" way with one hand:

push Ctrl, don't release yet fully but also don't push Ctrl, press C, release Ctrl, release C

(so basically you're pressing C while releasing Ctrl)?
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
petermad
Power Member
Power Member
Posts: 9189
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad » 2020-01-07, 17:23 UTC

push Ctrl, don't release yet fully but also don't push Ctrl, press C, release Ctrl, release C

(so basically you're pressing C while releasing Ctrl)?
I can confirm this too, in Dark mode. In Normal mode the message box copy works no matter whether you release Ctrl or C first.

It simply seems that in Normal mode there is listened for a keydown event and in Dark mode for a keyup event (or a keypress event) for the C keypress
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b13 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38738
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) » 2020-01-08, 11:31 UTC

I see - I'm indeed checking for Ctrl+C in the "key up" event and not the "key down" event. Since you release Ctrl before C, GetKeyState returns "not pressed" for Ctrl. I will move it to the "key down" event in beta 12. I will also add a check for Ctrl+Insert.
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 9189
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad » 2020-01-08, 17:38 UTC

08.01.20 Fixed: Dark mode: Ctrl+C in message box now handled in "key down" event instead of "key up" event (32/64)
Confirmed in TC 9.5b12 :-)
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b13 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
DrShark
Power Member
Power Member
Posts: 1468
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark » 2020-01-09, 10:40 UTC

ghisler(Author) wrote:
2020-01-08, 11:31 UTC
in beta 12. I will also add a check for Ctrl+Insert.
I can confirm Ctrl+Ins as been added in TC 9.50 beta 12 as a way to copy dark msgbox text.
history950.txt wrote:08.01.20 Fixed: Dark mode: Ctrl+C in message box now handled in "key down" event instead of "key up" event (32/64)
I can confirm this fixes "jump way" copy (it works good for both Ctrl+C and Ctrl+Ins).
petermad wrote:
2020-01-03, 22:33 UTC
But I can only reproduce it reliably if I press the Ctrl and the C key at exactly the same time (one hand).
If by "press the Ctrl and the C key at exactly the same time" we mean not pressing C while holding Ctrl, but actually pushing both Ctrl and C together, it fails in both dark and system msgbox (even though system one beeps, but on beeps see below note), so maybe this cannot be fixed.

Regarding beeps: it seems system msgbox reacts with beep to many keys (except some like single Ctrl or Insert key) no matter whether text is actually copied to clipboard, which means it always beeps on Ctrl+C and never on Ctrl+Ins. Total Commander's dark msgbox beeps when putting text to clipboard (both with Ctrl+C and Ctrl+Ins) which is better I think.
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38738
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) » 2020-01-09, 11:17 UTC

OK, thanks for your feedback - finally this has been resolved. I will leave it as it is now.
Author of Total Commander
http://www.ghisler.com

Post Reply