G4 Keyboard Retun String
TurnipTruck
Junior Member
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-
Comments
-
The string prefix is the name of the text display button, and the hyphen is part of that name (which I recommend you include for easier parsing). This is on the General tab of the properties. On the program tab you need to specify port 0 as the address port, and one of the text area fields from the dropdown as the address code.
-
What about the channel port and code?
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 the G4 Keyboards/keypads the buttons don't return the string, the text input button does.
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. -
DHawthorne wrote:The string prefix is the name of the text display button, and the hyphen is part of that name
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? -
You can change the name of the text input button and that IS the prefix.
-
Note, it is the hame of the text area button, not any of your others.TurnipTruck wrote: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? -
Last I looked, hitting enter on a G3 keypad/board caused the entire typed string to be sent back - not on a key by key basis. Or you're talking about something else and I'm confused. Or you're talking about assiging text to individual buttons and not using the built-in keypad/keyboard...
Or....... ?
- Chipjoeyjoejo1200 wrote:With G3 each button sent a string each time it was pressed. -
Is there any way to put in the $0D at the end of the text being returned from the keyboard. This will make my parsing of the string returned easier.
-
We are talking G4. It's completely different from G3.Chip Moody wrote:Last I looked, hitting enter on a G3 keypad/board caused the entire typed string to be sent back - not on a key by key basis. Or you're talking about something else and I'm confused. Or you're talking about assiging text to individual buttons and not using the built-in keypad/keyboard...
Or....... ?
- Chip -
kennyann wrote:Is there any way to put in the $0D at the end of the text being returned from the keyboard. This will make my parsing of the string returned easier.
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 your reply. My application has three touch panels. I am using Port 8 for one of my device A. I track all the data that the user inputs on each touch panel and update my array. Since the text data from the touch panel is coming from port 1 - i had the keyboard for that particular device send out the string output as Port8. This way I know the string that is coming from the touch panel is for device A. eg. If the user inputs RED1 - I get two sets of data - Port8 then RED1 soon after. If tried to use DATA.TEXT - it seems that l loose Port8 unless I am doing something wrong. It seems to work I buffer the data but I rather use DATA.TEXT if all possible.
-
DATA.TEXT from a text field button always comes in on port 1. If you set the string output for a button (G3 style), that follows the port properly, but not the text fields from keypad or keyboard pages. If you need to distinguish messages from various ports, you have to rename your text field button and parse according to the name, not the port.
-
Dear Dave:
Thank you for that info. That is what I had to try to use DATA.TEXT. It worked great. Thank you.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums