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

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

Moderators: Hacker, Stefan2, white, sheep

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

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

Post by *MVV » 2018-07-30, 14:51 UTC

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: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) » 2018-07-31, 06:15 UTC

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
http://www.ghisler.com

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

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

Post by *MVV » 2018-07-31, 06:57 UTC

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: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) » 2018-07-31, 07:09 UTC

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
http://www.ghisler.com

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

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

Post by *MVV » 2018-07-31, 07:16 UTC

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: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) » 2018-07-31, 08:01 UTC

So it's probably a Windows 7 bug - I doubt that I can do much about it then...
Author of Total Commander
http://www.ghisler.com

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

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

Post by *MVV » 2018-07-31, 09:56 UTC

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: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) » 2018-08-01, 12:33 UTC

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
http://www.ghisler.com

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

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

Post by *ghisler(Author) » 2018-08-01, 16:42 UTC

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
http://www.ghisler.com

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

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

Post by *MVV » 2018-08-02, 05:04 UTC

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