Question about SET KEY

Post Reply
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Question about SET KEY

Post by driessen »

Hello,

I have already a statement like :

Code: Select all

SET KEY VK_F9 TO TestProc
But how can I use this command to connect a procedure to SHIFT-F9 ?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Michel,

Code: Select all

procedure TestProc

   if GetKeyState( VK_SHIFT )
      ... your code ...
   endif

return
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Post by dutch »

Dear Michel,
This code may help.

Code: Select all

SETKEY( VK_F9 , {|| if(GetKeyState( VK_SHIFT ), IntMail(), if(GetKeyState( VK_CONTROL ), LogBook(), VcRms() ) ) } )
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

Sorry guys,

Thanks a lot for your help.

I tried both possibilities but unfortunately without any luck.

When I press Shift-F9, nothing happens.

Greetings,
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Post by dutch »

Dear driessen,

You must put this line on the top of Main Procedure and the rest will work fine. I use this for many years.

Regards,
Dutch
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Michel,

> When I press Shift-F9, nothing happens.

What control has the focus when you press them ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply