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 asdf jkl; keys on your keyboard.

Great for live coding presentations.

Demo

Features

  • Unicode support
  • Works with any text editor (in fact, with any program)

Installation

Install and update using pip:

$ python -m pip install onthefly

Usage

Identify your keyboard's device path with the command line tool evemu-record:

> sudo evemu-record

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 the device path of your keyboard 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 name is remembered so you do not have to re-enter it in future invocations:

   $ onthefly /path/to/file

Type the Pause/Break 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.0.6.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

onthefly-1.0.6-py2.py3-none-any.whl (7.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: onthefly-1.0.6.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for onthefly-1.0.6.tar.gz
Algorithm Hash digest
SHA256 c4b89e25d0eca2badf2acad4d1922ebfe355e4f03b9d558290c621cd839d3486
MD5 77bc4a787da09909d466604b9c3f44b8
BLAKE2b-256 0084649146a14531f9a7f0130f4f45a1278e7cbebc4203526f7636cb3c06eb16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onthefly-1.0.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for onthefly-1.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d7d55d26700426119cfbee34a0b034ad76f0de8a052560be60fe6f77848455b4
MD5 75cf43e318bcbcc139c18ab599c57bf0
BLAKE2b-256 1f9a9b6c298e1c7b0196d41a3325cd4f8e2ccbacdc52d18e236176b3be7d2535

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