如何在Windows 10 / Visual Studio 2015中禁用F11?

时间:2016-01-03 20:30:01

标签: visual-studio-2015 windows-10

Windows太有用了。当我按 F11 时,我的控制台全屏显示。 我希望禁用此功能,原因如下。

ConsoleKeyInfo input;
            do
            {
                input = Console.ReadKey(true);
                StringBuilder output = new StringBuilder(
                String.Format(input.Key.ToString()));
                string lockedDiceInput = Convert.ToString(input.Key);
                //yes I should make a method for this but later
                switch (lockedDiceInput)
                {
                    case "F1":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[0]);
                        break;
                    case "F2":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[1]);
                        break;
                    case "F3":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[2]);
                        break;
                    case "F4":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[3]);
                        break;
                    case "F5":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[4]);
                        break;
                    case "F6":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[5]);
                        break;
                    case "F7":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[6]);
                        break;
                    case "F8":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[7]);
                        break;
                    case "F9":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[8]);
                        break;
                    case "F10":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[9]);
                        break;
                        // Not working
                    case "F11":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[10]);
                        break;
                    case "F12":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[11]);
                        break;
                    case "C":
                        Console.WriteLine("Assigning score to {0}", targetsSheetArray[12]);
                        break;
                    default:
                        //TODO
                        break;
                }
            }
            while (input.Key != ConsoleKey.Enter);
        }

F11 将不会触发案例' F11',控制台将全屏显示。如何关闭此功能'?我可以修改我的控制台应用程序以及调整我的操作系统(Windows 10)。

发现了类似的问题,但没有答案(here)。

1 个答案:

答案 0 :(得分:2)

  

按F11不会触发“F11”情况,控制台将全屏显示。如何关闭此“功能”?

您可以通过编辑注册表项来禁用“全屏”功能, 在cmd提示符下键入“regedit”,转到HKEY_CURRENT_USER - >控制台,将ForceV2值从“1”更改为“0”。