Please disable your adblock and script blockers to view this page

Text Editing Hates You Too


Alexis Beingessner's
Jonathan Blow
Ken Thompson's
Raph Levien
Yohei Yukawa


No matching tags

No matching tags


No matching tags

Positivity     39.00%   
   Negativity   61.00%
The New York Times
Write a review: Hacker News

Let's look at the interface list for that newer version:That's right, the Windows text input APIs contain 128 interfaces. They ended up staying on the legacy API.Text input is difficult.Alexis already touches on selection in a couple places, but as she mentions in her article, her experience is with working on text rendering. This is the same behavior that prevents carets from migrating left when vertically moving past short lines.Ok, so we now know that a text selection has two chunks of state, the byte offsets of its position inside the string and the x-position in pixels mentioned above. For instance, with some Chinese input methods, the user types the pronounciation of what they're trying to say, and get a list of characters that match phonetically:This is sometimes called a composing region, and it often appears as underlined text. Other operating systems have simpler interfaces, but usually they're still tricky to implement.You also may have noticed that the input method is a separate process from our text field, and since both the input method and application can make modifications to the state of the text field, this protocol is a concurrent editing protocol. Does Windows need 128 interfaces and 8 kinds of locks to provide text input?

As said here by