Arduino UNO R4 Minima - I can send keystrokes, or I can control a stepper motor. But I can't do both things in the same sketch

I succeeded in a last ditch attempt. Two quick pressures on the reset button restored the capability to upload. Now I can safely state that I don't get any other character than chr(10) when calling Keyboard.releaseAll().
Thanks to your advice, I restructured the loop as needed. If I get that character or any other meaningless character, nothing happens.
Now, with a working loop and rock-solid "if's", we are back where we started.
The same commands, stepper.moveTo() and stepper.Run() that work flawlessly, cease to work as soon as i include Keyboard.h and add the lines related with that library (Keyboard.begin() etc...).

The documentation doesn't help: Keyboard - Arduino Reference

To control the stepper motor, I use the 4, 5, 6 and 7 digital pins. May some contraindication be there, e.g., the keyboard library grabbing control of those same pins (excuse my english!) ?