Typewriter

so i had the idea to make a typewriter thing while in a discord vc, watching someone use a physical typewriter, and thus i made this

tw

space and backspace work like on an actual typewriter; a deadkey toggle exists, by pressing tab (it resets after the next key pressed, to lock it press shift+tab); arrow keys move the cursor in half-steps, or twelfth-steps with shift held; you can preview a character by first pressing insert; you can swap between black and white ink by pressing delete; i plan on adding colors (split ribbon but any colors you want) and font size stuff (maybe also italics? font selection? aaa the possibilities); also i'll clean up the code a bit and make it more customizable

for some testing i was doing to write some lithuanian text, add &noRun to the url

Every single key written on top of each other (capital letters also);
image

LMAO that's so funny

here're some things i did:
20250621235753
20250621235122
20250621194558
20250621193957
20250621185525

Where is the real cursor?
image

What would be the potential for ASCII art? ...

i cannot guess that with more than a 25% chance of success (if you set it up right) because not only is the cursor identical to the underscore, it literally is an underscore (or at least a costume of one)

just look up “typewriter art” in your search engine of choice

Very cute!

The big thing I'm missing is a split ribbon, so you can either (in a ribbon for professionals) delete a character by overprinting it in white correction tape or (in a ribbon for amateurs) print in red.

What I really mean about "professionals" vs. "amateurs" is that the pros get expensive single-use carbon ribbons that print very sharp letters that entirely use up the places on the ribbon that hit the paper, whereas regular people get fabric ribbons that make (very) slightly fuzzy letters in which each impression doesn't entirely use up the ink in those places, so when you reach the end of the ribbon, its direction of spooling changes and you can reuse it a dozen or so times before it starts fading visibly.

I also want raising or lowering the baseline to make the font smaller, but of course real typewriters don't do that! :~)

P.S. The high school where I was a student had a typewriter in the math teachers' office with two keyboards sharing a platen:


You'd use the big lever with the knob about midway between keyboards in the picture to lift the entire platen assembly and slide it between the two keyboards. The one on the left was qwerty; the one on the right was math symbols.

yeah that's on the todo list

edit: have added a black/white ink toggle to the delete key

that's an interesting idea, though i'd probably have font size controlled separately

updated to change the deadkey mechanism (again), change the arrow key step size (also again), and add a character preview