Git Product home page Git Product logo

key-mime-pi's Introduction

Key Mime Pi

CircleCI License

Deprecation

This project is now DEPRECATED. I'll accept pull requests, but I am no longer fixing bugs.

The replacement is a project called TinyPilot, which offers all the functionality of Key Mime Pi plus:

  • Video capture
  • Support for OS- and browser-captured keystrokes (e.g., Ctrl+Alt+Del, Ctrl+W)
  • Better stability

Overview

Use your Raspberry Pi as a remote-controlled keyboard that accepts keystrokes through a web browser.

Key Mime Pi screenshot

Compatibility

  • Raspberry Pi 4
  • Raspberry Pi Zero W

Pre-requisites

  • Raspberry Pi OS Stretch or later
  • git
  • pip
  • python3-venv

Quick Start

To begin, enable USB gadget support on the Pi by running the following commands:

sudo ./enable-usb-hid
sudo reboot

When the Pi reboots, run Key Mime Pi with the following commands:

python3 -m venv venv
. venv/bin/activate
pip install --requirement requirements.txt
PORT=8000 ./app/main.py

Key Mime Pi will be running in your browser at:

Ansible installation

From your Ansible control node, run the following commands:

PI_HOSTNAME="raspberrypi" # Change to your pi's hostname
PI_SSH_USERNAME="pi"      # Change to your Pi username

# Install the Key Mime Pi Ansible role
ansible-galaxy install mtlynch.keymimepi

# Create a minimal Ansible playbook to configure your Pi
echo "- hosts: $PI_HOSTNAME
  roles:
    - role: mtlynch.keymimepi" > install.yml

ansible-playbook \
  --inventory "$PI_HOSTNAME", \
  --user "$PI_SSH_USERNAME" \
  --ask-pass \
  --become \
  --become-method sudo \
  install.yml

ansible \
  "$PI_HOSTNAME" \
  -m reboot \
  --inventory "$PI_HOSTNAME", \
  --user "$PI_SSH_USERNAME" \
  --ask-pass \
  --become \
  --become-method sudo

You should be able to access Key Mime Pi through a web browser at:

Development Installation

If you're interesting in contributing to Key Mime Pi, follow these instructions to install the required developer packages in your development environment:

python3 -m venv venv
. venv/bin/activate
pip install --requirement requirements.txt
pip install --requirement dev_requirements.txt
hooks/enable_hooks

To run Key Mime Pi's build scripts, run:

./build

To enable Key Mime Pi's Git hooks, run:

./hooks/enable_hooks

Options

Key Mime Pi accepts various options through environment variables:

Environment Variable Default Description
HOST 0.0.0.0 Network interface to listen for incoming connections.
PORT 8000 HTTP port to listen for incoming connections.
HID_PATH /dev/hidg0 Path to keyboard HID interface.

key-mime-pi's People

Contributors

dependabot[bot] avatar mtlynch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.