Estou usando uma função para copiar e colar conteúdo de gets, notei o seguinte olhando a inkey.ch a K_CTRL_C e PgDn tem o mesmo valor 3, quando se tecla CTRL + C, faz também um PgDn e vice-versa , ou seja finaliza o get, mas intenção não é essa, quero que permaneça no GET ativo, tem alguma solução ?
#include "inkey.ch"
******************************************************************
* Autor : Alexandre Simões
* Objetivo: Facilitar a cópia de conteúdo de gets para outros gets
* Data : 06/04/2017
* Sintaxe : SetKey( K_CTRL_C, {|| CopyPaste() } )
* SetKey( K_CTRL_V, {|| CopyPaste() } )
*******************************************************************
FUNCTION CopyPaste()
LOCAL oGet := GetActive(), lIsKeyCtrl, nBits, xVar
SetKey( K_CTRL_C, NIL )
SetKey( K_CTRL_V, NIL )
nBits := hb_GtInfo( HB_GTI_KBDSHIFTS )
lIsKeyCtrl := ( nBits == hb_BitOr( nBits, HB_GTI_KBD_CTRL ) )
nKey := LastKey()
DO CASE
CASE nKey = K_CTRL_C
IF lIsKeyCtrl
IF GetActive() != NIL
xVar := Transform( oGet:varGet(), oGet:Picture )
IF ValType( xVar ) = "N"
xVar := hb_NtoS( xVar )
ELSEIF ValType( xVar ) = "D"
xVar := DTOC( xVar )
ENDIF
hb_gtInfo( HB_GTI_CLIPBOARDDATA, xVar )
ENDIF
ENDIF
CASE nKey = K_CTRL_V
IF lIsKeyCtrl
IF GetActive() != NIL
xVar := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
IF ValType( oGet:VarGet() ) = "C"
ELSEIF ValType( oGet:VarGet() ) = "N"
xVar := Val( xVar )
ELSEIF ValType( oGet:VarGet() ) = "D"
xVar := CTOD( xVar )
ENDIF
oGet:VarPut( xVar )
ENDIF
ENDIF
ENDCASE
SetKey( K_CTRL_C, {|| CopyPaste() } )
SetKey( K_CTRL_V, {|| CopyPaste() } )
RETURN .T.