RockPi 4 B as both host and peripheral

I am rather ignorant about how how to hack an SBC, so apologies in advance if the terminology I am using is incorrect. I want to connect keyboard to my rock pi 4 B and have the rock pi 4 also connected to my PC. I want shortcuts captured on my keyboard to report as HiD events on my PC similar to what is happening here:-

Is this feasible? Can you make one usb port on this device act as a peripheral and the other usb ports to act as ports? If so, can someone direct me to documentation that describes how?