winit-core/keyboard: clarify modifier docs
Emphasize the difference between logical and physical state, reference sticky mods.
This commit is contained in:
parent
5190472bee
commit
38fd3c6a99
3 changed files with 29 additions and 20 deletions
|
|
@ -153,12 +153,13 @@ impl Drop for XkbState {
|
|||
}
|
||||
}
|
||||
|
||||
/// Represents the current state of the keyboard modifiers
|
||||
/// Represents the current logical state of the keyboard modifiers
|
||||
///
|
||||
/// Each field of this struct represents a modifier and is `true` if this modifier is active.
|
||||
///
|
||||
/// For some modifiers, this means that the key is currently pressed, others are toggled
|
||||
/// (like caps lock).
|
||||
/// For some modifiers, this means that the key is logically pressed, others are toggled (like Caps
|
||||
/// Lock). But physically the key can be in any state (for example, released Shift when
|
||||
/// it's active as a sticky modifier or released Caps Lock when it's toggled on)
|
||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub struct ModifiersState {
|
||||
/// The "control" key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue