I do this virtually with a piece od software called barrier. https://github.com/debauchee/barrier
https://github.com/input-leap/input-leap
Also recently learned about waynergy as a upcoming wayland client. Haven't used either yet as barrier still handles my setup.