Just windows...
After some more digging I did find the following:
http://64.233.169.104/search?q=cache:Wn-fR-6C5TEJ:www.dotnet2themax.com/ShowContent.aspx%3FID%3D103cca7a-0323-47eb-b210-c2bb7075ba78+api+keyboard+hotkey&hl=en&ct=clnk&cd=8&gl=us
(some VB code, which provided some pointers to the 'RegisterHotKey' API which can configure specific global shortcuts that work from within any application... Which may work for my purposes, as long as it doesn't change the application focus and leaves it with the program that had it last -- not sure about that. :-?
I tried to convert it to Blitz to test, but I am missing some things... This is what I have so far:
Import "-luser32"
Extern "Win32"
' Function FindWindow( lpClassName$z, lpWindowName$z ) = "FindWindowA@8"
' Function FindWindowEx( hwnd1:Int, hwnd2:Int, lpsz1$z, lpsz2$z ) = "FindWindowExA@16"
' Function SendMessage( hwnd, msg, wparam:Byte Ptr, lparam:Byte Ptr ) = "SendMessageA@16"
' Function GetLastError()
Function RegisterHotkey:Int (hwnd:Int,id:Int,fsmodifiers:Int,vk:Int)
Function UnregisterHotkey:Int (hwnd:Int,id:Int)
Function globalAddAtom:Short (lpstring:String)="GlobalAddAtomA@4"
Function GlobalDeleteAtom:Short (nAtom:Short)
End Extern
Const Mod_Alt=1
Const Mod_Ctrl=2
Const Mod_Shift=4
Const Mod_Win=8
Global HotKeyID:Short
Global Atomname:String="X8"
Global hwnd:Int=0
win=CreateWindow("TEST",100,100,640,480)
hwnd=QueryGadget(win,QUERY_HWND)
RegisterGlobalHotKey(Key_F6, MOD_SHIFT)
Print hotkeyid
Delay 20000
unregisterglobalhotkey()
Print hotkeyid
Function RegisterGlobalHotkey(hotkey:String,modifiers:Int)
HotKeyID=GlobalAddAtom(atomname)
'Print hotkeyid
If HotkeyID=0 Then
Print "Unable to generate unique Hotkey ID"
EndIf
If RegisterHotkey(hwnd,hotkeyid,modifiers,Int(hotkey)) =0 Then
Print "Unable to register Hotkey"
unregisterglobalhotkey()
End If
End Function
Function UnregisterGlobalHotkey()
If HotkeyID<>0 Then
UnregisterHotkey(hwnd,hotkeyid)
GlobalDeleteAtom(hotkeyid)
hotkeyid=0
EndIf
End Function
...but it fails with the following errors at the moment, and I can't seem to find a way to resolve that:
J:/.bmx/Global_Hotkey.bmx.console.debug.win32.x86.o(code+0x2c4): undefined reference to `RegisterHotkey@16'
J:/.bmx/Global_Hotkey.bmx.console.debug.win32.x86.o(code+0x35b): undefined reference to `UnregisterHotkey@8'