Max Destiny
asked on
Keyboard
KeyboardDevice a = Keyboard.IsKeyUp(Key.A);
KeyboardDevice b = Keyboard.IsKeyUp(Key.B);
if (Keyboard.IsKeyUp(Key.A)
{
Console.WriteLine(Key.A.To String());
}
KeyGesture gest = new KeyGesture(Key.A,ModifierK eys.Contro l,Key.A.To String());
if (gest)
{
Console.WriteLine(gest.Dis playString );
}
I'm trying to debug this for 1 hour and it doesn't show the gest.DisplayString
KeyboardDevice b = Keyboard.IsKeyUp(Key.B);
if (Keyboard.IsKeyUp(Key.A)
{
Console.WriteLine(Key.A.To
}
KeyGesture gest = new KeyGesture(Key.A,ModifierK
if (gest)
{
Console.WriteLine(gest.Dis
}
I'm trying to debug this for 1 hour and it doesn't show the gest.DisplayString
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. IsKeyUp returns a boolean not a KeyboardDevice.
2. gest is not a boolean.
The following code compiles for me:
Open in new window
And produces the expected output --saige-