Skip to content

Commit 4e6072a

Browse files
committed
1 parent 51132aa commit 4e6072a

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

bucket/dual-key-remap.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "0.11",
3+
"description": "Remap any key to any other two keys on Windows. Remap CapsLock to both Ctrl and Escape!",
4+
"homepage": "https://github.com/ililim/dual-key-remap",
5+
"license": "GPL-2.0-only",
6+
"notes": [
7+
"dual-key-remap requires Administrator privileges to remap keys in elevated windows.",
8+
"",
9+
"To start dual-key-remap automatically at logon (with admin rights), run:",
10+
" install-dual-key-startup",
11+
"",
12+
"To remove the startup task, run (as Admin):",
13+
" schtasks /delete /tn \"DualKeyRemap\" /f"
14+
],
15+
"url": "https://github.com/ililim/dual-key-remap/releases/download/v0.11/dual-key-remap-v0.11.zip",
16+
"hash": "3fb5da6fd608d3c1479df79736cb05a471e12c5ef9d93827c613e604af652ea7",
17+
"installer": {
18+
"script": [
19+
"$startup_script = @'",
20+
"#Requires -RunAsAdministrator",
21+
"$scoopDir = $PSScriptRoot",
22+
"$exe = Join-Path $scoopDir 'dual-key-remap.exe'",
23+
"if (-not (Test-Path $exe)) {",
24+
" Write-Error \"Could not find dual-key-remap.exe at '$exe'\"",
25+
" exit 1",
26+
"}",
27+
"$action = New-ScheduledTaskAction -Execute $exe -WorkingDirectory $scoopDir",
28+
"$trigger = New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME",
29+
"$principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest -LogonType Interactive",
30+
"$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit 0",
31+
"Register-ScheduledTask -TaskName 'DualKeyRemap' -Action $action -Trigger $trigger -Principal $principal -Settings $settings -Force | Out-Null",
32+
"Write-Host 'Scheduled task \"DualKeyRemap\" registered successfully.' -ForegroundColor Green",
33+
"Write-Host 'dual-key-remap will start automatically at logon with elevated privileges.'",
34+
"if (-not (Get-Process -Name 'dual-key-remap' -ErrorAction SilentlyContinue)) {",
35+
" Start-Process -FilePath $exe -WorkingDirectory $scoopDir -Verb RunAs",
36+
" Write-Host 'dual-key-remap started.' -ForegroundColor Green",
37+
"}",
38+
"'@",
39+
"$startup_script | Set-Content \"$dir\\install-dual-key-startup.ps1\" -Encoding UTF8"
40+
]
41+
},
42+
"bin": [
43+
"dual-key-remap.exe",
44+
[
45+
"install-dual-key-startup.ps1",
46+
"install-dual-key-startup"
47+
]
48+
],
49+
"persist": "config.txt",
50+
"checkver": "github",
51+
"autoupdate": {
52+
"url": "https://github.com/ililim/dual-key-remap/releases/download/v$version/dual-key-remap-v$version.zip"
53+
}
54+
}

0 commit comments

Comments
 (0)