Skip to content

Meta Issue: Keyboard input #1806

@maroider

Description

@maroider

There are a bunch of issues related to keyboard input on the issue tracker, but it's currently difficult to get an overview of currently open issues in a short amount of time.
By opening this issue, I hope to consolidate information about what's currently broken about keyboard input in Winit in one place.

Two issues which are of particular importance here are:

There has been a lot of progress on the implementation of the API discussed in #753, and there is now a PR moving all the backends (bar Redox) to the new API: #2662

This PR supersedes the previous backend-specific PRs:

There are two milestones which track some issues related to keyboard input:

These milestones don't track all issues related to keyboard input, so here's a list of these untracked issues:

May be resolved by adoption of #753

Issue Platform Notes
#440 Linux Panic when using optirun and typing dead keys.
#714 macOS ReceivedCharacter gets infinitely repeated under certain circumstances.
#734 macOS "in certain circumstances the Paste key is sent multiple times to the winit application."
#773 Cross-platform Ignoring keyboard input when IME is active.
#1208 macOS Might be another instance of a VirtualKeyCode not being delivered.
#1267 macOS Certain key combinations don't send ReceivedCharacter events.
#1272 Cross-platform Some platforms don't give you key release events if you press a key, then unfocus the window and then release the key. This is papered over by winit through synthesized keyboard events (WindowEvent::KeyboardInput.is_synthetic).
#1396 macOS ModifiersChanged isn't emitted in certain cases.
#1443 Linux DeviceEvent delivers a VirtualKeyCode while WindowEvent doesn't.
#1470 macOS No keyboard input through DeviceEvent on macOS.
#1488 macOS Key repeat is inconsistent.
#1656 Linux Shift+Alt produces the wrong virtual keycode on Alt "key down".

Various bugs and requests for API changes

Issue Platform Notes
#347 Linux Mutex issues & segfault when using IME.
#361 Linux DeviceEvent delivers a VirtualKeyCode while WindowEvent doesn't.
#477 Cross-platform ReceivedCharacter & Enter/Return.
#732 Cross-platform Proposal for an API to convert between ScanCode and VirtualKeyCode.
#756 Cross-platform ModifiersState should differentiate between "right Alt" and AltGr.
#788 Linux XIMPreeditPosition should be used instead of XIMPreeditNothing in a particular spot.
#1010 Cross-platform Request for a keyboard key state query API.
#1426 Cross-platform A request for a NumLock status query API.
#1452 Cross-platform ReceivedCharacter is not emitted while IME is active.
#1497 Cross-platform Tracking issue for CompositionEvent support.
#1768 Web Web hotkeys may need to be optionally allowed.
NOTE: This comment received a substantial edit on 2020-04-07.

Metadata

Metadata

Assignees

No one assigned

    Labels

    D - hardLikely harder than most tasks hereS - apiDesign and usability

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions