Difficult communication with processing

I have executed your program, and I see that the Serial Monitor is showing continuously characters A, B, C, ... without having any key/button pressed down.

Figure-1: Example of PUSH and ON/OFF heys

You need to look at the following things in order to define the initial states of your buttons/keys.

1. K1 in Fig-1 is the schematic of a PUSH key or sometimes called Spring Return Key. It is normally an open condition key. You press it, it will get closed; you release it, it will get opened. To define the initial state (button is not closed), you need to make an arrangement with necessary external pull-up/pull-down resistor so that the button state remains at LL-state.

2. K2 in Fig-1 is the schematic of an ON/OFF key or sometimes called Latched Key. It is normally an open condition key. You press it, it gets closed and remains in closed condition until you open it.