Touch Panel Keyboard Strings from port other than 1
wilw410
Posts: 14
I have a module that listens for text from a keyboard to be sent to it as a string. In order to fit their panel files into my usual panel, I switched all channel, address, level, command, etc ports to 10 because I am already using port 1 for other things. The issue I have is getting the "KEYB-XXX" strings from the keyboard which are always sent from port 1 of the touch panel devices to send to the module which is listening on touch panel port 10.
My first though was to create a data event on the touch panel port 1 and then redirect them as if they are from port 10 similar to doing a do_push. But, I cant find a way of emulating the "KEYB-XXX" string as if it came from port 10.
Has anyone else had this issue or know of a fix for my problem?
My first though was to create a data event on the touch panel port 1 and then redirect them as if they are from port 10 similar to doing a do_push. But, I cant find a way of emulating the "KEYB-XXX" string as if it came from port 10.
Has anyone else had this issue or know of a fix for my problem?
0
Comments
I haven't used the built-in keyboard/keypad for years. I personally make my own keyboard that doesn't rely upon strings from the touch panel. That way a keyboard/pad can be anything I want and doesn't rely upon a preset, hard-coded solution.
that's what I'd do if I were you.
e
I use the built in keyboard with good success. It has all the shifted characters as well and I didn't want to have to do all the work required to build that. Its a better solution in the long run I agree, but I can't get myself to do it when something that already works exist. Basic laziness.
For your module, can't you just create a data_event that listens for the keyb- command on port 1?
Paul
Is there a solution if it was a compiled module where I do not have the actual code and cannot modify it? I often use modules from AMX or other sources that are compiled already as jars or tkos.
I guess I am looking for a new command like DO_PUSH that is DO_STRING or DO_COMMAND to emulate touch panel activity in code when needed. Feature request?
dvMsgPanel.NUMBER = dvPanel.NUMBER ;
dvMsgPanel.PORT = 1 ;
dvMsgPanels.SYSTEM = dvPanel.SYSTEM ;
REBUILD_EVENT() ; // put this at the end of the section in case other stuff needs it
Now you have a device equal to whatever your passed panel is, but on port 1. I make it a point to make certain my text field sends something unique, so I know it's my module generating the data and no someone else's.
If you have a compiled module from another party that is using anything but port 1 for this, it's not going to work no matter what you do.
That's a good trick, I might just have to rebuild the one module I've got with this issue to take advantage of it.