Page 1 of 1

xbrowse, bkeydown and number

Posted: Wed Jan 08, 2025 3:13 pm
by JoséQuintas

Code: Select all | Expand

      :bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }

Code: Select all | Expand

   CASE IsRange( nKey, 32, 127 ) 
      cFilter += Upper( Chr( nKey ) )
If type letters ok
if type numbers from normal keyboard ok
if type numbers from numeric keyboard not
Is it expected ?

Note:
1 from normal keyboard returns 49
1 from numeric keyboard returns 97

Re: xbrowse, bkeydown and number

Posted: Wed Jan 08, 2025 4:55 pm
by karinha
Mira se ayuda,

Code: Select all | Expand

// C:\FWH..\SAMPLES\TECLAS.PRG

#Include "FiveWin.Ch"

FUNCTION Main()

   LOCAL oWnd

   DEFINE WINDOW oWnd TITLE "Testando as Teclas - Caixa Alta e Baixa"

   oWnd:bKeyDown = { | nKey | MsgInfo( "Caixa Baixa: " + Str( nKey ) ) }

   oWnd:bKeyChar = { | nKey | MsgInfo( "Caixa Alta.: " + Str( nKey ) ) }

   ACTIVATE WINDOW oWnd

RETURN NIL
Regards, saludos.