Processing Sketches Have Messed Up Keyboards

edited January 8 in Android Mode

Hey all! So I've been struggling for a while with the android virtual keyboard where it'll be messed up completely across ALL processing sketches installed on the device. Even though the keyboard messes up inside the sketches it works perfectly fine in other applications. I've had these keyboard issues:

  1. The bottom row of buttons (ENTER, SPACE, Comma, Fullstop... etc.) are completely missing and there is just space instead. Attempting to tap this space will press the keys directly above.

  2. The keyboard opened is the original old classic phone keyboard similar to the phone dialer where there's three letters for each key.

It doesn't seem to matter what app is opened. As long as the app was created with processing the same issue occurs across them all. It can be fixed and returned back to normal temporarily by resetting the keyboard settings and history within the device's settings. It's also sometimes but rarely possible to restore it on a full app re-install. Obviously this is still an issue though. The amount of time it takes before the keyboard messes up appears to be random but I don't think it can change inside a session, only on the next opening. It's definitely possible I missed something but these are the main points at which I've noticed it messing up.

As for the code I'm using it's simply put just this:

void registerScreen() { if (!keyboard) { openKeyboard(); keyboard = true; } }

Which is located in the draw function. Any help, tips or ideas on how to solve it are very much appreciated! ;;) Thanks!


  • You need to post the code for openKeyboard() as well.


  • @kfrajer openKeyboard() I'm using is from the native processing for android api

  • Explore Install lib thru manager in Processing. I havent tested it in AM 4.0 but it should work.


  • @Night I just tried the example code at which seems to work fine. If you post all your code we can maybe try to help?

  • Hi @hudson_m4000,

    The whole project I think would be a lot to post here and considering the only time the keyboard ever is effected is the place in which I described I'm not sure it's fully necessary (Let me know if I'm just being ignorant though, apologies if I am :) ). The problem isn't one that is very persistent, the times at which the bug occurs appears to be completely random. When I first began experimenting with the android processing API and used the keyboard functions everything worked fine for quite a while without problems. Then one day an app that I installed on my phone during testing starting getting the error which had previously never shown any issues. I should mention again that it was across ALL android processing sketches (apps installed that were developed through processing), even one app which was the exact example from the reference linked. And, all other apps like Discord, Twitter, Messenger etc. had the normal keyboard. But, somehow all other devices installed the EXACT same APK package and didn't have any errors.

    Here are the imports I'm using if it helps in any way:


    import oscP5.*;

    import netP5.*;

    import android.view.inputmethod.InputMethodManager;

    import android.content.Context;

    import android.content.SharedPreferences;


    import android.preference.PreferenceManager;


    Kind regards, Night. :)

    Side note: Even though InputMethodManager is never used or referenced in the code is it possible that just importing this could mess up the keyboard? I don't understand how this would affect all processing applications installed on the phone though... most without the import entirely. :-/

  • Hey @kfrajer

    Thanks for the advice on using the library but I really want to find out if and why it isn't working with android processing. I don't think I should need to use another external library for this purpose. Thanks for the tip though! I am sure it is a viable solution and I've heard a lot about it!


  • If you post an MCVE, other people can report if they can reproduce the problem. If that is the case, one could open a ticket in github.


  • edited January 10

    @Night I will do some testing ....

    I have noticed that apps made with Processing stay running in background after they have been quit/closed. I'm looking for a solution to that, but may have some relevance??

    And just to clarify ... this is only happening on your phone and not on any other devices?

  • @hudson_m4000 This has also happened on other devices. Also just got a new random keyboard version where there are no keys at all... just the predictive text solutions.
    I took a screenshot of it this time: Sorry about the sizing don't know if there are functions for scaling it down on here. But, notice how the keyboard's background is stretched down the the size of the keyboard's window space. Those ellipses are supposed to be exact circles. This occurred after a fresh install from the computer processing "Run".

    Also have had where the keyboard is pretty much fine as usual except the suggested or predictive text at the top is completely gone.

  • Thanks for the advice @kfrajer I might do that after I get a good version of the project completed and post it for people to try. It's just... it also happens with other processing projects... so yeah sigh anyway we'll see. :)

Sign In or Register to comment.