DATA_EVENT from Keypad on Port 2?
yuri
Posts: 861
I want to capture a DATA_EVENT from the onboard keypad on a different port...
At this time I only get the "KEYP-" return from the keypad on port 1 (10001:1:1), but a module I'm writing uses port 2 (10001:2:1).
Has anyone ever dealt with this before?
At this time I only get the "KEYP-" return from the keypad on port 1 (10001:1:1), but a module I'm writing uses port 2 (10001:2:1).
Has anyone ever dealt with this before?
0
Comments
Try reading through this thread. Your problem is addressed near the middle of the first page.
http://amxforums.com/showthread.php?t=426
HTH
You could setup the buttons on the keypad to 'string output' on whatever port you wish and then look for the text there.
In TPD4 it's in the Button_Properties- Programming - string Output Port.
Then set the button's string output to be whatever. example: Button text 'A; = string output 'keypad-A'
What purpose does the built-in keypad serve at that point?
Or am I missing the point?
I use the work around that Marc Scheibein purposed in the thread I posted above but my ears are always open for new ideas.
What Joe says is true. I wrote a little module myself that has its own keyboard and keypad for just such a reason.
I've oft thought a good work around for the whole keypad/board thing would be to simply send the keyp or keyb command to the device : port you want to and the TP would then know to send the data back on that port. Too bad...
edit note: That's funny. When I origianlly typed device : port I didn't include a space between them and look what happens: device:port
I've never actually done the variable tracking but it's just as simple depending on where the keypads are pop up. If you're popping it up in a module then you'll need to pass this variable in where as the re-name keypad you won't need to do anything except trap the name in the data event.
There are off course several work-arounds for this problem, i just wanted to know if there wasn't any option to get the TP to return the data on port 2 (would have been the most easy solution )