Hello everyone,
I have recently bought an Elegoo UNO R3, and I had a little project consisting in a PIR movement sensor that would have made the board acting as pressing a keyboard character.
As long as the Elegoo Uno has an ATmega16U2 chip like the official Arduino Uno, you can do that.
However, this is a fairly complex process that poses higher than normal risk that you'll "brick" your Uno. Your project will be much easier if you just buy an Arduino board with native USB like the Leonardo, Pro Micro, Micro, etc. That said, I'm sure with care and perseverance you can achieve your goal with the Uno and learn a lot along the way.