Announcement

Collapse
No announcement yet.

Keyboard widget key presses not registering correctly

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

  • Keyboard widget key presses not registering correctly

    I've created a custom keyboard - basically, it's a variation on the in-built numeric pad - with keys 40x40. When running on the 4Duino, some of the key presses are detected correctly, and some will only detect a press if I do so on it's bottom edge or bottom right corner, not in the centre.

    I've done a touch screen calibration which worked successfully (so it told me) but actually, that made it worse! Before, the keys I can only touch in the bottom right corner used to be anywhere on the bottom edge.

    Any other widgets that have had touch enabled prior to displaying the keyboard, have touch disabled when the keyboard is displayed. I've actually tried it so the application only displays the keyboard at startup.

    Is there anything I can do to improve this besides disabling touch on all keys and creating 'hot spots' above them?

  • #2
    Hello Andrew,

    Please try to load TOUCHTESTDRAW.4DG to check if the screen is faulty. You could look under C:\Users\Public\Documents\4D Labs\Picaso Designer\PICASO - TOUCH SCREEN to find the test program. Also, please post photos of the result if possible.

    In addition, please post your 4Duino project here for us to find the cause of the key presses not registering correctly. You could also send your project via email if it is confidential: sherwin.macabio at 4dsystems dot com dot au

    Thanks and regards,
    Sherwin
    Last edited by sherwin4D; 18 March 2020, 04:39 PM.

    Comment


    • #3
      Thanks Sherwin, I've sent you an email.

      Comment


      • sherwin4D
        sherwin4D commented
        Editing a comment
        Hello Andrew,

        I have not receive an email from you, yet. Could you please make sure you're sending the project file to the correct address?

        Thanks and regards,
        Sherwin

    • #4
      Hi Sherwin. I missed off the dot au but have tried again. Hopefully correctly this time. I continued trying yesterday but with no luck. Even after commenting out all code except that for the keyboard it still misinterpreted touch positions. I don't know how the dat file works in relation to touch position recognition, but it's almost like the offsets in the dat file have drifted by the time it gets to encoding the keyboard. As I say, in the additional KeyboardTest project, it works fine but it's the only widget used.

      Comment


      • #5
        Hi Sherwin,

        did the email get through this time?

        Comment


        • #6
          Ok, I've resolved the problem. It would appear that even if an image is not (even ever!) displayed on the screen it is still active and thus capable of being touched! So if it is in the data file it can be touched - which is why it still didn't work properly when only the keyboard code was running and everything else in the application was commented out: although the application made zero reference to other widgets, they were still in the data file.

          Also, the code that is automatically generated for some widgets to enable the touch - clearAttributes... - is actually not needed because all widgets are enabled automatically at app start (with the possible exception of videos.) It's only needed if setAttributes... is run to turn off touch for a widget if you need touch re-enabling. This misled me to think that in order for a widget to be 'touchable' it had to have that clearAttributes function run on it before showing (at least once.)

          Osmosis programming!

          Comment


          • sherwin4D
            sherwin4D commented
            Editing a comment
            Hello Andrew,

            Thanks for the update. Glad to hear you've managed to resolve the problem.

            BR,
            Sherwin
            Last edited by sherwin4D; 18 May 2020, 10:02 AM.
        Working...
        X