An autocomplete prompt app for macOS that learns what as you type and works in all text fields system-wide!
The idea was to have a small, global popup in your menubar or as a transparent dropdown, where autocomplete suggestions are provided based on all words ever typed on the computer.
Unfortunately this just has too many downsides. You're essentially continually keylogging yourself for minor convenience, and it has the potential to reveal passwords or embarrassing information in your typing history to anyone who can see your screen.
However, if you don't type anything embarrasing and have eschewed typing passwords in favor of a password manager, hack away, the code is free for all to use.
See the alternatives section at the bottom for some other potential approaches.
WARNING: INSTALLING THIS PACKAGE IS DANGEROUS, IT'S EFFECTIVELY A KEYLOGGER THAT WRITES EVERYTHING YOU TYPE IN PLAIN TEXT TO /var/log/keystroke.log. DO NOT INSTALL THIS UNLESS YOU ARE OK WITH COMPLETELY PWN'ING EVERYTHING YOU DO ON YOUR COMPUTER FOR THE SAKE OF MILD PRODUCTIVITY GAINS
1. Install BitBar: https://getbitbar.com/
brew install redis pypy
brew services start redis
pypy -m "pip" install --upgrade pykeyboard redis
git clone https://github.com/pirate/macOS-global-autocomplete.git
cd macOS-global-autocomplete
Edit bitbar-autocomplete.1s.sh
to point to the correct path of the git repo you just cloned.
/usr/local/bin/pypy /path/to/macOS-global-autocomplete/autocomplete.py
Then copy it into your plugins folder to enable it in BitBar:
cp bitbar-autocomplete.1s.sh /path/to/bitbar/plugins/folder
tail -f /var/log/keystroke.log
And start typing to see if things show up...
- add helper script to train redis trie on /usr/share/dict/words, python standard library, etc.
- add config file to set insertion key commands
- finish insert code using
pyuserinput
- add code to rotate /var/log/keystroke.log
- add hashing blacklist functionality to exclude obsenties, sensitive words, passwords, etc.
- macOS Text Shortcuts (built-in): https://www.laptopmag.com/articles/autocomplete-with-text-shortcuts-os-x
- TypeFast/macEnglish input method https://apple.stackexchange.com/a/271058/171464 / https://blog.csdn.net/lwl_ls/article/details/8564940
- https://c-command.com/bbautocomplete/
- http://blog.jeffterrace.com/2012/09/bash-completion-for-mac-os-x.html
- https://www.iterm2.com/features.html#Autocomplete
- https://fishshell.com/docs/current/#autosuggestions