You now have rotation or movement coupled with drawing. That means
a. You cannot draw a piece two times at the same place. Eg "show the next piece" is non-trivial.
b. You use post-increment, so you draw a block at (x1, y1), and internally its position is (x1, y1+1). That's confusing during debugging. (could be solved by doingpre-increments if you want).
c. Movement down must be done at drawing.
d. Rotation must be done at drawing.
The result of the latter two is your question, I think. "How to handle rotation while drawing, since I cannot rotate a piece without drawing it". (To see, answer the question "why can't I rotate the piece in the keyboard handler?" for yourself, another one to ponder about is "would that be better than I have now?" (this is a difficult one).)
There are 2 ways out.
1. Move the keyboard information to the drawing routine (your question and my first answer).
2. Decouple rotation from drawing, so you can rotate without drawing it. (ie make it possible to rotate in the keyboard handler.)
In the second item, if you can rotate without drawing, it makes sense to also remove the move-down side-effect from the drawing code as well, as it increases orthogonality and predictability of the functions.
Trying it is often a good strategy if you cannot vision whether something works, or how. The only downside is that it costs time, but that may not be a big problem.