Skip to content

Instantly share code, notes, and snippets.

@jazzyjackson
Created October 6, 2021 14:41
Show Gist options
  • Save jazzyjackson/977b4bd504957effb799ef40cf3d32e7 to your computer and use it in GitHub Desktop.
Save jazzyjackson/977b4bd504957effb799ef40cf3d32e7 to your computer and use it in GitHub Desktop.

Revisions

  1. jazzyjackson created this gist Oct 6, 2021.
    22 changes: 22 additions & 0 deletions windows swap ctrl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    Windows Registry Editor Version 5.00
    ; credit to https://superuser.com/questions/949385/map-capslock-to-control-in-windows-10
    ; The hex data is in five groups of four bytes:
    ; 00,00,00,00,\ header version (always 00000000)
    ; 00,00,00,00,\ header flags (always 00000000)
    ; 04,00,00,00,\ # of entries (3 in this case) plus a NULL terminator line.
    ; Entries are in 2-byte pairs: Key code to send & keyboard key to send it.
    ; Each entry is in "least significant byte, most significant byte" order,
    ; e.g. 0x1234 becomes `34,12`
    ; 1d,00,3a,00,\ Send LEFT CTRL (0x001d) code when user presses the CAPS LOCK key (0x003a)
    ; 38,00,1d,00,\ Send LEFT ALT (0x0038) code when user presses the LEFT CTRL key (0x001d)
    ; 3a,00,38,00,\ Send CAPS LOCK (0x003a) code when user presses the LEFT ALT key (0x0038)
    ; 00,00,00,00 NULL terminator

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
    "Scancode Map"=hex:00,00,00,00,\
    00,00,00,00,\
    04,00,00,00,\
    1d,00,3a,00,\
    38,00,1d,00,\
    3a,00,38,00,\
    00,00,00,00