Disallow detach keyboard on Microsoft Surface Book

185 views Asked by At

We have a wpf application running on a surface book. While the application is running, it should be not allowed to detach the keyboard (Fn + Detach button).

The Window.KeyDown is not fired when keys are pressed. Any ideas how to deal with this problem?

EDIT: we solved the problem by starting the application by using graphics card. you can do that by right clicking app in explorer. this disallows the user to detach the keyboard where the graphic card is placed.

1

There are 1 answers

0
Jack Pettinger On

I would imagine that one way to possibly do this would be to detect any hardware changes on the computer. Each device connected to a computer is given a Guid.

You can check this in device manager by going to: Keyboards > Properties > Events Tab > Information section.

I would start by researching how to detect hardware changes on a computer and work from there.