Home AMX User Forum NetLinx Studio

How to work with 2 keyboards screens?

adysadys Posts: 395
Hi all

I am trying to add one more keyboard screen, but from what I understand the keyboard works only on port 1, and I already have one _keyboard screen that uses it.
How can I do it?
this is the keyboard screen of the module autonomic MCS, so I can't write it as I want.

thanks,

Ady.

Comments

  • viningvining Posts: 4,368
    You can have multiple keyboards or keypads on port 1 by copying the keyboard/pad and giving it a new name. The name will preface the the string going to the TPs data_event. In your TP's data_event handler just look for the keyboard's name and then process accordingly.
     SELECT
    	       {
    	       ACTIVE(find_string(DATA.TEXT,"'_keyboard-'",1)): 
    		    {
    		    //
    		    }
    	       ACTIVE(find_string(DATA.TEXT,"'_keyboard_1-'",1)): 
    		    {
    		    //
    		    }
    	       ACTIVE(find_string(DATA.TEXT,"'_keyboard_2-'",1)): 
    		    {
    		    //
    		    }
    	       ACTIVE(find_string(DATA.TEXT,"'_keyboard_3-'",1)): 
    		    {
    		    //
    		    }
    

    If you want a keyboard on a different port then you need to copy or create a keyboard and change the buttons port/channels to what ever floats your boat and then create a standard button_event handler to handle pushes.
  • adysadys Posts: 395
    Ok I will use only one keyboard.

    What I don't understand, how to take the string that coming from the keyboard?
    the name of the editline is KEYB-
    address code is
    Keyboard: Text Area -single line


    The field contain what I write, but how the code take it?

    I have this code in the module:

    string:
    {
    char sKB[128]

    send_string 0,data.text

    if ((left_string (data.text,5) = "'KEYB-'" || left_string (data.text,5) = "'KEYP-'" ) && find_string(data.text,'ABORT',1)==0 && giKB<>0)


    But I don't get to the string event at all..
    My tp channel port is 50, and this one sits on 1... what a mess

    I changed the Channel port to 50, not working...
  • adysadys Posts: 395
    Ok got it

    I am listening to the X:1:0 and now it working.
    Kind of a patch but working...
Sign In or Register to comment.