Remote Keyboard & Mouse



Turn your Android device into a Bluetooth Remote Keyboard and Mouse! Mouse Ripple: wakes up a computer optical mouse. Prevents a computer screen lock by simulating the movement of an optical mouse. Transform your phone into a remote controller for PC/Mac/TV/DLNA devices. Remote typing is fun, but it’s a bit impractical. When you’re typing into a system, it generally helps to see the output too. My next step is to capture HDMI output from the target computer and embed it in Key Mime Pi’s web interface. It simulates the function of wireless mouse, keyboard and touchpad, also provides a variety of specialty control panels, such as Media Remote, Application Switcher and Web Browsing Remote, which. How to use Remote Play on a 5.05 PS4 and use your keyboard and mouse as a PS4 controller to play your PS4 games.This Video was Sponsored by Ridge Wallet:http.

  1. My Wireless Keyboard Isn't Working
  2. Remote Keyboard Mouse Long Distance
  • Control at Your Fingertips

    Turn your mobile phone or tablet into a set of wireless mouse, keyboard and trackpad.

    Get Now

    Step 1. Download Remote Mouse app

    IPHONE IPAD
    ANDROID ANDROID (APK)

    Step 2. Install Remote Mouse server on your computer

    MAC MAC (DMG)
    WINDOWS LINUX

    Step 3. Connect your mobile device and computer to the same Wi-Fi. Then you are ready to go!

Control made simple. It's a perfect combination of 3 most common remote control devices. With smarter multi-touch gestures, all you need is to click and slide.

KeyboardGet Now

Step 1. Download Remote Mouse app

IPHONE IPAD
ANDROID ANDROID (APK)

Step 2. Install Remote Mouse server on your computer

MAC MAC (DMG)
WINDOWS LINUX

Step 3. Connect your mobile device and computer to the same Wi-Fi. Then you are ready to go!

Watching videos in bed? Filling house with music? Or making a self-running presentation? Remote Mouse allows you to control your computer freely at anywhere and at any time.

Get Now

Step 1. Download Remote Mouse app

IPHONE IPAD
ANDROID ANDROID (APK)

Step 2. Install Remote Mouse server on your computer

MAC MAC (DMG)
WINDOWS LINUX

Step 3. Connect your mobile device and computer to the same Wi-Fi. Then you are ready to go!

Power Options

Shut down, restart, log off or put computer to sleep in one click.

Application Remote

Quickly launch and switch between applications. A convenient show desktop button is also provided.

Gyroscope Mouse

Move the mouse cursor by waving your phone in the air - a beautiful use of the gyroscope and accelerometer feature on mobile device.

Customizable UI

Choose to turn on the features you wanted, or turn off the features unwanted. Customize the most suitable user interface for yourself.

Voice Typing

Integrated with iOS and Android's speech recognition. Simply type on a computer by clicking the voice button and speaking to your phone.

Volume Button Remote

Use the physical volume buttons on mobile device to adjust computer volume or change presentation slides.

  • Supports iOS, Android, Windows, Mac OS and Linux. You can enjoy a consistent user experience on any of your devices.

    Get Now

    Step 1. Download Remote Mouse app

    IPHONE IPAD
    ANDROID ANDROID (APK)

    Step 2. Install Remote Mouse server on your computer

    MAC MAC (DMG)
    WINDOWS LINUX

    Step 3. Connect your mobile device and computer to the same Wi-Fi. Then you are ready to go!

People Remote Mouse

  • I use my computer as my tv most of the time so it's hooked up via hdmi under my tv and now I can sit on the couch and control my computer. I paid for the app because it said that I would get more options but I'm not sure what more it does. I don't care all that much though because it's a great app!!!

  • Can't wait to see what the update will hold. Does exactly what it says. Wireless keyboard and mouse for your computer off your phone. Worth the money to me. Girlfriend thinks otherwise. Lol

  • 以前はGoogleドキュメントで音声入力して作成したものをworldに貼り付けていましたが、このアプリは直接音声入力できます。変換精度も高く重宝しています。

  • What an absolute gem! Now I have a remote whilst watching films on my laptop via HD cable linked to large tv, very lazy I know but hey we all should take the opportunity. Great for presentational purposes or even playing poltergeist tricks on the family tee hee! Love it, buy it and enjoy!

  • Very simple to set up, works brilliant and comes in very handy for when laptop is plugged into tv.

  • This app is amazing! It is so easy to set up and with a couple of hours practice getting used to it, u can use it faster than a mouse and keyboard. It's great if u are using a television screen as a monitor so u can sit back on ur bed or sofa and just comfortably chill! Really good app, totally worth buying! Also if u can't find ur wireless keyboard or mouse, u can just whack ur phone or iPod out and it saves a lot of time

  • News & Tips

    News on the latest features, tips to improve your experience, and occasionally discussion on improvements and new functions.

    Visit

    News & Tips

    News on the latest features, tips to improve your experience, and occasionally discussion on improvements and new functions.

    Visit

Recent versions of the Raspberry Pi support USB on-the-go (USB OTG), which allows them to impersonate USB devices such as keyboards, thumb drives, and microphones. To take advantage of this, I made an open-source web app that turns my Pi into a fake keyboard. I call it Key Mime Pi.

Windows

My Wireless Keyboard Isn't Working

This post demonstrates how Key Mime Pi works and how you can build one for yourself.

Demo 🔗︎

What you’ll need 🔗︎

Remote Keyboard & Mouse
  • A Raspberry Pi that supports USB OTG:
    • Raspberry Pi 4 (all variants)
    • Raspberry Pi A and A+ (verification needed)
      • This source claims that early Pis support USB OTG, but I have not tested these devices personally.
  • Raspberry Pi OS (aka Raspbian)
    • Stretch or later
  • A USB cable
    • For the Pi 4: USB-C to USB-A (Male/Male)
    • For the Pi Zero W: Micro-USB to USB-A (Male/Male)

Install Raspberry Pi OS Lite 🔗︎

To begin, install Raspberry Pi OS lite (formerly known as Raspbian) on a microSD card.

Enable SSH access by placing a file called ssh on the microSD’s boot partition, and insert the microSD card into your Pi device. If you’re connecting over wireless, you’ll also need to create a wpa_supplicant.conf file on the boot partition.

Connecting your Pi 🔗︎

Connect the USB cable to your Pi’s USB OTG port. On the Pi 4, this is the USB-C port. For the Pi Zero, it’s the Micro-USB port labeled “USB.”

Connect the other end of the USB cable to the computer that you want to connect to as a keyboard. USB 3.0 ports work better because they output more power, but all the USB 2.0 ports I tested worked fine as well.

Your Pi should draw power from the computer’s USB port and power up.

Install Key Mime Pi 🔗︎

You have two options for installing Key Mime Pi. You can do it using plain old bash, which requires no external tools. Or, for a touch of class, install it via Ansible, my favorite open source configuration management tool.

Option 1: The pure bash way 🔗︎

From a bash shell, enter the following commands to connect to your Pi and configure it for USB device emulation:

Allow the Pi to reboot, then SSH in again and start the Key Mime Pi web server:

Option 2: The Ansible way 🔗︎

If you’re an Ansible user, you can use my Key Mime Pi Ansible role for better automation. The following commands install Key Mime Pi on your device as a systemd service:

Using Key Mime Pi 🔗︎

After you run the install script, Key Mime Pi will be available at:

Its interface looks like this:

And like, magic, when you type into your browser, the keys will appear on the machine connected to the Pi.

How it works 🔗︎

Remote Keyboard & Mouse

USB device emulation 🔗︎

The real magic here comes from Linux’s USB Human Interface Device (HID) gadget driver. It allows user-mode applications to interact with the operating system as if they were USB devices.

The key-mime-pi configuration script creates a file path at /dev/hidg0. Any program can read or write to this path, and the OS translates the data to keyboard signals.

To mimic a keyboard, the Pi has to communicate with the OS according to the USB HID spec. At 97 pages of keycodes and tables, that document is a bit of a slog, but it turns out that the protocol for keyboards is dead simple.

Remote Keyboard Mouse Long Distance

Upon each keystroke, the keyboard sends an 8-byte message called a “report.”

Byte IndexPurpose
0Modifier keys (Ctrl, Alt, Shift)
1Reserved for manufacturers
2Key #1
3Key #2
4Key #3
5Key #4
6Key #5
7Key #6

Sending the keys for “Hi” looks like this:

In addition to signalling key presses, keyboards must also indicate key releases. An 8-byte block of zeroes indicates that no keys are active.

Remote Keyboard & Mouse

The above example sent one keystroke at a time, but HID reports have space for six keys. This means you can send up to six keystrokes in a single message as long as they’re distinct keys:

Translating from JavaScript to HID 🔗︎

When you type into a browser window, JavaScript generates events for each keystroke. The website keycode.info provides an excellent demonstration of this functionality in action.

JavaScript key events include keycodes, but they’re distinct from HID keycodes. Fortunately, there’s a mostly 1:1 mapping between the two. To translate from JavaScript to HID, I created a lookup table like this:

The Key Mime Pi server listens for JavaScript keycode events from the browser, translates them into HID codes, then sends them to the Pi’s HID interface at /dev/hidg0.

Here’s how it works from end to end:

  1. A user hits a key in the browser.
  2. JavaScript on the page sends the JavaScript keycode to the Key Mime Pi server on the Pi.
  3. The Key Mime Pi server translates the JavaScript keycode to its equivalent HID code.
  4. The Key Mime Pi server sends the HID code to the USB gadget interface at /dev/hidg0.
  5. The computer connected to the Pi’s USB cable receives this as keyboard input, causing a character to appear on the screen.

The power problem 🔗︎

In my tests, USB ports from computers produced enough electricity to power the Pi, but under-voltage warnings appeared frequently in the system log:

The Pi was correctly detecting that standard USB 2.0 and USB 3.0 ports provide insufficient power to meet the Pi’s requirements.

Raspberry Pi ModelPower requirements
Pi Zero W5 V / 1.2 A
Pi 45 V / 3.0 A

Standard USB ports come up short:

USB Port TypePower output
USB 2.05 V / 0.5 A
USB 3.05 V / 0.9 A

I currently am still searching for a solution tot his problem. Here are some possible solutions I have not yet tested:

  • Use a PoE HAT to draw power from the Ethernet port
  • Use the Zero2Go Power Adaptor to connect an AC to microUSB adaptor.

Troubleshooting 🔗︎

Verifying the driver is working 🔗︎

If Key Mime Pi fails to forward keystrokes to the target machine, the first step is to determine whether the USB gadget is working properly.

Try the following commands:

If everything is working, you should see the following output on the machine the Pi is connected to via USB:

Writes to HID interface hang 🔗︎

When testing Key Mime Pi on the Pi Zero W, I ran into a case where writes to /dev/hidg0 hung indefinitely. I tried a different Micro-USB to USB-A cable, and the problem went away. I suspect that the first cable was either damaged or supported power only and not data. If you run into hanging writes to /dev/hidg0, try a USB cable that supports data transfer (most USB cables do).

Next step: embedding display output 🔗︎

Remote typing is fun, but it’s a bit impractical. When you’re typing into a system, it generally helps to see the output too.

My next step is to capture HDMI output from the target computer and embed it in Key Mime Pi’s web interface. That way, I’ll be able to plug my Pi into a headless server and have a virtual console in the browser. It will essentially be a low-cost, hackable KVM over IP device.

I have a working prototype using ffplay and an HDMI extender, but I’m still working on a solution that puts everything in a single browser window with low latency.

Want a pre-configured kit? 🔗︎

Update: June 29, 2020

I now have a working solution that both captures video output from a target device and allows you to send keystrokes, all within a browser window.

A detailed follow-up post is coming soon, but in the meantime, you can pre-order pre-configured KVM Pi kits that include everything you need to build your own KVM Pi:

Source code 🔗︎

Key Mime Pi’s code is fully open source under the permissive MIT license:

  • key-mime-pi: Web server that forwards keystrokes to the Pi’s virtual keyboard.
  • ansible-role-key-mime-pi: The Ansible role for configuring the Pi’s USB gadget functionality and for installing the web server as a systemd service.

Acknowledgments 🔗︎

  • raspberrypisig/pizero-usb-hid-keyboard was the first sample code I found that successfully installed the virtual USB HID device on my Pi.
  • Fmstrat/diy-ipmi was an inspiration for this project and proved that it was possible to make a Pi function as a KVM over IP.
  • Rafael Medina provided the most readable explanation of the HID protocol I found.
  • Thanks to the Linux and Raspberry Pi OS developers who made USB gadget functionality possible.

Be the first to know when I post cool stuff

Subscribe to get my latest posts by email.

Thanks for signing up! Check your email to confirm your subscription.

Please enable JavaScript to view comments.