Skip to content

Commit 17b5737

Browse files
waywardmonkeyskchibisov
authored andcommitted
Fix typos from updated typos tool (#4213)
1 parent f49a2a1 commit 17b5737

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Winit is designed to be a low-level brick in a hierarchy of libraries. Consequen
3333
show something on the window you need to use the platform-specific getters provided by winit, or
3434
another library.
3535

36+
## CONTRIBUTING
37+
38+
For contributing guidelines see [CONTRIBUTING.md](./CONTRIBUTING.md).
39+
3640
## MSRV Policy
3741

3842
This crate's Minimum Supported Rust Version (MSRV) is **1.70**. Changes to

src/keyboard.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ pub enum NamedKey {
12321232
Dimmer,
12331233
/// Swap video sources. (`VK_DISPLAY_SWAP`)
12341234
DisplaySwap,
1235-
/// Select Digital Video Rrecorder. (`KEYCODE_DVR`)
1235+
/// Select Digital Video Recorder. (`KEYCODE_DVR`)
12361236
DVR,
12371237
/// Exit the current application. (`VK_EXIT`)
12381238
Exit,

src/platform_impl/linux/common/xkb/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ impl<'a, 'b> KeyEventResults<'a, 'b> {
320320

321321
// The current behaviour makes it so composing a character overrides attempts to input a
322322
// control character with the `Ctrl` key. We can potentially add a configuration option
323-
// if someone specifically wants the oppsite behaviour.
323+
// if someone specifically wants the opposite behaviour.
324324
pub fn text_with_all_modifiers(&mut self) -> Option<SmolStr> {
325325
match self.composed_text() {
326326
Ok(text) => text,

src/platform_impl/linux/wayland/seat/pointer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl PointerHandler for WinitState {
194194
pointer_data.phase = phase;
195195

196196
// Mice events have both pixel and discrete delta's at the same time. So prefer
197-
// the descrite values if they are present.
197+
// the discrete values if they are present.
198198
let delta = if has_discrete_scroll {
199199
// NOTE: Wayland sign convention is the inverse of winit.
200200
MouseScrollDelta::LineDelta(

src/platform_impl/linux/x11/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ where
5151
}
5252

5353
impl XConnection {
54-
// This is impoartant, so pay attention!
54+
// This is important, so pay attention!
5555
// Xlib has an output buffer, and tries to hide the async nature of X from you.
5656
// This buffer contains the requests you make, and is flushed under various circumstances:
5757
// 1. `XPending`, `XNextEvent`, and `XWindowEvent` flush "as needed"

src/platform_impl/windows/keyboard.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ impl KeyEventBuilder {
213213
.unwrap_or(false);
214214
if more_char_coming {
215215
// No need to produce an event just yet, because there are still more
216-
// characters that need to appended to this keyobard
217-
// event
216+
// characters that need to be appended to this keyboard event
218217
MatchResult::TokenToRemove(pending_token)
219218
} else {
220219
let mut event_info = self.event_info.lock().unwrap();
@@ -335,8 +334,8 @@ impl KeyEventBuilder {
335334
// 1. If caps-lock is *not* held down but *is* active, then we have to synthesize all
336335
// printable keys, respecting the caps-lock state.
337336
// 2. If caps-lock is held down, we could choose to synthesize its keypress after every
338-
// other key, in which case all other keys *must* be sythesized as if the caps-lock state
339-
// was be the opposite of what it currently is.
337+
// other key, in which case all other keys *must* be synthesized as if the caps-lock
338+
// state was be the opposite of what it currently is.
340339
// --
341340
// For the sake of simplicity we are choosing to always synthesize
342341
// caps-lock first, and always use the current caps-lock state

src/platform_impl/windows/raw_input.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,16 @@ pub fn get_keyboard_physical_key(keyboard: RAWKEYBOARD) -> Option<PhysicalKey> {
225225
if scancode == 0xe11d || scancode == 0xe02a {
226226
// At the hardware (or driver?) level, pressing the Pause key is equivalent to pressing
227227
// Ctrl+NumLock.
228-
// This equvalence means that if the user presses Pause, the keyboard will emit two
228+
// This equivalence means that if the user presses Pause, the keyboard will emit two
229229
// subsequent keypresses:
230230
// 1, 0xE11D - Which is a left Ctrl (0x1D) with an extension flag (0xE100)
231231
// 2, 0x0045 - Which on its own can be interpreted as Pause
232232
//
233233
// There's another combination which isn't quite an equivalence:
234-
// PrtSc used to be Shift+Asterisk. This means that on some keyboards, presssing
234+
// PrtSc used to be Shift+Asterisk. This means that on some keyboards, pressing
235235
// PrtSc (print screen) produces the following sequence:
236236
// 1, 0xE02A - Which is a left shift (0x2A) with an extension flag (0xE000)
237-
// 2, 0xE037 - Which is a numpad multiply (0x37) with an exteion flag (0xE000). This on
237+
// 2, 0xE037 - Which is a numpad multiply (0x37) with an extension flag (0xE000). This on
238238
// its own it can be interpreted as PrtSc
239239
//
240240
// For this reason, if we encounter the first keypress, we simply ignore it, trusting

0 commit comments

Comments
 (0)