OK no sorry, just me being a fool I don't need this functionality at all
character += String.format("%s", KeyEvent.getKeyText(event.getKeyCode()));
textArea.setText(character);
because I'm typing inside the textArea so no need to copy character by character. Now I need to change the background color of the corresponding key on the virtual keyboard, will post when that's done, sorry, got a little confused