I am trying to detect when the keyboard is attached or detached from the surface. I am currently setting up the function via SetInterval every 1 second and then calling the API to detect the mouse (apparently the keyboard always returns true).
var mouse = new Windows.Devices.Input.MouseCapabilities().
Based on the return value, I do my work. Everything is working fine, but slower.
Can I do something else? As if instead of pulling, it's their pushing equivalent to that.
Moving things from Js to Cpp will improve this? If so, how to do it?
thanks
source share