Question about SET KEY

Post Reply
User avatar
driessen
Posts: 1422
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 | Expand

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. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
Antonio Linares
Site Admin
Posts: 42537
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Post by Antonio Linares »

Michel,

Code: Select all | Expand

procedure TestProc

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

return
regards, saludos

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

Post by dutch »

Dear Michel,
This code may help.

Code: Select all | Expand

SETKEY( VK_F9 , {|| if(GetKeyState( VK_SHIFT ), IntMail(), if(GetKeyState( VK_CONTROL ), LogBook(), VcRms() ) ) } )
User avatar
driessen
Posts: 1422
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. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
dutch
Posts: 1554
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: 42537
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
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