shortcut$ = Gfa_Key(x)
x: as predefined constant representing a sub
Returns the assigned shortcut for the given keyboard event sub (Func) in the current GLL. This is an informational function only that provides current keyboard assignments of the subs in the GLL where this function is used. Gfa_Key does not provide information of the keyboard assignments of other currently loaded GLLs.
The parameter x is not a variable and it has no type; it is simply a strange GFA-BASIC 32 constant that identifies a keyboard sub event. For instance, the parameter sc+A represents the sub Gfa_Ex_A, and sc+F11 specifies the event sub Gfa_SCF11. Valid values are sc+0, App+A, App+s+I, SCF11, etc. The constant is best looked up in the Key Assignment dialog box. The parameter is not a string, but the return value is!
Dim ActiveKey$ = Gfa_Key(sc+A)
If Len(ActiveKey$)
MsgBox "The Gfa_Ex_A sub is executed with the keyboard shortcut " & ActiveKey$
Else
MsgBox "There is no Gfa_Ex_A sub in this GLL, or" #10 _
"Gfa_Ex_A has been disabled because it's shortcut has been removed, or" #10 _
"it has been disabled because another GLL uses the keyboard shortcut."
EndIf
If the return value is an empty string, then
1. There is no event sub with that name, or
2. There is no key assigned to the Gfa_ event sub, or
3. The key assignment is disabled, because another GLL, loaded earlier, uses the keyboard shortcut.
{Created by Sjouke Hamstra; Last updated: 08/10/2014 by James Gaite}