[9.21rc1] Hotkey selection bug: Esc reverts special keys

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

[9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *MVV »

Another inconsistency found in opened drop-down list in hotkey selection configuration page:
1. Most keys (letters, numbers, some other) jump to corresponding items and select shortcuts, and then Esc closes drop-down list w/o returning to previous key.
E.g. open hotkey selection drop-down list, press A key and then Esc, list closes and A key remains selected, then open drop-down list again, press P key and then Esc, list closes and P key remains selected.

2. Some keys (Fnn, Ins/Del/Home/End/PgUp/PgDn/Backspace/Left/Right/Space/Pause/OEM*) jump to corresponding items and select shortcuts, but then Esc closes drop-down list and returns to previous key.
E.g. open hotkey selection drop-down list, press A key and then Esc, list closes and A key remains selected, then open drop-down list again, press Ins key and then Esc, list closes and previously selected A key becomes selected instead of Ins.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *ghisler(Author) »

Sorry, I don't get your problem. ESC while the dropdown list is open just closes that list. Press ESC again if you want to close the dialog, press ESC yet another time. I think that this is the post logical way.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *MVV »

Please try mentioned steps, there is a difference between handling of different keys used for selecting keys in drop-down list.

Keys that work as expected:
1. Open Misc configuration page.
2. Notice that combobox and command field are empty.
3. Open drop-down list.
4. Press a key from first list: A-Z, 0-9, +, -, *, /, or select any key using navigation keys Up/Down. Notice that pressed key is displayed in combobox itself and corresponding command is shown in command field.
5. Press Esc to close drop-down list. Notice that a key pressed in step 4 is still displayed in combobox itself and corresponding command is still shown in command field.

Keys that don't work as expected:
1. Same.
2. Same.
3. Same.
4. Press a key from second list: Fnn/Ins/Del/Home/End/PgUp/PgDn/Backspace/Left/Right/Space/Pause/OEM*. Notice that pressed key is displayed in combobox itself and corresponding command is shown in command field.
5. Press Esc to close drop-down list. Notice that combobox and command field become empty, i.e. Esc rollbacks selected key.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *ghisler(Author) »

Sorry, I cannot reproduce that, I tried with TC 32-bit and 64-bit on Windows 10. The combobox does not become empty after I press for example F2 or Insert and then ESC in the dropdown combobox.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *MVV »

I can reproduce it using 9.21rc1 both 32/64 bit under Windows 7 Enterprise.

I've just tried it under Windows Server 2016 Datacenter (via RDP connection), and I couldn't reproduce it there...

Please try it under Windows 7 (have no idea is Windows 8 affected or not).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *ghisler(Author) »

So it's probably a Windows 7 bug - I doubt that I can do much about it then...
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *MVV »

Well, maybe... But it may also be some problem in keypress handler because only some keys are affected.

And, Windows 7 is still mostly used Windows version so it would be good to find a way to get rid of this bug...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *ghisler(Author) »

It's indeed a Windows 7 bug: Windowqs 7 ignores the setting of the current item via CB_* messages when closing the dialog via ESC. The only solution I found was to intercept ESC, check the index before closing, closing the box myself, and then setting the old index back. This cost me a few hours of my lifetime - for what? For a stupid Microsoft bug.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *ghisler(Author) »

This should work now in RC2, please test it! In the 64-bit version, you will briefly see the wrong value, though.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21rc1] Hotkey selection bug: Esc reverts special keys

Post by *MVV »

Thank you for this wonderful investigation! It works fine now in both Win7/10! :D

I've spent some time to find out where I can see the wrong value, it is almost unnoticeable. And it may also be seen in 32-bit version, but only if you know that and gaze intently. :)
Post Reply