Skip to content

Keyboard state seems to be stuck on Toggled. #17

@Martenfur

Description

@Martenfur

I got this code:

		var state = KeyboardState.GetAsyncKeyState(KeyCode.LShift);
		
		if (state != KeyboardKeyState.Default)
		{
			await Simulate.Events().Release(KeyCode.LShift).Invoke();
		}
		else
		{
			await Simulate.Events().Hold(KeyCode.LShift).Invoke();
		}

It is supposed to toggle the Shift key. And it does work - once. After the first press state seems to be Toggled no matter what I do. Even restarting the program keeps the key state. Only rebooting resets it back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions