w3c / input-events

Input Events
https://w3c.github.io/input-events/
Other
23 stars 16 forks source link

inputType for Menu Bar>Edit>Delete (no obvious direction) #25

Closed johanneswilm closed 7 years ago

johanneswilm commented 7 years ago

From @choniong on July 20, 2016 15:11

Should we add a new inputType (DeleteContent/Selection/?) since there is no obvious direction?

e.g. On Mac it will delete selection, and do nothing if collapsed. (On other platforms the classic Menu Bar is not always shown.)

Also Note: Menu Bar delete also acts as Kill on Mac, so later you can Yank by Ctrl+y. I'm not sure if we should add new types, or can we just use Delete* and Insert*?

Copied from original issue: w3c/editing#130

johanneswilm commented 7 years ago

That is an interesting question. On the one hans, you are right that there is no direction given and that would be an argument for creating a directionless option.

On the other hand, the direction always needs to be something (forward or backward), so the JavaScript define actions for backward and another for forward. My guess is that the directionless mode will be bundled together with the backward deletion -- but some apps may choose to have it go the other way. I don't know if that is really what the Mac OS X developers envision: that their built-in menus will cause quite different things, depending on how the JavaScript authors decide.

johanneswilm commented 7 years ago

@choniong The backspace key usually looks bigger than the delete key. That may be an argument for saying that backward is the preferred direction.