How does one detect ENTER/BACKSPACE keys in Android?

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.

Anyone know how to detect these key inputs?

Thanks in advance

I understand you already have tested this, but what is your output when you run this code?
(I’m using APDE)

void draw(){} // mandatory

void mousePressed(){

void keyPressed(){
  println("keyCode = "+keyCode); 
  if(keyCode == 67) println("Backspace"); 
  if(keyCode == 66) println("Enter"); 

Here is my output:

keyCode = 66
keyCode = 67

So, what do you actually need more?

Oh sorry I figured it out but forgot to mark it as soloution