Home AMX User Forum NetLinx Studio

Keyboard in TP

Hi all

I am trying to create a simple password screen ( I know I have it build in but I need to use our skin)

I looked at the keyboard implementation in the MAX ui module and duplicated the screen.
It works on the system keyboard mechanizm on port 1 only.

Also, the code open it with this command:

SEND_COMMAND Panel, "'@AKB-;Enter System Password:'" // Ask for new name

Now I don't undestand, how it know what screen to open?
the screen name is _keyboard.

is this mean I can have only one keyboard in my project?

I don't understand..


Does anybody have a simpel idea on creating a simple password screen?

Thanks

Ady.

Comments

  • davidvdavidv Posts: 90
    Custom keyboard

    Why dont you create a popup page that looks like a keyboard or number pad. Create buttons for each letter or number. Have a stored password as a char variable in define start or create a password set button and have the customer set it on the panel. Once the password is set you would just have each key on the popup page equal a value and if the values added together equal the stored password then you can perfrom your desired function. Be sure to have a different channel code for each key.

    does this help?
  • Jeff BJeff B Posts: 37
    Just use the onboard keyboard and use your own skin. I have done this several times. From the "FILE" drop down menu select Import Touch Panel Template. Select and copy the keyboard to your project. Now you can skin it as you wish.

    Take a look at the attached keypad I skinned. Also attached is a quick and dirty skin of a keyboard, for color matching only.

    JB
  • Hi. I add to my TP4 project the popup __keyboard from system files. But when I push DONE, where can I find the text result?
    Thanks a lot
    alessandro
  • ericmedleyericmedley Posts: 4,177
    eddymouse wrote: »
    Hi. I add to my TP4 project the popup __keyboard from system files. But when I push DONE, where can I find the text result?
    Thanks a lot
    alessandro

    Are you doing a data_event on the TP? If it's the same keyboard as the system keyboard it'll show up as a data_event.
  • OK!
    I see the message on string on data_event. But Only on port 1? Can I receive the string on other port? How?
    Thanks
    Alessandro
  • adysadys Posts: 395
    Thanks

    I found out where the __keypad is hiding.

    I copied it to the project and in the name _keypad (it changed automaticly)

    I changed it just for a check, and I can see that when puttin password protection in the TPDesign button property, it still bring me the general system dialog and not the new one.

    What should I do?

    Thanks

    Ady.
  • Jeff BJeff B Posts: 37
    The internal touch panel keyboard sends "KEYB-text" to the master.

    You can look for this with:

    Char sTEXT[100]

    Data_Event[dvTP]
    {
    String:
    {
    Local Var CHAR sTRASH

    sTEXT=DATA.TEXT
    IF(Find_String(sTEXT,'B-',1))
    {
    sTRASH=REMOVE_STRING(sTEXT,'B-',1) // Text you want remains
    }
    }
    }


    JB
  • Jeff BJeff B Posts: 37
    eddymouse wrote: »
    OK!
    I see the message on string on data_event. But Only on port 1? Can I receive the string on other port? How?
    Thanks
    Alessandro

    Only works on port 1.

    JB
  • adysadys Posts: 395
    Thanks Jeff

    I managed to open the popup in the code with the AKEYP- commnad and to get the text with the data event.

    So simple, but didn't find any implementation for this anywhere... I found an example indisde the MAX UI module.
  • ericmedleyericmedley Posts: 4,177
    Could you not just make your own keyboard with your own buttons and create the string in the program? That way you'd not need to mess with the whole 'which port is this coming down' thing.
  • annuelloannuello Posts: 294
    Something I discovered the other day that there is an undocumented 'PKEYB' command which shows a full QWERTY keyboard but obscures your entry using little dots, just like the 'PKEYP' command. (Good for when people are looking over your shoulder.)

    I couldn't find 'PKEYB' in the docs anywhere, but it works on my CV7 (v2.72.6). I'm guessing that all G4 panels have this command built in. (To AMX - can someone please add 'PKEYB' to the online AMX-PI documentation?)

    I just thought someone may be interested in this tip, in case they are creating a password entry page.

    Yours,
    Roger McLean
    Swinburne University
  • Jeff BJeff B Posts: 37
    annuello wrote: »
    Something I discovered the other day that there is an undocumented 'PKEYB' command which shows a full QWERTY keyboard but obscures your entry using little dots, just like the 'PKEYP' command. (Good for when people are looking over your shoulder.)

    I couldn't find 'PKEYB' in the docs anywhere, but it works on my CV7 (v2.72.6). I'm guessing that all G4 panels have this command built in. (To AMX - can someone please add 'PKEYB' to the online AMX-PI documentation?)

    I just thought someone may be interested in this tip, in case they are creating a password entry page.

    Yours,
    Roger McLean
    Swinburne University


    I found PKEYB all over AMX-PI, as well as @PKP, @PKB. Most of these commands have been available from the beginning.
  • annuelloannuello Posts: 294
    Jeff B wrote: »
    I found PKEYB all over AMX-PI, as well as @PKP, @PKB. Most of these commands have been available from the beginning.

    Well that's odd - I still can't find 'PKEYB' in the online AMX-PI (using it's built-in search). 'PKEYP' certainly gets numerous hits, but there is not a single hit for 'PKEYB'. I'm getting the same results for '@PKB' vs '@PKP'. Which panels have the keyboard (not keypad) listed?

    Roger.
  • Jeff BJeff B Posts: 37
    You are right. The commands are not indexed. Just take some time and read all the commands available for any Modero touch panel. Very rich command set. I have used the @sho command many times.

    JB
  • annuello wrote: »
    Something I discovered the other day that there is an undocumented 'PKEYB' command which shows a full QWERTY keyboard but obscures your entry using little dots, just like the 'PKEYP' command. (Good for when people are looking over your shoulder.)

    You can also do something similar in TPD4 by selecting the button used to display the text and under the 'general' tab enter a * in the 'password character' field. What this does is displays a * instead of the value when a key is pressed, e.g. 1234 would appear **** instead.


    --John
Sign In or Register to comment.