• This repository has been archived on 10/May/2021
  • Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

picoshare

A minimalist, easy-to-host service for sharing images and other files
Go
2,011
star
2

logpaste

A simple web service for storing text log files
Go
306
star
3

whatgotdone

A tool for sharing weekly task updates with teammates.
Go
136
star
4

hello-world-cypress

A simple example of using Cypress.io for end-to-end testing
Go
54
star
5

mtlynch.io

Source for mtlynch.io, a blog about technology and entrepreneurship.
HTML
43
star
6

resticpy

Minimal Python wrapper around the restic backup command-line interface.
Python
41
star
7

process-home-videos

Helper scripts for processing home videos and uploading them to MediaGoblin
Python
36
star
8

pre-vue

A template for building pre-rendered web apps with Vue + Nuxt
Vue
30
star
9

mediagoblin-docker

Docker image for MediaGoblin, adapted from https://notabug.org/dachary/mediagoblin-docker
Dockerfile
22
star
10

zfs-encrypted-backup

Shell
18
star
11

python3_seed

A boilerplate Python 3 project
Shell
17
star
12

docker-sia

An unofficial Docker image for Sia [Deprecated as of 2020-04-02]
Dockerfile
16
star
13

zestful-client

Python
14
star
14

mediagoblin

Python
10
star
15

ansible-role-key-mime-pi

Ansible role for installing key-mime-pi service
Shell
9
star
16

beancount-chase-bank

Beancount importer for Chase bank
Python
9
star
17

mtlynch-backup

The Python script I use to back up my data with restic
Python
8
star
18

ansible-role-sia

Ansible role for the Sia distributed storage network
Shell
7
star
19

social-go

A Go parser for various social media handles and URLs
Go
6
star
20

sia_metrics_collector

Python
6
star
21

ansible-role-clipbucket

An Ansible role for the Clipbucket video platform
Python
6
star
22

plausible-proxy

Reverse proxy for Plausible Analytics, implemented as Google Cloud Function
Go
5
star
23

sia_load_tester

https://blog.spaceduck.io/sia-load-test-preview/
Python
5
star
24

beancount-mercury

Beancount importer for Mercury Startup Checking
Python
4
star
25

gofn-prosper

Go bindings for the Prosper P2P Lending API
Go
4
star
26

hello-world-vue-pre-rendered

A basic example of a website generated with Vue + Nuxt using pre-rendering.
Vue
4
star
27

stripe-snooping-example

A proof of concept of the snooping behavior of Stripe's official JavaScript library
Vue
3
star
28

ansible-role-litestream

Role for installing the Litestream sqlite replication tool
Jinja
3
star
29

docker-flask-upload-demo

Dockerfile
3
star
30

ansible-role-storj

An Ansible role for the Storj distributed storage network
Shell
3
star
31

customize-rpi

Customize a redistributable Raspberry Pi image
Shell
3
star
32

slide-decks

Nix
3
star
33

zig-c-simple

Simple example of calling C code from Zig
Zig
3
star
34

docker-cypress

Dockerfile
3
star
35

simple-encrypt

Python
2
star
36

prosperbot

An automated Prosper peer to peer lending bot
Go
2
star
37

dummy_file_generator

Python
2
star
38

python_seed

A boilerplate Python 2 project
Shell
2
star
39

process-hit-the-front-page

Process videos from Hit the Front Page of Hacker News
Shell
2
star
40

chat_unifier

Python
2
star
41

screenjournal

Like Goodreads but for couch potatoes
Go
2
star
42

rss-proxy

Go
2
star
43

dummy-appengine-demo

Python
2
star
44

eth-zvm

An implementation of the Ethereum virtual machine in pure Zig.
Zig
2
star
45

migrate-mtlynch-to-hugo

A quick 'n dirty script to migrate the Jekyll-based mtlynch.io to Hugo
Python
1
star
46

hid-formatter

HTML
1
star
47

godot-platformer-1

Just playing around with Godot Engine
GDScript
1
star
48

appengine-python-seed

Python
1
star
49

sia_timestamp_dumper

Dumps block timestamps from Sia
Python
1
star
50

docker-gifsicle

Dockerfile
1
star
51

ndt-raspi-viz

HTML
1
star
52

docker-godot

Dockerized image for Godot Game Engine
Dockerfile
1
star
53

picoshare-fly-debug

Deploy a dev environment to Fly.io for debugging PicoShare
Dockerfile
1
star
54

simpleauth

A simple Go authentication and session management library for web apps.
Go
1
star
55

zestful-frontend2

Demo page for the Zestful ingredient parser (using Vue + Nuxt)
Vue
1
star
56

syncthing-fly.io

Deploy a syncthing instance to fly.io
1
star
57

dev-scripts

Canonical version of my best dev scripts for automating programming tasks
Shell
1
star
58

show-and-tell-code-of-conduct

Ruby
1
star
59

docker-syncthing

Unofficial Docker image of syncthing
Dockerfile
1
star
60

docker-protractor

Dockerfile
1
star
61

prosperbot-frontend

Go
1
star
62

google-analytics-v4-example

A basic example of using the Google Analytics Core Reporting v4 API
Go
1
star
63

free-usage-videos

A collection of public domain / Creative Commons videos
1
star
64

ansible-role-nginx-rtmp

Shell
1
star