G4 Keyboard Retun String
TurnipTruck
Posts: 1,485
Greetings,
I am programming a system blind and cannot experiment to find the answer to this.
What, if anything, will a G4 panel add to a string returned to a master beyond the data entered on the keyboard?
In G3 it preceded the text with KEYB-
I am programming a system blind and cannot experiment to find the answer to this.
What, if anything, will a G4 panel add to a string returned to a master beyond the data entered on the keyboard?
In G3 it preceded the text with KEYB-
0
Comments
I currently have the channel port as 0-setup port and channel code as PageFlip: Keyboard.
I set the address port for 0 as you stated and set the address code for Text Area single line.
My string output port is 1 and that is the port of the D:P:S that triggers the data event in my code.
I set the button name as KEYB- which should give me the same header on my string as did the G3 panels.
Sound OK?
With G3 each button sent a string each time it was pressed.
With G4 each button manipulates what is in the text input button, when done is pressed G4 takes the text on the text input button and sends it to the string buffer on port 1 prepended by the name of the button.
Channels and Addresses should have no effect on this. The idea was to have customizeable keyboards/keypads and not have to write all the code to manage the keyboard. One of the neat features of the keyboard/keypad engine in G4 is that it (for most keys) uses the text on the button to know what char/chars to add the to text area. For example if you had a keyboard for entering web addresses you could just copy the "x" button, change the text to "www." and when a user presses that button, it will add it to the text area. It will even work with buttons whose text was updated via a send_command, so you could actually use it has a preset selector for audio conferencer. It has lots of room to be used.
Also you can copy the system keyboards/keypads from the system template into your file (and they will get renamed to a single underscore prefix), and if you leave the name alone, "__keyboard" becomes "_keyboard" whenever a keyboard is needed it will call your local version. This lets you uses all the existing keyboard stuff, but customize the look. And with the keyboards/keypads we have now the buttons are all Chameleons so changing the color is a snap.
The return string is headed with KEYB- regardless of what I name the button. My system is up and running, but being able to change that prefix would be a nice thing.
Could I have not configured something properly?
Or....... ?
- Chip
There is no need. If you use the STRING handler of your DATA_EVENT for the panel, the string output of the keypad will be the entire value of DATA.TEXT. Tagging a $0D on the end won't help you unless you are buffering responses and queuing them up, but it's not necessary to do so.
Thank you for that info. That is what I had to try to use DATA.TEXT. It worked great. Thank you.