Fix typos from updated typos tool (#4213)
This commit is contained in:
parent
587ade844d
commit
7b2c9d42b4
8 changed files with 12 additions and 13 deletions
|
|
@ -33,7 +33,7 @@ Winit is designed to be a low-level brick in a hierarchy of libraries. Consequen
|
||||||
show something on the window you need to use the platform-specific getters provided by winit, or
|
show something on the window you need to use the platform-specific getters provided by winit, or
|
||||||
another library.
|
another library.
|
||||||
|
|
||||||
## CONTRIBUING
|
## CONTRIBUTING
|
||||||
|
|
||||||
For contributing guidelines see [CONTRIBUTING.md](./CONTRIBUTING.md).
|
For contributing guidelines see [CONTRIBUTING.md](./CONTRIBUTING.md).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1224,7 +1224,7 @@ pub enum NamedKey {
|
||||||
Dimmer,
|
Dimmer,
|
||||||
/// Swap video sources. (`VK_DISPLAY_SWAP`)
|
/// Swap video sources. (`VK_DISPLAY_SWAP`)
|
||||||
DisplaySwap,
|
DisplaySwap,
|
||||||
/// Select Digital Video Rrecorder. (`KEYCODE_DVR`)
|
/// Select Digital Video Recorder. (`KEYCODE_DVR`)
|
||||||
DVR,
|
DVR,
|
||||||
/// Exit the current application. (`VK_EXIT`)
|
/// Exit the current application. (`VK_EXIT`)
|
||||||
Exit,
|
Exit,
|
||||||
|
|
|
||||||
|
|
@ -656,7 +656,7 @@ pub enum Orientation {
|
||||||
Portrait,
|
Portrait,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Screen orientation lock options. Reoresents which orientations a user can use.
|
/// Screen orientation lock options. Represents which orientations a user can use.
|
||||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||||
pub enum OrientationLock {
|
pub enum OrientationLock {
|
||||||
/// User is free to use any orientation.
|
/// User is free to use any orientation.
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@ impl<'a, 'b> KeyEventResults<'a, 'b> {
|
||||||
|
|
||||||
// The current behaviour makes it so composing a character overrides attempts to input a
|
// The current behaviour makes it so composing a character overrides attempts to input a
|
||||||
// control character with the `Ctrl` key. We can potentially add a configuration option
|
// control character with the `Ctrl` key. We can potentially add a configuration option
|
||||||
// if someone specifically wants the oppsite behaviour.
|
// if someone specifically wants the opposite behaviour.
|
||||||
pub fn text_with_all_modifiers(&mut self) -> Option<SmolStr> {
|
pub fn text_with_all_modifiers(&mut self) -> Option<SmolStr> {
|
||||||
match self.composed_text() {
|
match self.composed_text() {
|
||||||
Ok(text) => text,
|
Ok(text) => text,
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ impl PointerHandler for WinitState {
|
||||||
pointer_data.phase = phase;
|
pointer_data.phase = phase;
|
||||||
|
|
||||||
// Mice events have both pixel and discrete delta's at the same time. So prefer
|
// Mice events have both pixel and discrete delta's at the same time. So prefer
|
||||||
// the descrite values if they are present.
|
// the discrete values if they are present.
|
||||||
let delta = if has_discrete_scroll {
|
let delta = if has_discrete_scroll {
|
||||||
// NOTE: Wayland sign convention is the inverse of winit.
|
// NOTE: Wayland sign convention is the inverse of winit.
|
||||||
MouseScrollDelta::LineDelta(
|
MouseScrollDelta::LineDelta(
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
impl XConnection {
|
impl XConnection {
|
||||||
// This is impoartant, so pay attention!
|
// This is important, so pay attention!
|
||||||
// Xlib has an output buffer, and tries to hide the async nature of X from you.
|
// Xlib has an output buffer, and tries to hide the async nature of X from you.
|
||||||
// This buffer contains the requests you make, and is flushed under various circumstances:
|
// This buffer contains the requests you make, and is flushed under various circumstances:
|
||||||
// 1. `XPending`, `XNextEvent`, and `XWindowEvent` flush "as needed"
|
// 1. `XPending`, `XNextEvent`, and `XWindowEvent` flush "as needed"
|
||||||
|
|
|
||||||
|
|
@ -211,8 +211,7 @@ impl KeyEventBuilder {
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
if more_char_coming {
|
if more_char_coming {
|
||||||
// No need to produce an event just yet, because there are still more
|
// No need to produce an event just yet, because there are still more
|
||||||
// characters that need to appended to this keyobard
|
// characters that need to be appended to this keyboard event
|
||||||
// event
|
|
||||||
MatchResult::TokenToRemove(pending_token)
|
MatchResult::TokenToRemove(pending_token)
|
||||||
} else {
|
} else {
|
||||||
let mut event_info = self.event_info.lock().unwrap();
|
let mut event_info = self.event_info.lock().unwrap();
|
||||||
|
|
@ -333,8 +332,8 @@ impl KeyEventBuilder {
|
||||||
// 1. If caps-lock is *not* held down but *is* active, then we have to synthesize all
|
// 1. If caps-lock is *not* held down but *is* active, then we have to synthesize all
|
||||||
// printable keys, respecting the caps-lock state.
|
// printable keys, respecting the caps-lock state.
|
||||||
// 2. If caps-lock is held down, we could choose to synthesize its keypress after every
|
// 2. If caps-lock is held down, we could choose to synthesize its keypress after every
|
||||||
// other key, in which case all other keys *must* be sythesized as if the caps-lock state
|
// other key, in which case all other keys *must* be synthesized as if the caps-lock
|
||||||
// was be the opposite of what it currently is.
|
// state was be the opposite of what it currently is.
|
||||||
// --
|
// --
|
||||||
// For the sake of simplicity we are choosing to always synthesize
|
// For the sake of simplicity we are choosing to always synthesize
|
||||||
// caps-lock first, and always use the current caps-lock state
|
// caps-lock first, and always use the current caps-lock state
|
||||||
|
|
|
||||||
|
|
@ -225,16 +225,16 @@ pub fn get_keyboard_physical_key(keyboard: RAWKEYBOARD) -> Option<PhysicalKey> {
|
||||||
if scancode == 0xe11d || scancode == 0xe02a {
|
if scancode == 0xe11d || scancode == 0xe02a {
|
||||||
// At the hardware (or driver?) level, pressing the Pause key is equivalent to pressing
|
// At the hardware (or driver?) level, pressing the Pause key is equivalent to pressing
|
||||||
// Ctrl+NumLock.
|
// Ctrl+NumLock.
|
||||||
// This equvalence means that if the user presses Pause, the keyboard will emit two
|
// This equivalence means that if the user presses Pause, the keyboard will emit two
|
||||||
// subsequent keypresses:
|
// subsequent keypresses:
|
||||||
// 1, 0xE11D - Which is a left Ctrl (0x1D) with an extension flag (0xE100)
|
// 1, 0xE11D - Which is a left Ctrl (0x1D) with an extension flag (0xE100)
|
||||||
// 2, 0x0045 - Which on its own can be interpreted as Pause
|
// 2, 0x0045 - Which on its own can be interpreted as Pause
|
||||||
//
|
//
|
||||||
// There's another combination which isn't quite an equivalence:
|
// There's another combination which isn't quite an equivalence:
|
||||||
// PrtSc used to be Shift+Asterisk. This means that on some keyboards, presssing
|
// PrtSc used to be Shift+Asterisk. This means that on some keyboards, pressing
|
||||||
// PrtSc (print screen) produces the following sequence:
|
// PrtSc (print screen) produces the following sequence:
|
||||||
// 1, 0xE02A - Which is a left shift (0x2A) with an extension flag (0xE000)
|
// 1, 0xE02A - Which is a left shift (0x2A) with an extension flag (0xE000)
|
||||||
// 2, 0xE037 - Which is a numpad multiply (0x37) with an exteion flag (0xE000). This on
|
// 2, 0xE037 - Which is a numpad multiply (0x37) with an extension flag (0xE000). This on
|
||||||
// its own it can be interpreted as PrtSc
|
// its own it can be interpreted as PrtSc
|
||||||
//
|
//
|
||||||
// For this reason, if we encounter the first keypress, we simply ignore it, trusting
|
// For this reason, if we encounter the first keypress, we simply ignore it, trusting
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue