I have a app that use in a kiosk. I disable task-bar and win key in registry with SetWindowsHookEx
.
But can open startmenu when use On-Screan keyboard. I use PreviewKeyDown
event, but don't work.
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.LWin || e.Key==Key.RWin)
e.Handled = true;
}
How to disable win key of on-screan keyboard?
This person seems to have it sorted http://sleepydesign.blogspot.co.uk/2013/07/c-disable-system-keys-on-windows-on.html
But the appear from their github to be using the same approach to hooks
I imagine my scan of the code missed something, they're quite confident it works, explicitly refering to the onscreen keyboard and disabling specific functionality .
I believe he virtual code for windows key is
MOD_WIN (0x0008)
Also take a look at RegisterHotKey
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.