> Le 24 oct. 2016 à 09:36, Piotr Chabot Stadhouders <[email protected]> 
> a écrit :
> 
> Hi all,
> 
> 4D v14, Windows / OSX
> 
> I use the command SET MENU ITEM SHORTCUT
> Now I want to set function keys (F1, F2, etc) as shortcut.
> 
> Does anybody know if this is possible? Seems to me as an obvious question.

Hi Piotr, 
when I don't know (as you), I think getter… 

1/ Set a button with this shortcut in properties, run the form and read with 
OBJECT GET SHORTCUT, it reveals "the truth":

Case of
        : (Form event=On Clicked)
        OBJECT GET SHORTCUT (Self->;$key;$modifier)
        ALERT("Key="+$key+"\rModifier="+String($modifier))  //---> key=[F1] * 
modifier=0
End case

2/ erase the button shortcut in properties and use setter:

Case of
        : (Form event=On Load)
        $key:="[F1]"
        $modifier:=0
        OBJECT SET SHORTCUT (Self->;$key;$modifier)
        : (Form event =On Clicked)  //should be triggered by the key too
        OBJECT GET SHORTCUT (Self->;$key;$modifier)
        ALERT("Key="+$key+"\rModifier="+ String($modifier))
End case


-- 
Arnaud de Montard




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to