Hi,
what is the best way to "translate" a special Keyboard-Event to another for the whole application? f. e. User press "#" on keyboard and i want "translate" this to ESC (so that the application behaves like ESC was pressed).
Any hints are welcome.
How can i have a keyboardevent allways transleted to another
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
How can i have a keyboardevent allways transleted to another
-----------------
Greetings
Markus Walter
Greetings
Markus Walter
Re: How can i have a keyboardevent allways transleted to ano
This can help you
PostAppEvent (xbeP_Keyboard, 27,, SetAppFocus ())
Paulino Nolberto
Regards
PostAppEvent (xbeP_Keyboard, 27,, SetAppFocus ())
Paulino Nolberto
Regards
Nolberto Paulino
Regards
Regards
Re: How can i have a keyboardevent allways transleted to ano
If all your windows are eXpress++ windows you could use the DC_ReadGuiHandler() funtion.
Code: Select all
FUNCTION Main()
DC_ReadGuiHandler({|a,b,c,d|MyGlobalHandler(a,b,c,d)})
....
RETURN nil
* ------------
FUNCTION MyGlobalHandler( nEvent, mp1, mp1, oXbp )
IF nEvent == xbeP_Keyboard .AND. Chr(mp1) = '#'
PostAppEvent(xbeP_Keyboard, xbeK_ESC,, oXbp )
RETURN DCGUI_IGNORE
ENDIF
RETURN DCGUI_NONE
The eXpress train is coming - and it has more cars.
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
Re: How can i have a keyboardevent allways transleted to ano
Hi Roger,
thanks for the hint.
I still have a global handler function and i make the same thing with F10 to prevent that the Menubar receives focus, but have i still forgotten this... Sorry.
thanks for the hint.
I still have a global handler function and i make the same thing with F10 to prevent that the Menubar receives focus, but have i still forgotten this... Sorry.
-----------------
Greetings
Markus Walter
Greetings
Markus Walter