What is the scancode of "Pause/Break" key? What is the scancode of "Pause/Break" key? windows windows

What is the scancode of "Pause/Break" key?


Pause is a very special non-typematic key with an unusual scan code (E1 1D 45 E1 9D C5). This is too long to be remapped using SharpKeys (or any program that uses the registry to do scan code remappings, since this feature is limited to 2-byte scancodes). If you try to remap it, you'll get only the first two bytes, and end up remapping the Num Lock key instead. This breaks in all sorts of hilarious ways.

You will need to use another program to do the remapping, perhaps something like AutoHotKey. But I'm not sure this will actually work, given how special this key is.

It is not clear why a programmer would ever want to remap Pause/Break. This is a very useful key, one that is often painfully missing from laptop keyboards where your only option is to remap another key to Ctrl+Break (scan code E0 46). This gives you back at least part of the function of a real Pause/Break key.


I remapped Pause / Break key flawlessly using only SharpKeys! This is how I did it:

I also downloaded SharpKeys (which, by the way, is awesome), and at first was also unable to change the Pause/Break key to another key (my case wanna change to Media:Play/Pause).

After a little research, found this page blog: https://www.neox.net/w/2008/02/13/keyboard-remap-pause-break-key-as-del-key/
There, the guy was able to remap the key just using the first 2 bytes of the sequence. E1 and 1D. (he also messed around with Del key, which is unnecessary)

Since SharpKeys is already a great tool, I just download its code and added to the key map table this key code E1 1D and was able to remap using it without any further modifications.


Long story short:

I downloaded the source code of SharpKeys, and added to its code, file Dialog_Main.cs, method BuildParseTables(), the line m_hashKeys.Add("E1_1D", "-by Vitox: Pause/Break");

After that, I was able to remap the Pause/Break key flawlessly.


Resources:

Source code of SharpKeys, after changes
Source code of SharpKeys, after changes

Interface of SharpKeys, after mod
Interface of SharpKeys, after mod


SharpKeys: https://github.com/randyrants/sharpkeys
by the way, Randy Rants, this is a great tool. Thank You!


note: the keyboard where this mod worked was a Logitech G413, and OS was Windows 7


You must edit:E11D to Delete andE046 to Delete

There is file to download:https://www.neox.net/w/2008/02/13/keyboard-remap-pause-break-key-as-del-key/

I know this is a former topic, but maybe someone has MSI GL75 with a senseless keyboard like me :)