Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more documentation for keyboard types #2811

Merged
merged 4 commits into from
May 21, 2023

Conversation

notgull
Copy link
Member

@notgull notgull commented May 18, 2023

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

This PR adds documentation for some of the items introduced in #2662

src/event.rs Show resolved Hide resolved
src/keyboard.rs Outdated Show resolved Hide resolved
@maroider maroider force-pushed the new-keyboard-v3 branch 3 times, most recently from b14ade4 to 679534f Compare May 19, 2023 16:59
@kchibisov
Copy link
Member

Could you resolve conflicts?

src/keyboard.rs Outdated
/// For instance, the "1" key above the "Q" key on a QWERTY keyboard will use this location. This
/// invariant is also returned when the location of the key cannot be identified.
///
/// ![Standard 1 key](https://raw.githubusercontent.com/rust-windowing/winit/master/images/keyboard_standard_1_key.svg)
Copy link
Member

@maroider maroider May 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there's no neat workaround for rust-lang/rust#32104 still being unresolved, I guess linking to it through GitHub works fine for now. My gut tells me we should be linking to a tagged release rather than the master branch, but linking to master initially is fine. I did find a way to link to the local copy of the SVG first, and then fall back to the GitHub link (roughly <img alt="Standard 1 key" src="../../../../images/keyboard_standard_1_key.svg" onerror="this.src = 'https://raw.githubusercontent.com/rust-windowing/winit/master/images/keyboard_standard_1_key.svg'">), but that wouldn't link the local version of the image if Winit's docs are built as a dependency, though I suppose instances where that would matter are exceedingly rare, if nonexistent.

@maroider
Copy link
Member

maroider commented May 20, 2023

While I'm sorely tempted to have one of us look into the SVG use element as a means of further reducing the SVG size, I think the size is OK now. This looks good otherwise (merge conflicts notwithstanding).

@maroider maroider force-pushed the new-keyboard-v3 branch 3 times, most recently from 7812000 to 33f44fe Compare May 20, 2023 15:43
@notgull notgull force-pushed the document-le-items branch 2 times, most recently from 1280ef4 to d965636 Compare May 20, 2023 17:57
@maroider maroider merged commit 60adf74 into rust-windowing:new-keyboard-v3 May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants