Connect 2 computer to emulate mouse and Keyboard and manage from distance

Hi everyone,

I’d like to ask for your help and validation for a project I’m planning. I’m trying to control a restricted Windows PC (no admin rights, can’t install anything) using another computer as the keyboard and mouse.

So I want to Connect 2 computer to emulate mouse and Keyboard and manage from distance

**Here’s my setup:

Source computer:**

  • Device: MacBook Pro (2011)

  • OS: macOS

  • Permissions: Full control — I can install software, connect devices, use serial ports, etc.

Target computer

  • Device: Windows PC (work computer)

  • OS: Windows 10

  • Permissions: No admin access, I can’t install any software or drivers.

  • USB ports available

I want to be able to wake it up, type my password, and activate VPN remotely, maybe operate the whole computer.

My idea:

I want to use an Arduino Leonardo (or compatible board) as a bridge:

  • Connect the Arduino Leonardo to the target PC via USB, so it acts as a physical keyboard and mouse.

  • Connect the Arduino Leonardo to the Mac via USB for power and serial communication.

  • On the Mac I run Team viewer in Mac and use the mouse and the keyboard, activate the cam looking to the PC

  • The Leonardo reads those characters and translates them into mouse movements or keystrokes using the Mouse and Keyboard libraries and send them to the PC

What Arduino should I buy exactly?

My questions:

  1. Is this approach sound for controlling a PC without installing software?

  2. Will the Windows PC accept Leonardo as a HID device without admin rights?

  3. Are there tools you'd recommend on the Mac (e.g. Python script, Processing UI) to send Serial commands more comfortably?

  4. Would other boards like the RP2040 or Teensy offer better performance or flexibility?

  5. Can this setup wake the PC from sleep (via USB or keyboard emulation)?

Thanks in advance for any guidance, insights, or references!
I’d really appreciate any tips from people who’ve done something similar.

Cheers :folded_hands:

This is what Ia tells me to do but it has specific codes no free movement for keyboard and mouse:

#include <Mouse.h>
#include <Keyboard.h>

void setup() {
Serial.begin(9600);
Mouse.begin();
Keyboard.begin();
}

void loop() {
if (Serial.available()) {
char c = Serial.read();

// Mouse movement
if (c == 'w') Mouse.move(0, -10); // up
if (c == 's') Mouse.move(0, 10);  // down
if (c == 'a') Mouse.move(-10, 0); // left
if (c == 'd') Mouse.move(10, 0);  // right

// Mouse click
if (c == 'l') Mouse.click(MOUSE_LEFT);

// Typing
if (c == 'h') Keyboard.print("hello world");
if (c == 'e') Keyboard.press(KEY_RETURN); // enter

}
}

Please use the Tools/Auto Format function to make your code readable.

Perhaps I am missing something but without installing drivers I don't understand how you will get kbd and mouse commands to the PC.
Again, maybe I am misunderstanding something but you seem to have a lot of moving parts and more than is needed to get the job done.

If you have team viewer, why do you need anything else?

What is an uncomfortable Serial command send?

Are you asking how to hack an unknowing target?

1 Like

Check this link and see if it does what you want: https://maker.pro/arduino/projects/how-to-turn-an-arduino-into-a-keystroke-automation-tool

1 Like

PC has no software nor admin access to instal anything, with the MAC I want to control PC to sending commands trough Keyboard and mouse, Arduino will work as keyboard and mouse, but how do I control the MAC that will send command to Arduino to send them to PC?

From distance I will do it using team viewer in Mac since I can not install it in PC.

So imagine PC in front of MAC connected through Arduino, I open from a third computer in the distance team viewer to control MAC, when I control MAC´s mouse or keyboard it sends commands to Arduino and it sends them PC so … I can control PC.

is it possible?

Comfortable for me is no writing codes just press a key in MAC keyboard and it sends the same key command to Arduino and it sends it to PC.

make sense?

Thanks something like this might work for me to wake up PC, enter password and maybe open some windows.

It will not run without OS and applications.

If OS and apps exist, user can be granted privs to install software.

How do you imagine the Arduino gaining port access? The receiving computer must configure the port for receiving.

Not in the least. Three computers and a microcontroller to move a mouse?

If the mac is old enough to "boot from USB" and all you want to do is hack the mac, you can just create and boot to a LiveUSB Linux distribution.

Interesting idea but how will you know where and what the mouse is pointing at?

1 Like

Do the people who implemented this 'secure PC' setup, presumably for good reason, know your trying hack the setup so you can access the PC remotely ?

1 Like

In a word NO. If you have no access to the PC you can't connect any device that needs a driver.

with a web cam.

I have physical access but I can’t access to install software

I’m no trying to hack just control it from distance, Is my work to control it and work on it, I want t o do it from distance.

If I can travel the world and still work on it….Whats your idea?

it does have everything I can’t just install stuff. How come IA can understand it and you take it so literal, why would I ask something like this for an empty computer.

I use VNC viewer on my Mac to operate my Win11 PC but you have to be able to install the VNC Server on the windows PC first. Why can't you just ask your admin to install a VNC server on the win11 PC?

Use established, secure applications ubiquitous in tech services. Your idea is cloudy at best, thoroughly unsecure, and rife with points of failure.

Then why did you say (before) it has nothing?

For security reasons to keep khackers out.

IA does not understand "it" or anything. IA scrapes the internet for relevant keywords.

Because I know from decades of experience and answering impossible questions. You think I guess because you guess. You also think you just came up with this never-been-asked "idea"... which is asked many times a year... because of lack of research.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.