这是indexloc提供的服务,不要输入任何密码
Skip to content

CapsLock is not properly handled by Keyboard on windows. #110

@leo-liu

Description

@leo-liu

Minimal example:

// rdev 0.5.3
use rdev::{Keyboard, KeyboardState, EventType, Key};

#[cfg(windows)]
fn main() {
    let mut keyboard = Keyboard::new().unwrap();
    keyboard.add(&EventType::KeyPress(Key::CapsLock));
    keyboard.add(&EventType::KeyRelease(Key::CapsLock));
    let a = keyboard.add(&EventType::KeyPress(Key::KeyA));
    assert_eq!(a, Some(String::from("A")));
}

The Keyboard cannot recognize CapsLock states.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions