Any chance to add support for the winkey combinations? Any reason it is not detected? RegisterHotKey supports it (with some practical limitations with lower level workarounds). #PB_Shortcut_LeftWindows
https://docs.microsoft.com/en-us/window ... sterhotkey
ShortcutGadget winkey support
Re: ShortcutGadget winkey support
I'm guessing it's not supported (by Microsoft, not PureBasic) because pressing it opens the Start menu; whereas setting it with RegisterHotKey is possible because you're not actually pressing it when registering it.
Re: ShortcutGadget winkey support
RegisterHotKey_ works fine when combined with second hotkey and not yet taken, CTRL+WIN+I for example.
Re: ShortcutGadget winkey support
For the reasons I already said - because it's not being pressed to register it. You can't register it with the hotkey control because pressing the key takes the focus away from the control to show the Start menu.
Last edited by BarryG on Mon Sep 27, 2021 10:57 am, edited 1 time in total.
Re: ShortcutGadget winkey support
I don't follow. It works. Win+ctrl+I can be catched in a PB program without low level hooks, same as any other shortcut. Start menu does not popup. So it should be added to the shortcutgadget.
Start menu only popups when only the win key is pressed/depressed. Not when any key is added at the same time. Otherwise win+e wouldn't work to open explorer and a dozen other shortcuts...
Start menu only popups when only the win key is pressed/depressed. Not when any key is added at the same time. Otherwise win+e wouldn't work to open explorer and a dozen other shortcuts...
Last edited by Rinzwind on Mon Sep 27, 2021 11:00 am, edited 1 time in total.
Re: ShortcutGadget winkey support
The very act of pressing the Windows key takes the focus away from your app... that's what I'm trying to explain. So the control never gets to see the Windows key and register it as a shortcut. On the other hand, RegisterHotKey_() works because you're not pressing the Windows key to register it - you're programmatically telling it to use the Windows key.
Re: ShortcutGadget winkey support
That only happens when the shortcut is already registered and does something. One can press CTRL+WIN+I in the shortcutgadget and it keeps focus, it just doesn't recognize it (shows CTRL+I)...
Re: ShortcutGadget winkey support
Okay, so that just proves the Windows key isn't supported by the control (which is just the Windows "msctls_hotkey32" control). Fred can't change that.
Re: ShortcutGadget winkey support
Should be fixed by creating an improved one then... can't always rely on native unmaintained controls.
Manual reads: "The initial shortcut to display. The possible values are the same as in the AddKeyboardShortcut() function. "
Which includes "
#PB_Shortcut_LeftWindows
#PB_Shortcut_RightWindows
#PB_Shortcut_Command
"
The gadget is not Windows 95+ aware
That was the solution elsewhere too when people complained about its age-old limitations.
Manual reads: "The initial shortcut to display. The possible values are the same as in the AddKeyboardShortcut() function. "
Which includes "
#PB_Shortcut_LeftWindows
#PB_Shortcut_RightWindows
#PB_Shortcut_Command
"
The gadget is not Windows 95+ aware
That was the solution elsewhere too when people complained about its age-old limitations.