W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: [editing] Changing Default Intentions

From: Ryosuke Niwa <rniwa@apple.com>
Date: Fri, 20 Jun 2014 20:32:22 -0700
Cc: Ben Peters <Ben.Peters@microsoft.com>, "public-webapps@w3.org" <public-webapps@w3.org>
Message-id: <076154C0-074E-44CC-8ECA-E4552320E5E5@apple.com>
To: Yoshifumi Inoue <yosin@chromium.org>
On Jun 17, 2014, at 7:31 PM, Yoshifumi Inoue <yosin@chromium.org> wrote:

> For overriding keyboard shortcut, how about exposing browser's key binding map as API rather than handling keyboard event?
> Example:
> window.keymap['Ctrl+B'] = function() { document.execCommand('back color'); }

I don't think this is a much improvement from the status quo of handling keydown event manually.  If anything, what we need to be solving here is the problem such as Ctrl+B behaving like Cmd+B on Mac and yet another platform may have another convention.

We should design API such that authors don't have to manually hard code each and every platform's convention.

> window.keymap also contains "accesskey". So, editor library can notify or avoid overriding page defined shortcut
> // This can be done by document.querySelectorAll(*[accesskey]) though

I don't follow what you're trying to say here.  Could you clarify what problem you're trying to solve?

- R. Niwa
Received on Saturday, 21 June 2014 03:33:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:25 UTC