Skip to main content

Type like a god on-the-fly

Project description

Build Status

onthefly

onthefly allows you to emulate typing the contents of an input file by wildly pressing the asdfjkl; keys on your keyboard.

Great for live coding presentations.

Demo

Features

  • Unicode support (you need ibus installed and running)
  • Works with any text editor (in fact, with any program)

Installation

Install and update using pip:

> sudo python -m pip install onthefly

Usage

Identify your keyboard's device path with the command line tool evtest:

> sudo evtest

ID  Device               Name                                 ...
------------------------------------------------------------- ...
0   /dev/input/event0    Lid Switch                           ...
1   /dev/input/event1    Power Button                         ...
2   /dev/input/event2    Sleep Button                         ...
3   /dev/input/event3    Power Button                         ...
4   /dev/input/event4    AT Translated Set 2 keyboard         ...
5   /dev/input/event5    Video Bus                            ...
6   /dev/input/event6    Logitech M215 2nd Gen                ...
7   /dev/input/event7    Logitech K330                        ...
8   /dev/input/event8    SynPS/2 Synaptics TouchPad           ...
.
.
.

From this output, we see that my keyboard (a Logitech K330) has the device path /dev/input/event7.

Pass your keyboard's device path as an argument to the --keyboard option when invoking onthefly for the first time.

> onthefly --keyboard="/dev/input/event7" /path/to/file

Note that onthefly prompts for the root password in order to have access to the keyboard events.

The keyboard's device path is remembered so you do not have to re-enter it in future invocations:

> onthefly /path/to/file

Type the F9 key to quit the program at any moment. Use the Backspace key to erase characters without going out of sync with the input file.

License

  • Free software: MIT license

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onthefly-1.1.5.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

onthefly-1.1.5-py2.py3-none-any.whl (7.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file onthefly-1.1.5.tar.gz.

File metadata

  • Download URL: onthefly-1.1.5.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for onthefly-1.1.5.tar.gz
Algorithm Hash digest
SHA256 b935c5fa1613a96a2cb93f5236e396d66fa3b75a65b95fd2cbfd3f4b42abd8d1
MD5 d76ea9d4a8fecd4362b8e09ab1147673
BLAKE2b-256 136404714b31fe7b8692aa3aca795fcccc25d72e726d518dc8737b9e7208045b

See more details on using hashes here.

File details

Details for the file onthefly-1.1.5-py2.py3-none-any.whl.

File metadata

  • Download URL: onthefly-1.1.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for onthefly-1.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1219e5eca90803526aa84da8632ffad675344b07570c7332002282060958902d
MD5 b5af01068b19bb1f44e72acb76d8a522
BLAKE2b-256 3597f8c87cb758528c7a4dbd21f36376fb54bdbd786f82dfbaed58f592d4bec1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page