Are you tired of writing stuff down but forgetting where you wrote it? Constantly switching to the new hotness in note taking apps but putting off migrating your notes to the new system? Don't want to deal with note taking apps as a concept because plain-text will do? This tool could be for you.
Ductile monitors all key presses and stores those key presses in text files (in a folder you specify). Doesn't matter what you type of where you type it, the text will be saved. You can then hook up those text files to whatever text search/manipulation of your choosing should you ever want to go back and find something you wrote down. This tool is intended to run in the background and be left to run for as long as your machine is powered on.
Ductile was built as an experiment, based on the theory that saving all the text actually typed on a machine is trivial, in terms of storage requirement, and potentially useful (despite the saved raw keyboard entry being potentially janky as explained below).
- Ever lost a long form response that you wrote into a text box in a browser, because the submit timed out and the back button didn't save your input? Not any more. You'll be able to find what you typed out in the blob store generated by Ductile.
- Need to take notes immediately and don't have time to think of a good file name much less where to save it? No problem: just open up notepad and start typing. If you forget about the note and then proceed to restart/lose power to your machine, your notes will still be saved.
- If you generally believe the act of writing something down is more important than actually saving the writing somewhere, but sometimes do want to look up a thing you wrote before, this tool may work for you.
- Have you ever lost terminal command history because you haven't configured
HIST_OPTS
? Well, the stuff saved by Ductile will be better than nothing!
The following caveats apply:
- Be careful with passwords! Consider this a great opportunity to switch to using a password manager if you haven't already. Using a password manager means you're not typing out your passwords and therefore this (and other, more malicous) keyloggers won't record them.
- If you heavily rely on keyboard shortcuts that cause the cursor to jump around (e.g. ctrl+arrow-keys or ctrl+backspace), expect the text to be mangled. If there is interest, I may implement a way to deal with these kinds of jumps but I have a suspicion that that particular rabbit hole is very deep.
- Since text might be mangled (see above) you should: either make your peace with sometimes janky text, or not rely on this tool for high fidelity/work sensitive document generation more appropriate for an actual text editor. Consider this a catch-all bucket for all of your random musings which could later be processed into something useful. It is a back-stop for your regular workflows.
- This is a tool I hammered out in python in my spare time for fun. Don't run it in production or rely on it for some critical process/workflow. Something could cause Ductile to crash and you may not realize it [see future plans section below].
Basically: Anything you type on your keyboard is stored in a Sqlite database named: keystrokes.sqlite3
. Use your favorite sqlite/db viewer to have a look at the data and slice and dice to your heart's content.
NOTE: Currently only supports Windows but other operating systems should be real trivial to make happen if anyone ever requests it (or I get un-lazy).
Prereqs: Python 3.x (ideally 3.10) and pipenv
- Clone this repo
- run
pipenv install
From the root of this repo, in a pipenv shell run:
python python/main.py
(or pipenv run python python/main.py
might also work if you're not already in the pipenv shell)
If you would like to specify a different data folder/location (default is data/
within in this repo):
python python/main.py --data-folder path/to/data/dir
- Somehow convert this thing into a binary so you don't have to fiddle with installing python/pipenv and can easily run it as a service/daemon that can be restarted as needed
- Sync functionality so it'll auto backup to your cloud provider of choice (nextcloud, dropbox, etc)
- Build a tool on top of the raw storage, so you can start e.g. extracting, finding, tagging stuff for later use. Don't need to open your note-taking app to save a todo, start typing into literally any input box and slap a #todo on there. Done.
- Consider automated processes that can be triggered off of the above layer. E.g. If we write a command phrase like #todo it'll automatically email the surrounding text you wrote to a specific address, or send the data to IFTTT or some other automation pipeline. Automatically add #reminders to your calendar. Start treating your keyboard like an actuation device. Type #@!LIGHTSOFF and your smart-home lights turn off.