FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Ctrl + T and bKeyDown
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Ctrl + T and bKeyDown
Posted: Mon Dec 26, 2022 07:00 AM
hi.

i do have in Main
Code (fw): Select all Collapse
   oMain:bKeyDown := { | nKey, nFlag | DoMyKey( nKey, nFlag) }
Code (fw): Select all Collapse
STATIC PROCEDURE DoMyKey( nKey, nFlag )
   DO CASE
      CASE GetKeyState( VK_SHIFT )
      CASE GetKeyState( VK_CONTROL )
      CASE GetKeyState( VK_MENU )
   ENDCASE
   DO CASE
      CASE nKey = VK_F2
      CASE nKey = VK_F3
      CASE nKey = VK_F5
      CASE nKey = VK_F6
      CASE nKey = VK_F7
      CASE nKey = VK_F8
      CASE nKey = VK_F9
      CASE nKey = VK_F11
      CASE nKey = VK_F12
      CASE nKey = VK_ADD
      CASE nKey = VK_SUBTRACT
// how Ctrl + "T"
      CASE nKey = 20 // 116 // .AND. lCtrl = .T.
   ENDCASE
how can i get Ctrl + T :?:
greeting,

Jimmy
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Ctrl + T and bKeyDown
Posted: Mon Dec 26, 2022 07:36 AM
Dear Jimmy,
Code (fw): Select all Collapse
STATIC PROCEDURE DoMyKey( nKey, nFlag )

   if GetKeyState( VK_CONTROL ) .and. nKey = 20
      ...
   endif

return
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Ctrl + T and bKeyDown
Posted: Mon Dec 26, 2022 08:28 AM
hi Antonio,
Antonio Linares wrote:
Code (fw): Select all Collapse
   if GetKeyState( VK_CONTROL ) .and. nKey = 20
the "Problem" is what to "use" for "t"/"T" as nKey :?:

is there a Way to find out which "nKey" was press :?:
greeting,

Jimmy
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Ctrl + T and bKeyDown
Posted: Mon Dec 26, 2022 08:32 AM

Dear Jimmy,

if GetKeyState( VK_CONTROL ) .and. ( nKey == Asc( "t" ) .or. nKey == Asc( "T" ) )

nKey is the key value that was pressed

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Ctrl + T and bKeyDown
Posted: Mon Dec 26, 2022 09:15 AM
hi Antonio,
Antonio Linares wrote:
Code (fw): Select all Collapse
if GetKeyState( VK_CONTROL ) .and. ( nKey == Asc( "t" )  .or. nKey == Asc( "T" ) )
nKey is the key value that was pressed
YES :D
this Way it work like i want, thx
greeting,

Jimmy

Continue the discussion