AutoHotkey is too useful to go without on Windows. I could convince someone to install it even though they wouldn't touch PKL or the Colemak MKLC. Although the Colemak MKLC installer is more complete:
1) Myself or another user often hits the switch layout button in Windows, creating confusion.
2) All users want Capslock as backspace yet still have Capslock functionality. Autohotkey can do that, registry edits can't.
There is another thread that references doing the layout in AutoHotkey, however it's only On or Suspended, which is not what I need. In addition, it's been 5 years and features of Autohotkey change. So without further delay, a wall of code for the Autohotkey 14 Feb 2014 release:
; Layout switch command is Alt+CapsLock
; Program kill command is Super+Alt+CapsLock
; Windows Shutdown command is Super+Alt+PrintScreen
;ALWAYS ON HOTKEYS
#!PrintScreen::Shutdown, 9 ; Shutdown Windows
#!Capslock::ExitApp ; Shutdown Autohotkey
CapsLock::Backspace ; Backspace
Shift & Capslock:: ; CapsLock
If GetKeyState("CapsLock", "T") = 1
SetCapsLockState, off
Else
SetCapsLockState, on
return
Colemak = 1 ; Initial Condition, you want Colemak
!Capslock:: ; Layout Switch is Alt+CapsLock
If (Colemak = 1) {
Colemak = 0
Menu, Tray, Icon, %A_AhkPath%, 1, 1
} Else {
Colemak = 1
Menu, Tray, Icon, %A_AhkPath%, 4, 1
}
Return
;CONDITIONAL HOTKEYS
#if Colemak
e::f
r::p
t::g
y::j
u::l
i::u
o::y
p::;
s::r
d::s
f::t
g::d
j::n
k::e
l::i
SC027::o
n::k
Return
This script changes the Autohotkey Tray Icon from Red to Green so you have some feedback on the current layout status.
Super is also called the Windows Logo key.