Skip to content
← Back to Community
Why won't Keyboard.IsKeyDown work?
Profile icon
SamuelBlick

I was trying to use Keyboard.IsKeyDown to detect keys and it says keyboard doesn't exist despite my having using System.Windows.Input. Why is this/ what could I do to fix this?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
BotsBoots
Profile icon
SamuelBlick
Comments
hotnewtop
Profile icon
Coder100

I think it's because its a windows-only dll?

We use Console.ReadKey() around here.

Profile icon
SamuelBlick

@Coder100
What should I do if I want to detect multiple keys at the same time such as w or s?

Profile icon
Coder100

@SamuelBlick
I recommend you at least develop this locally

Profile icon
SamuelBlick

@Coder100
Lol, I'm new so I don't know what that means (sorry).

Profile icon
Coder100

if you have a windows computer, try using .NET

@SamuelBlick