Skip to content

Controlling external device (RPi, server...) with a laptop

License

Notifications You must be signed in to change notification settings

Alexis-BX/laptop-passthrough

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardware

  • Arduino based on the 32U4 chip (recommended: Arduino Micro Pro)
  • USB to TTY
  • HDMI to USB capture card

Keyboard passthrough setup

Arduino setup

  1. Flash the file key_passthrough/key_passthrough.ino onto the Arduino.
  2. Unplug the Arduino.
  3. Connect the following:
Arduino USB-TTY
Pin 9 Tx
Pin 10 RX
GND GND
  1. Plug the USB-TTY into the laptop
  2. Plug the Arduino into the device to control

Laptop setup

Prerequisit: python 3.8

pip install pygame==2.5.2

Starting the passthrough

python3 passthrough.py [port]

The port argument is /dev/ttyUSB0 by default. test_ports.py can be used to help find the correct port.

Once the game window opens, select it and start typing!

Notes:

Video passthrough

VLC setup

  • Connect the capture card to the device by HDMI and to the laptop by USB.
  • Media -> Open Capture Device
  • Select Show more options
  • Caching: 0
  • MLR: dshow:https://
  • Edit Options: :dshow-vdev="USB Video" :dshow-adev= :dshow-aspect-ratio="16:9" :dshow-audio-samplerate=48000 :dshow-audio-channels=2 :live-caching=0 :dshow-fps=60 :dshow-size=1920x1080

Note: dshow-vdev may need to be adjusted, check the Video device name dropdown for exact name.

To open this automatically you can create a VLC shortcup with target: "C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:https:// :dshow-vdev="USB Video" :dshow-adev= :dshow-aspect-ratio="16:9" :dshow-audio-samplerate=48000 :dshow-audio-channels=2 :live-caching=0 :dshow-fps=60 :dshow-size=1920x1080 (example in Capture.lnk)

References

Original keyboard passthrough and inspiration: https://euer.krebsco.de/a-software-kvm-switch.html

About

Controlling external device (RPi, server...) with a laptop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 74.8%
  • C++ 25.2%