Why Medium ate the Polish Ś, and a Cold War keyboard hack is to blame

A Pole typing on Medium found one letter refused to appear: Ś. Every other diacritic worked. The reason ran back through Windows internals to a workaround Poles invented when the US wouldn't sell them computers.

In brief

On Medium, Ś vanished while the eight other Polish accented letters typed fine. Marcin Wichary traced it: the Polish 'programmer's layout' makes Ś with Right Alt+S, Windows remaps Right Alt to Ctrl+Alt, and Medium's save handler was swallowing anything with Ctrl+S to block the browser save dialog.

The one-character fix: stop firing on Ctrl+S when Alt is also held. The flip in the thread is that browsers still give developers no clean way to tell these key combos apart, so the bug keeps coming back.

A letter that refused to be typed

Polish PowerBook keyboard with diacritics
Polish PowerBook keyboard with diacritics

The original write-up by Marcin Wichary, first published on Medium Engineering in February 2015, starts with a user complaint that sounds impossible: on Medium, the Polish letter Ś would not type. Not a font glitch, not a missing character. The other eight Polish accented letters (ż, ó, ć, ę, ą, ź, ń, ł) all worked. Only Ś was gone.

The cause is a four-layer pile-up Wichary unwinds one piece at a time. Polish needs nine letters beyond the Latin alphabet, and how you type them on a US keyboard is a story that starts in the Cold War. Communist Poland restricted computer imports, so Poles ended up on American hardware with no Polish keys, and the community settled on a "programmer's layout": hold Right Alt and press the base letter, so Right Alt+S gives Ś.

The trap is in Windows. For DOS-era compatibility, Windows maps Right Alt (AltGr) internally to Ctrl+Alt. So at the system level, the keystroke for Ś arrives as Ctrl+Alt+S. Medium, meanwhile, wanted to stop the browser's native save dialog, so its editor intercepted Ctrl+S with a check that read roughly (e.metaKey || e.ctrlKey) — and never looked at whether Alt was also down. Every attempt to type Ś matched that condition and got eaten.

Wichary's fix is one extra clause: only swallow the keystroke when Ctrl is pressed and Alt is not, i.e. (e.metaKey || (e.ctrlKey && !e.altKey)). Ś types again; Ctrl+S still blocks the save dialog.

The thread reads it as a still-open browser problem

Readers treated the eleven-year-old post as a live bug report. One condensed the whole mechanism to its punchline:

"Instead of blindly and greedily blocking Ctrl S, we could block Ctrl S only if Alt key was not pressed. Ctrl alt s was the keyboard shortcut for the polish S." — a commenter who reduced the fix to one rule

The sharpest structural point came from a developer who argued the real defect is upstream of Medium:

"browsers don't expose a simple way to check for key combinations… There should be a proposal for browsers to expose a property on the keydown/up/press event containing a code for the key combination. Something like 'CTRL+S', 'CTRL+ALT+S'… Even here, the code shown only fixes the broader issue on windows; alt+cmd+s still gets blocked." — a developer pointing at the missing browser API

A separate corner of the thread surfaced a problem the article never touches: Polish text and search indexing.

"8 out of 9 polish letters… break down into base letter + combining diacritical mark, but ł stays intact. That means you can't use sqlite's unicode61 remove_diacritics tokenizer to normalize polish text for FTS." — a developer who hit the Unicode normalization edge case

Then the closer, from someone living the same bug in the present tense:

"Meanwhile, in 2026 I suddenly cannot type capital Ś in Edge on Mac. I feel like I moved back in time 25 years or so." — a Polish user hitting it again in 2026

That last comment is the point the cheerful 2015 fix missed. A web app blocking Ctrl+S isn't a Windows-and-Polish corner case at all: any browser, any OS, any layout that builds a real character out of a modifier combination is one careless e.ctrlKey away from disappearing. The keyboard-shortcut convenience and the typist's alphabet share the same wires, and the platform never gave developers a clean way to tell the two apart.

Get breakdowns like this every day

The top Hacker News stories, unpacked — by email, Telegram, or RSS.

Next story · 27 of 34 Read more
🌍Other

Mars rock has "leopard spots" only microbes make on Earth, and a wet microscope could settle it

A core called Sapphire Canyon, drilled from a rock named Cheyava Falls, carries greenish poppy-seed nodules ringed by iron-phosphate and iron-sulfide minerals. On Earth those rings are left behind when microbes eat organic mud. On Mars, nobody can yet say.

★ 65 · 💬 72 · cbc.ca · 4 min