Forcing a System Crash from the Keyboard - Windows drivers | Microsoft Learn
Table of contents
Exit editor mode
Ask Learn
Ask Learn
Reading mode
Table of contents
Read in English
Add
Add to plan
Edit
Copy Markdown
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Forcing a system crash from the keyboard
Feedback
Summarize this article for me
When troubleshooting system issues, you might need to generate a crash dump file to analyze the system state. You can force a system crash directly from your keyboard by using specific key combinations. This capability is useful when a system becomes unresponsive or when you need to capture diagnostic information.
This article explains how to:
Configure registry settings to enable keyboard-initiated crashes
Use keyboard shortcuts to trigger a system crash
Set up alternate keyboard shortcuts
This feature works with PS/2 keyboards (Windows 2000 and later), USB keyboards (Windows Vista and later), and Hyper-V keyboards (Windows 10 version 1903 and later).
Caution
Forcing a system crash immediately stops your system and might result in data loss. Use this feature only when necessary for debugging purposes and ensure you save your work.
Configuration
Configure the following settings to enable a system crash by using the keyboard:
If you want a crash dump file to be written, you must enable such dump files. Choose the path and file name, and select the size of the dump file. For more information, see Enabling a kernel-mode dump file.
For PS/2 keyboards: Enable the keyboard-initiated crash in the registry:
Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters
Create a value named CrashOnCtrlScroll
Set it to REG_DWORD value of 0x01
With USB keyboards, you must enable the keyboard-initiated crash in the registry.
In the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbdhid\Parameters, create a value named CrashOnCtrlScroll
Set it equal to a REG_DWORD value of 0x01.
With Hyper-V keyboards, you must enable the keyboard-initiated crash in the registry.
In the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\hyperkbd\Parameters, create a value named CrashOnCtrlScroll
Set it equal to a REG_DWORD value of 0x01.
Some laptops use the PS/2 driver for the built-in keyboard and also support external HID keyboards. For these systems, consider creating both the USB and PS/2 registry keys to allow the use of either keyboard.
You must restart the system for these settings to take effect.
Once the restart is completed, the keyboard crash can be initiated by using the following hotkey sequence: Hold down the rightmost CTRL key, and press the SCROLL LOCK key twice.
The system then calls KeBugCheck and issues Bug check 0xE2: MANUALLY_INITIATED_CRASH. Unless crash dumps are disabled, a crash dump file is then written.
If a kernel debugger is attached to the crashed machine, the machine breaks into the kernel debugger after the crash dump file is written.
Defining alternate keyboard shortcuts to force a system crash from the keyboard
You can configure alternate values under the following registry subkeys for keyboard shortcut sequences to generate the memory dump file:
For PS/2 keyboards:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\crashdump
For USB keyboards:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\crashdump
For Hyper-V keyboards:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hyperkbd\crashdump
You must create the following registry REG_DWORD values under these subkeys:
Dump1Keys
The Dump1Keys registry value is a bit map of the first hotkey to use. For example, instead of using the rightmost CTRL key to initiate the hotkey sequence, you can set the first hotkey to be the leftmost SHIFT key.
The following table describes the hexadecimal values for the first hot key.
Value<br>First Key used in the keyboard shortcut sequence
0x01<br>Rightmost SHIFT key
0x02<br>Rightmost CTRL key
0x04<br>Rightmost ALT key
0x10<br>Leftmost SHIFT key
0x20<br>Leftmost CTRL key
0x40<br>Leftmost ALT key
You can assign Dump1Keys a value that enables one or more keys as the first key used in the keyboard shortcut sequence. For example, assign Dump1Keys a value of 0x11 to define both the rightmost and leftmost SHIFT keys as the first key in the keyboard shortcut sequence.
Dump2Key
The Dump2Key registry value is the index in the scan code table for the keyboard layout of the target computer. See the actual table in the driver:
const UCHAR keyToScanTbl[134] =...