The easiest way to install Programmer Dvorak on a Windows 11 installation is by using WinGet. This document will describe the process of installing the keyboard layout this way.
Versions 1.2.8 or older of the layout must be removed from the computer before a version newer than this is installed. The new installer is not capable of upgrading versions older than this, so if they are not removed, you'll end up with two (slightly different) versions of the layout.
If you are sure that you don't have any old versions installed, this step may be skipped. Otherwise, paste the following script into the PowerShell command terminal that was opened in the previous step:
$keyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\kbddvp"
if (Test-Path -Path $keyPath) {
$key = Get-Item -Path $keyPath
$uninst = $key.GetValue("UninstallString")
if ($uninst) {
Start-Process -Verb RunAs -FilePath ${env:SystemRoot}\System32\cmd.exe `
-ArgumentList "/c", $uninst
}
}
Before installation get begin, the WinGet program must be up to date. If you have used WinGet recently, this step can be skipped, otherwise run the commands below:
Install-Module Microsoft.WinGet.Client -Scope AllUsers -Force
Repair-WinGetPackageManager -AllUsers -Latest
Enter the following commands into the terminal window to install the layout on the system. Please note that the first command saves the current timestamp in an environment variable that can be used in the same terminal window later for troubleshooting.
$tstamp = Get-Date -Format "yyyy-MM-dd-HH-mm"
Install-WinGetPackage -Id KaufmannNO.ProgrammerDvorak -Scope System -Source WinGet
A keyboard layout is inherently installed in a system scope and made available to all users on Windows, but it must be activated individually for each user afterwards.
You may use the script below to activate the keyboard layout for the current user. In constrast to the other commands here, these does not have to be entered in an administrative shell, but can be submitted to a regular PowerShell terminal.
$cult = Get-Culture
$keyb = "19360409"
$list = Get-WinUserLanguageList
$item = $list | Where-Object { $cult.Name -match $_.LanguageTag }
$item.InputMethodTips.Clear()
$item.InputMethodTips.Add(("{0:X4}:{1:S}" -f $cult.LCID, $keyb))
Set-WinUserLanguageList $list -Force
WinGet keeps its log-files in a directory underneath the user profile. Use the commands below to locate this directory and print its content from the around when the installer was started.
$diagDir = Join-Path (Get-WinGetSetting | `
Select-Object -ExpandProperty userSettingsFile | `
Split-Path -Parent) "DiagOutputDir"
Get-ChildItem -Path $diagDir -Filter "*${tstamp}*"
To deactivate the layout and restore the default keyboard for your current language, follow the procedure in the activation section, except replace the line:
$keyb = "19360409"
with:
$keyb = "0000{0:X4}" -f $cult.LCID
instead.
To completely remove the layout from your system, use the command below. Note that you should make another keyboard layout active before removing the current one, or your keyboard will be unusable until you have selected another.
Uninstall-WinGetPackage -Id KaufmannNO.ProgrammerDvorak