Windows 7 On Screen Keyboard Restorer
This mod redirects the Windows 10/11 On-Screen Keyboard (osk.exe) to the original Windows 7 one
Author: babamohammed
This modification tries to restore the original Windows 7 On-Screen Keyboard on Windows 10 and
Windows 11: whenever the system osk.exe is about to start, the Windows 7
osk.exe is started instead. This is a best effort restoration. The Windows 7
files are downloaded from Microsoft's public symbol server and verified against
pinned SHA-256 digests before they are used, and nothing is written to
System32, to Common Files, or to Image File Execution Options. The files are
kept in the mod's own storage folder (or in the folder of the installFolder
setting), which Windhawk removes together with the mod, and no registry key is
left behind.
This modification has been tested on Windows 10 21H2 and Windows 11 24H2.
Screenshot (Before)

Screenshot (After)

How it works
The mod catches the keyboard before it opens and swaps it for
the Windows 7 one. It does this in two ways: first, it watches the programs
that usually launch the keyboard (Explorer, Start/Search, control.exe and a
few others) and redirects the launch so the Windows 7 keyboard starts instead.
Second, if the system keyboard still manages to open through some path that
cannot be watched, the mod lets it open, then quietly closes it and starts the
Windows 7 one in its place.
Once the Windows 7 keyboard is running, the mod gives it the files it expects
but cannot find on Windows 10/11: TabSKB.dll and DUI70.dll are pointed to
local copies, the English texts and dialogs are supplied from inside the mod
when the .mui file is missing, and the seven special key faces (Windows,
menu, Enter and the four arrows) are drawn by the mod itself, because the
modern TipResX.dll on this system has no pictures for them.
Preparation
Before the Windows 7 keyboard can run outside System32, two small edits are
needed. First, uiAccess="true" is changed to false in its manifest: Windows
only honors that flag for signed programs in protected folders, and otherwise
refuses to start the program with error 740. Second, DUI70.dll is renamed to
DUI71.dll so it does not collide with the system's own DirectUI, which has
the same name but is incompatible. The trade-off is that, since the UIAccess
flag is gone, the Windows 7 keyboard cannot type into elevated (administrator)
windows.