The leonardo board is different from other Arduino boards, because it uses a different processor with build in USB interface.
So when i developed my program evrything went fine when using the arduino environment with its serial monitor. But when i wanted to used another serial interface program (puttty), i only received txt but could not enter any text/commands.
After some hard work i found out that the serial monitor in the arduino works different from what i expected. In the code, i tested for a newline (/n) but it never came into the serial buffer. Instead if tested for (/r) the code works 🙂