Hi all, anyone know how I can simulate a keystroke.
For example ENTER, ESC 1,2,3,4,5 etc.
Thank you very much
Miguel
Key
Re: Key
please tell us how you want to use it ?MIGUELON wrote:Hi all, anyone know how I can simulate a keystroke.
For example ENTER, ESC 1,2,3,4,5 etc.
VIO Mode -> KEYBOARD ( Chr(K_ENTER) )
GUI Mode -> PostAppEvent(xbeP_Keyboard,xbe_K_ENTER,,Object)
... or do you want to "send" it to a "other" Application ?
greetings by OHR
Jimmy
Jimmy
Re: Key
SetAppWindow() return "active" Window while SetAppFocus() allways return "active" XbPart.MIGUELON wrote:... the problem is that there are many objects window and also a dcbrowse and do not know which is the object that has the current focus to use:
XbParts "normal" are placed on o:DrawingArea so you will find them in o:DrawingArea:Childlist()
did you realy need to "send" a Event or do you want to "react" on it ?MIGUELON wrote:PostAppEvent (xbeP_Keyboard, xbe_K_ENTER,, Object)
if you want "react" on it you might use o:Keyboard Slot of a XbPart for it.
greetings by OHR
Jimmy
Jimmy
Re: Key
What I am trying to do is put multiple buttons within a window that simulates pressing a key. It is a virtual keyboard buttons from DCADDBUTTON
FOR EXAMPLE:
@ nFila, 0 DCTOOLBAR oBotonesTecla SIZE 110,3 BUTTONSIZE 11,3 HIDE {||! M->lEditModoVenta }
DCADDBUTTON CAPTION 'TOTAL';
PARENT oBotonesTecla;
ACTION {|o|o:=DC_GetListObject( GetList ),SetAppFocus(o), PostAppEvent(xbeP_Keyboard,xbeK_ENTER,,o)}
Jimmy thank you very much
Miguel
FOR EXAMPLE:
@ nFila, 0 DCTOOLBAR oBotonesTecla SIZE 110,3 BUTTONSIZE 11,3 HIDE {||! M->lEditModoVenta }
DCADDBUTTON CAPTION 'TOTAL';
PARENT oBotonesTecla;
ACTION {|o|o:=DC_GetListObject( GetList ),SetAppFocus(o), PostAppEvent(xbeP_Keyboard,xbeK_ENTER,,o)}
Jimmy thank you very much
Miguel