With AddGlobalKeyboardShortcut created KeyboardShortcut also work if the window is not active or hidden.
This is useful, for example, if the program is minimized in the system tray, it nevertheless should be operated via shortcuts.
AddGlobalKeyboardShortcut
AddGlobalKeyboardShortcut

Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Re: AddGlobalKeyboardShortcut
And all programs should use the same global hotkeys
Bad idea!

Bad idea!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: AddGlobalKeyboardShortcut
Global hotkeys can be very useful and reasonable.
It can surely be a welcomed feature of an application to allow setting a global hotkey for a certain feature.
It's the user who has to carry the responsibility to prevent local conflicts.
It can surely be a welcomed feature of an application to allow setting a global hotkey for a certain feature.
It's the user who has to carry the responsibility to prevent local conflicts.
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi
Missing a download-file on the forums? ~ check out this backup page.
Missing a download-file on the forums? ~ check out this backup page.
Re: AddGlobalKeyboardShortcut
All I know programs that support global keyboard shortcuts, offer to set the global keyboard shortcuts. Of course, fixed, non-changeable global shortcuts are bad.ts-soft wrote:And all programs should use the same global hotkeys
In addition, global shortcuts can be set only once. Therefore AddGlobalKeyboardShortcut must supply a return value.

Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Re: AddGlobalKeyboardShortcut
That is not a function to make native, to many limitation, to rare usage and so on.
If you really required it, so it is better to use API! Windows: RegisterHotKey
If you really required it, so it is better to use API! Windows: RegisterHotKey
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
