Announcement

Collapse
No announcement yet.

kb keyboard doesn't show all the keys in the down color.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kb keyboard doesn't show all the keys in the down color.

    Hello,
    I have a question about the use of the KB custom keyboard. I can't understand why it is not displaying the depressed color when some of the keys are pressed. I have set up all the keys to display the same color when the keys are pressed. For some reason the right column numbers 3, 6, and 9 don't change colors, but they do work like the others as far as function with the KB handler. I've tried to refresh the state of the keyboard in various places in the program, but nothing changes. Do you have any ideas I can try?

    Thanks for your help,
    Mark

  • #2


    Can you zip up and attach your project so we can see the issue a bit more easily?
    Mark

    Comment


    • #3


      Hello,

      This issue has cropped up again, I have 2 keyboards that I call up at different times and one of them, the yellow one, doesn't show the down color. Instead it shifts the key to the right a tiny bit while the key is being held and then comes back up when released. I set both of the keyboards up the same way.

      if(state == TOUCH_PRESSED)

      if ((n >= iKeyboard1) && (n = iKeyboard2) && (n

      Comment


      • #4


        Can you send me a smaller demo that shows the issue (i.e. including the keyboards themselves, use zip project)?

        If you send the full project I might need 'directions'.

        Email it to mark at 4dsystems dot com dot au if you don't want to post it.
        Mark

        Comment


        • #5


          I created a smaller version of what I am trying to achieve. Basically I want to be able to change the color of a keyboard by pressing a button. In the full version, the calling program will provide the code that will tell the called program what color it should be. I am trying to do this by creating 2 identical keyboards and depending on the value of a variable, the right keyboard will appear. I want to be able to change the color back and forth. In the example, I have used buttons to change the color. So far I have only been able to change the color in one direction. I have attached a copy so that you might be able to offer any suggestions.

          Thank you,

          Mark Attached files Keyboard_Colr_Chg.zip (93.3 KB)

          Comment


          • #6


            Hmm, at the start you need to set which keyboard is active, as by letting it start at 0 it's all in a bit of a no man's land.

            keyboard := 1 ;

            Also, you have left touch enabled for all the keys on both keyboards, so, at the start the best thing to do is disable one keyboard as you enable it for touch, carrying on from the above, that would be this

            for (i := iKeyboard2+1; i
            Mark

            Comment


            • #7


              Perfect !!, just what I wanted. I am confused by something though, when I enable/disable an image like this:

              for (i := iKeyboard2+1; i

              Comment


              • #8


                You can disable/enable an image control entry and you can disable the ability of an image control entry to be detected by touch.

                By default Images in image control entries are enabled for touch and videos are disabled for touch.

                A keyboard is made up of an image (iKeyboard2) and videos (iKeyboard2+1 -> iKeyboard2+oKeyboard2[KbButtons] ) for each key. (There is a video frame for each state for a key, usually up, up touched, down and down touched).

                So the keys need to be enabled for touch (the do once code), they also have stayontop set so they will be detected before the underlying keyboard image.

                The keys on each keyboard need to be disabled so that they can be detected when the desired keyboard is in use.

                HTH
                Mark

                Comment

                Working...
                X