alexey - 2020-06-17

Hi guys! I have a PLC without touch screen and 4 hardware key buttons:

CrossControl made these 4 hardware buttons as standard keyboard keys 'C', 'D', 'E', 'F'. From the Visualization Manager's point of view if I activate standard keyboard handling I will get 4 keyboard buttons 'C', 'D', 'E', 'F' which are a bit useless for visualization as I don't have 'UP', 'DOWN', 'LEFT', 'RIGHT' arrows for table navigation, 'ENTER', 'TAB', 'ESC' for dialogs, etc... I can do simple things with Default Hotkeys or visualization-specific Hotkeys Configuration , no problem, but it will turns visualization and related code into a mess of hundrends small objects and it will be very hard to modify and maintain in the future.

Question! Is there any way to swap AND/OR simulate standard key definition from the code on-the-fly? Say I need to turn 'C' into 'UP', 'D' into 'DOWN', 'E' into 'ENTER' and 'F' into 'TAB' standard keyboard keys on one visualization page (I will use CurrentVisu := ) and define something else for these 4 buttons on another?

My plan has not progressed past defining Default Hotkeys in Visualization manager to execute simple code:

After that I need to send "fake" keyboard keys back to Visualization Manager. How to do it the easiest way?


Last edit: alexey 2020-06-17