To give you an example, here's my file for the remapping I mentioned:
Windows Registry Editor Version 5.00
; Set Enter (scancode 0x001c) to R-Ctrl (0xe01d) and R-Ctrl (0xe01d) to Enter (0x001c).
;
https://www.experts-exchange.com/articles/2155/Keyboard-Remapping-CAPSLOCK-to-Ctrl-and-Beyond.html;
https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/keyboard-and-mouse-class-drivers; Note that the values below are in Little-Endian. (The examples in
https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/keyboard-and-mouse-class-drivers are given in Big-Endian.)
; In a 4-byte word like 1c,00,1d,e0 below, the first 2 bytes are the desired new scannode, and the second 2 bytes are the old scannode.
; Thus, 1c,00,1d,e0 means that R-Ctrl (0xE01D) is to replaced by Enter (0x001C).
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1c,00,1d,e0,1d,e0,1c,00,00,00,00,00
; "Scancode Map"=hex:00,00,00,00, 00,00,00,00, 03,00,00,00, 1d,00,3a,00, 66,e0,37,00, 00,00,00,00