Skip to content

Improve the key events sent from the embedders to Servo #20331

Closed

Description

@fabricedesre

The key events sent by the embedder to Servo are based on Glutin ones (https://doc.servo.org/src/msg/constellation_msg.rs.html#22-147), and are then mapped to DOM Key events in components/script/dom/keyboardevent.rs. This is not ideal because Glutin only has a really limited subset of possible DOM Keys (eg. most of the keys in https://w3c.github.io/uievents-key/ are missing).

Would that make sense to have the embedders do themselves the mapping from their input stack to DOM Keys instead? The other option would be to add keys to the current enum, but that doesn't seem very scalable.

@paulrouget ?

Activity

  1. jdm commented on Mar 18, 2018

    @jdm
    Member

    It does seem like a good idea to define Servo's key types in terms of what web standards describe and require embedders to communicate with Servo using those keys.

  2. paulrouget commented on Mar 19, 2018

    @paulrouget
    Contributor

    Would that make sense to have the embedders do themselves the mapping from their input stack to DOM Keys instead?

    Absolutely.

  3. modal17 commented on Apr 2, 2018

    @modal17

    May I look into this?

  4. added
    C-assigned
    on Apr 4, 2018
  5. paulrouget commented on Apr 4, 2018

    @paulrouget
    Contributor

    @modal17 absolutely. Let me know if you have any questions.

  6. paulrouget commented on Aug 8, 2018

    @paulrouget
    Contributor

    Do DOM key events cover enough to print all that is needed for an IME?

    I'm thinking about Chinese characters, or dead keys combo. For example when I type: Option+e a, I see an accented underscore which is then replaced by á,or ni1 in Pinyin will show ni underscored then replaced with 你, or pressing lll Return will show 丿丿丿 then be replaced by彡 with a chinese keyboard. Also, navigating the temporary string with arrow keys is controlled by the input method. I'm wondering if this is all covered by https://w3c.github.io/uievents-key/#keys-composition

  7. removed
    C-assigned
    on Aug 8, 2018
  8. fabricedesre commented on Aug 8, 2018

    @fabricedesre
    ContributorAuthor

    Yes, what we really need is full composition support. showIME/hideIME are needed just to trigger the virtual keyboard, and then we need something similar to Gecko's nsITextInputProcessor.

  9. pyfisch commented on Sep 29, 2018

    @pyfisch
    Contributor

    I am working on this. It mostly works. I just need to refactor the built-in keyboard shortcuts.

  10. added a commit that references this issue on Oct 6, 2018
  11. added a commit that references this issue on Oct 6, 2018
  12. 3 remaining items

  13. added a commit that references this issue on Oct 7, 2018
  14. added a commit that references this issue on Oct 7, 2018
  15. added 4 commits that reference this issue on Oct 7, 2018
  16. thumbpr commented on May 4, 2022

    @thumbpr

    Hi I would like to try, is someone already working?

  17. pyfisch commented on May 6, 2022

    @pyfisch
    Contributor

    @neimsaci Pretty sure there is no one working on this issue.

    I would really appreciate if the key events are more correctly handled. However a word of caution: it involves quite a few different systems and can be a challenging issue.

  18. Gae24 commented on Jul 26, 2024

    @Gae24
    Contributor

    What's missing to close this issue?

  19. mrobinson commented on Jul 30, 2024

    @mrobinson
    Member

    Yeah, I think this is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions