AddGlobalKeyboardShortcut

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 559
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

AddGlobalKeyboardShortcut

Post by Sicro »

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.
Image
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
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: AddGlobalKeyboardShortcut

Post by ts-soft »

And all programs should use the same global hotkeys :lol:

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.
Image
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: AddGlobalKeyboardShortcut

Post by Vera »

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.
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 559
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: AddGlobalKeyboardShortcut

Post by Sicro »

ts-soft wrote:And all programs should use the same global hotkeys
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.

In addition, global shortcuts can be set only once. Therefore AddGlobalKeyboardShortcut must supply a return value.
Image
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
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: AddGlobalKeyboardShortcut

Post by ts-soft »

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
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.
Image
Post Reply