Before I begin, here is a link to my current code: My Code
Okay so: I am porting my Processing Java project to my Android phone (S7 Edge). Normally, I’d use if (key == ENTER) in void keyPressed to detect the Enter key being pressed (on a wireless keyboard: Logitech K380), however when I ran it on my phone it did not work as planned. Same goes for the BACKSPACE key. The code is a queue manager (This is what I like to call a school project taken too far), so the Enter and Backspace keys are crucial. I tried many ways to figure this out, like printing the key to the console, and LOTS of Google searching, with no luck sadly.
I tested the same code on my Samsung tablet E 9.6 Kitkat 4.4 and it gave the error you mentioned.
I installed the Hacker’s keyboard (Play Store) and the code did run correctly again.
I was not able to find a workaround.
Be aware that keyCodes for Java and Android are different. So if you need your sketch to run correctly in Android and in Java (for testing purposes) you can use both codes. For example if you want to use the ENTER key in Java and Android you can change the line
if (keyCode == 66) { /ENTER
to be:
if (keyCode == 66 || keyCode==10) { //ENTER for Android or Java