shortcut docs

13 views
Skip to first unread message

jon.w....@gmail.com

unread,
Aug 9, 2022, 7:42:15 PM8/9/22
to nw.js
Hi Roger,

I am confused about the documentation here:


You give a bullet for the following under "List of supported keys:"


But you really only supported those code values IFF they are in the very limited set of keys that precede it in the bulleted list.

Because of this, I cannot use "digit1" as a menu option shortcut. On a French BÉPO keyboard, that key corresponds to ASCII 34 (double quotes). And since you don't support that ASCII character, that shortcut doesn't work for users who have that keyboard. (Also, it won't even print out a "failed" event error-- it just silently fails.)

Same problem for "digit2", "digit3", "digit4", "digit5", "digit6", and "digit0".

The whole point of that DOM Level 3 spec is to be able to specify physical keys without regard to the locale-specific character that maps to it. But if I have to manually check every extant keyboard to make sure a given key's printable characters are supported by your API, it defeats the purpose of using those Level 3 DOM code values.

My application uses each of those standard "digit" keys (plus a modifier) as default menu option shortcuts.

Any chance you could at least give special-case support for all the Level 3 KeyboardEvent "digit" keys so that I can use them safely across all locales in my app?

Best,
Jonathan


jon.w....@gmail.com

unread,
Aug 9, 2022, 7:54:08 PM8/9/22
to nw.js
Correction-- on a BÉPO keyboard, the only digit key that should[1] currently work is "digit8" which maps to ASCII 45 (minus).

All the rest have mappings that aren't supported by the Shortcut API.

-Jonathan

1:
I say "should" because to test these locales in Gnome I have to actually remove my current locale (ugh), so I can't safely test whether it works atm.


Ayushman Chhabra

unread,
Oct 16, 2022, 9:10:36 PM10/16/22
to nw.js
Hi, could you please open a bug report on https://github.com/nwjs/nw.js/issues so we can pinpoint the problem?

Jonathan Wilkes

unread,
Oct 16, 2022, 10:09:51 PM10/16/22
to Ayushman Chhabra, nw.js
On Sun, Oct 16, 2022 at 9:10 PM Ayushman Chhabra <ayus...@outlook.com> wrote:
>
> Hi, could you please open a bug report on https://github.com/nwjs/nw.js/issues so we can pinpoint the problem?

Sorry, but I can't even do that because the most recent nw.js version
has a regression-- none of the number keys can be used as shortcut
keys for menu items. [0-9] all fail to trigger the "click" callback
for a menu item.

Please let me know when you fix that bug, then I will be able to test
and confirm this bug with the DOM3 KeyboardEvent code values.

-Jonathan
> --
> You received this message because you are subscribed to the Google Groups "nw.js" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nwjs-general/831ea250-a8fa-48e5-b45d-440f25c8892an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages