KB shortcut for Hotlist doesn't work for fast presses

Things you’d like to miss in the future...
Post Reply
Mesh
Posts: 934
Joined: 24 Mar 2008 21:22

KB shortcut for Hotlist doesn't work for fast presses

Post by Mesh »

I found an odd bug in XY.


Ordinarily, I can tap hotkeys as quickly as I want and XY always responds just fine. However, I discovered that the keyboard shortcut that brings up the Hotlist (Ctrl+H) doesn't work if Ctrl+H is pressed very quickly (power user speed-tap). The keys have to be held down for a fraction of a second longer in order for XY to respond and bring up the Hotlist. Otherwise, it just acts as if nothing was pressed.

However, trying this out with other commands, I don't have this problem. (I'm not saying no other command is affected, only that I haven't found any beyond the Hotlist command, yet.)

I tried out several versions (including the most recent beta), and this bug was present in all of them (the farthest back I could go was v11.10).


I'm very curious as to what the cause is for this bug.

admin
Site Admin
Posts: 50567
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: KB shortcut for Hotlist doesn't work for fast presses

Post by admin »

This command is "Triggered on Key Up" (as you can see in | Customize Keyboard Shortcuts...). I think this is what causes your puzzlement.

Actually all commands that pop a menu are "Triggered on Key Up" -- this is because otherwise any accelerators in the menu would be triggered by the KeyUp event.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

Mesh
Posts: 934
Joined: 24 Mar 2008 21:22

Re: KB shortcut for Hotlist doesn't work for fast presses

Post by Mesh »

admin wrote:This command is "Triggered on Key Up" (as you can see in | Customize Keyboard Shortcuts...). I think this is what causes your puzzlement.

Actually all commands that pop a menu are "Triggered on Key Up" -- this is because otherwise any accelerators in the menu would be triggered by the KeyUp event.

Aha. With that information, I discovered that more specifically, if the Ctrl key is released before the H key, the command fails to execute. And that's more likely to happen on a fast keypress.

Is that standard for KeyUp events, generally, or is it an odd quirk of how XY processes them?

admin
Site Admin
Posts: 50567
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: KB shortcut for Hotlist doesn't work for fast presses

Post by admin »

Frankly, I don't know. But technically I see no way to change this, so I'd think it's the same everywhere.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

Mesh
Posts: 934
Joined: 24 Mar 2008 21:22

Re: KB shortcut for Hotlist doesn't work for fast presses

Post by Mesh »

admin wrote:Frankly, I don't know. But technically I see no way to change this, so I'd think it's the same everywhere.
Fair enough. Thanks for clearing this up.

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: KB shortcut for Hotlist doesn't work for fast presses

Post by TheQwerty »

FYI, if you really want it to work and don't mind the possibility of accidentally triggering items within the menu, then keep in mind that UDC allows you to assign shortcuts and control whether they trigger on key down or up.
  1. Remove the default Ctrl+H shortcut for Go | Hotlist....
  2. Create a new Run Script UDC that runs #530;.
  3. Assign that script the Ctrl+H shortcut.

Mesh
Posts: 934
Joined: 24 Mar 2008 21:22

Re: KB shortcut for Hotlist doesn't work for fast presses

Post by Mesh »

Good to know. Thanks!

Post Reply