I'm writing a Windows 8 game. The game runs on Windows 7, Windows Phone, and XBox.
I want to display keyboard hints if a keyboard is attached (e.g. 'Press Esc to exit')
Seeing as Windows 8 can be a desktop, laptop, or tablet, there may or may not be a physical keyboard attached. Is there a way to determine this programmatically?
Of course, please read this quick start here
private void GetKeyboardProperties()
{
KeyboardCapabilities keyboardCapabilities = new Windows.Devices.Input.KeyboardCapabilities();
KeyboardPresent.Text = keyboardCapabilities.KeyboardPresent != 0 ? "Yes" : "No";
}
or if you html5/js developer take a look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With