Skip to content

Instantly share code, notes, and snippets.

@magnushammar
Last active May 12, 2020 19:43
Show Gist options
  • Save magnushammar/ce517738bb35a91d4c79d4774d1d7e86 to your computer and use it in GitHub Desktop.
Save magnushammar/ce517738bb35a91d4c79d4774d1d7e86 to your computer and use it in GitHub Desktop.
Key Remapping for programming on Swedish keyboard
; *********** FOR SWEDISH KEYBOARD ***********
#SingleInstance, force
SetCapsLockState, AlwaysOff
; Regular remapping
RWin::AppsKey
§:: Send {esc}
;SC01B::^
; CapsLock Remapping
SC00D::Remap("\","{U+0060}")
SC01B::Remap("{U+005E}","{U+007E}")
*j:: Remap("j","{left}")
*+:: Remap("{+}", "\")
*i:: Remap("i","{up}")
*l:: Remap("l","{right}")
*k:: Remap("k","{down}")
*ö:: Remap("ö","{end}")
*h:: Remap("h","{home}")
*u:: Remap("u","{bs}")
*o:: Remap("o","{delete}")
*y:: Remap("y","{escape}")
*7:: Remap("7","{{}")
*8:: Remap("8","[")
*9:: Remap("9","]")
*0:: Remap("0","{}}")
*4:: Remap("4","$")
*n:: Remap("n","<")
*m:: Remap("m","/")
*,:: Remap(",","|")
*.:: Remap(".",">")
*2:: Remap("2","@")
CapsLockDown()
{
return GetKeyState("CapsLock", "P")
}
Remap(original,new)
{
if CapsLockDown()
{
Send, {Blind}%new%
}
else
{
Send, {Blind}%original%
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment