Welcome to Manicprogrammer Sign in | Join | Help

Rediscovering the Obvious

An occasional journey through one man's perspectives as he fumbles along in the footsteps of many great men.
Preventing F10 from opening an application's menus

Hopefully you don't need to do this often, but in our case we have a special hardware integration need to either handle or ignore the F10 key. However, F10 doesn't generate a KeyDown event with e.Key == Key.F10.

Instead, do this: 

        void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if(e.Key == Key.System && e.SystemKey == Key.F10 )
            {
                e.Handled = true;
            }
        }

Published Thursday, August 09, 2007 12:08 PM by willeke

Filed under: ,

Comments

# Preventing F10 from opening an application’s menus « Kuntzz styles. @ Monday, August 18, 2008 1:07 AM

PingBack from http://kuntzz.wordpress.com/2008/08/18/preventing-f10-from-opening-an-applications-menus/

Preventing F10 from opening an application’s menus « Kuntzz styles.

Anonymous comments are disabled