Re: [w3c/editing] [beforeinput] InputType for MacOS Transpose (ctrl-t) (#148)

> Say for example, that a particular editor puts span-elements around all words or syllables if the word is longer than ten letters for the purpose of tracking their position or alike. As long as the spans are not styled, the end user doesn't notice this. If now the user intents to "transpose" two characters, but the JS doesn't ever know that this was the intention of the end user and instead only gets to know that the end user has asked for changing some things in and out of two span-elements that happen to end/start in-between the two letters in question, this could lead to all kinds of misunderstandings. Does this makes ense?

OK, so for example the default behavior for `Transpose` is similar to `Paste`

* **Bold**|*Italic* -> **BolId**|*talic* (Where *I* was moved into `<b>`)

JS might want to detect `Transpose` and override it to

* **Bold**|*Italic* -> **BolI***d*|*talic* (Swap character but keeps style)

> So I would say this has to get its own intention. Same with yank/kill. It doesn't take that much for us to define them, and if Apple finds out that really no-one uses them, they can remove them from Mac OS X and we can remove them from a future version of the spec.

OK, so how about:

1. `deleteByKill` (similar to cut)
2. `insertFromYank` (similar to paste)
3. `transpose`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/148#issuecomment-242210729

Received on Wednesday, 24 August 2016 21:16:10 UTC