I wrote the world's worst text editor (2020)
briancallahan.net
briancallahan.net
A guy had a kid who had severe learning difficulties and motor problems. However he loved typing into the computer but would get frustrated if he hit say alt and would go to the menu, or held a key down too long and get duplicates. Stuff like that. Or would accidentally close it etc.
So i wrote the worlds worst text editor, it would intercept all key presses so that nothing would be handled that would result in the cursor leaving the editor. You could hold down keys as long as you want and would only get one character, same with delete. It also made a type wtiter type noise on every key press. Pretty sure i had timing as well so if you pushed the same key twice quickly you would only get one character output.
It had no menu bar and opened full screen and would start up wherever you left it text wise.
Testing it would drive me mental. It was so frustrating to use! I can't even remember how you exited it as im pretty sure i was intercepting ctrl alt delete. This was windows xp days.
The kid liked it though!
You don't need to actually stop ctrl alt del, you just need to stop it from opening task manager!
I remember debugging this stuff was painful, when it didn't work you got the BSOD.
Be interested to know how much of these techniques could work on win 7/10. Im guessing not at all.
Windows 7 probably changed that somewhat. I know the lock screen in Windows 10 is super buggy wrt customisation.
There is a surviving piece of it: a line editing routine. For many years, that was included in GNU Bash as one of the examples:
https://git.savannah.gnu.org/cgit/bash.git/tree/examples/scr...
They had the good sense to remove that.
If we're going for a truly minimal, Unix-style, modular program though, why not abandon the focus on lines and have it operate only on a single character? You could have it accept text as a parameter, and return the edited text as the result so then you could write multi-character strings by piping together multiple invocations of the program!
(I still use /bin/ed instead of . . . certain other editors I will not name here. Mercifully, all of my TECO "skills" have fled).
Trust me on this.
Because the author is (was?) the maintainer of `mg`.