Control of motor on Keypress of keyboard

The Arduino has no problem detecting incoming characters with or without CR or LF.

So your question is how to do this on a PC.
The serial monitor of the Arduino IDE requires to press the 'Enter' key.
Also many serial terminal programs are used this way.

You could write a very simple program yourself for the PC.
There are also many scripted languages for such a program on the PC.

Perhaps someone else knows a ready-to-use solution ?