Created
October 10, 2018 08:39
-
-
Save anriseth/83732a54ae1682d667b76637b20ab2a8 to your computer and use it in GitHub Desktop.
Autohotkey (AHK) Norwegian Dvorak setup from UK keyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;-- README --------------------------------------------------------------------- | |
; This AHK file re-maps a Qwerty keyboard into a Dvorak keyboard. This is especially useful when | |
; the local computer is limited by corporate security policies to disallow installation of custom | |
; software. AHK can be run as a portable app, and this script then remaps the existing keyboard. | |
; | |
; Original script by: ---------------------------------------------------------- | |
; Torben Gundtofte-Bruun, torben@g-b.dk, http://torben.g-b.dk/+ | |
; | |
; Amended for UK keyboard by by: ----------------------------------------------- | |
; Asbjørn Nilsen Riseth | |
; | |
; | |
; OTHER NOTES: ----------------------------------------------------------------- | |
; Starting with :*C: makes the trigger case sensitive. | |
; | |
;-- LEGEND --------------------------------------------------------------------- | |
; # = Win | |
; ^ = Ctrl | |
; ! = Alt | |
; + = Shift | |
; <^ = Left Ctrl only | |
; >! = Right Alt only = AltGr | |
; $F1 = function key | |
; ~ = pass the key on to the OS (but also use it in AHK). Normally blocked. | |
; {enter}, {tab}, etc. = keystroke | |
; | |
; HISTORY: ------------------------- -------------------------------------------- | |
; 2014-04-28 Created by Torben Gundtofte-Bruun. | |
; 2014-05-05 Nearly complete except for 3 physical DK keys. | |
; 2014-05-06 Simpler remapping based on http://www.autohotkey.com/board/topic/25093-mac-style-dvorak-qwerty-command-layout-switcher-for-windows/?p=162753 | |
; 2014-05-06 Finally fixed those troublesome 3 DK characters :-) http://superuser.com/q/750292/9350 | |
; 2018-10-01 Norwegian Dvorak amended for a UK keyboard, with some modifications | |
; | |
;------------------------------------------------------------------------------- | |
;-- AHK stuff ------------------------------------------------------------------ | |
;-- AUTO-EXECUTE SECTION: | |
#SingleInstance force | |
; ensure we only run 1 copy of this file | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
;#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
;MsgBox Reloaded %A_ScriptName% `n(%A_ScriptDir%) | |
; debug statement to notify me that the script loaded successfully. | |
SetWorkingDir %A_ScriptDir% | |
; Ensures a consistent starting directory. | |
return ; this is the end of the AUTO-EXECUTE SECTION | |
;------------------------------------------------------------------------------- | |
ScrollLock::Suspend | |
Capslock::Control | |
; | |
;-- number row ----------------------------------------------------------------- | |
$SC0029::| | |
$<^>!2::Send {@} | |
$+3::Send {#} | |
$<^>!3::Send {Raw}£ ; AltGr-3 | |
$+6::Send {Raw}& ; Shift-6 | |
$+7::Send {Raw}/ ; Shift-7 | |
$<^>!7::Send {{} ; AltGr-7 | |
$+8::Send {Raw}( ; Shift-8 | |
$<^>!8::[ | |
$+(::) ; Shift-9 | |
$<^>!9::] | |
$+0::Send {Raw}= ; Shift-0 | |
$<^>!0::Send {}} | |
$-::+ | |
$_::? ; Shift-- | |
$SC00D::Send {Raw}\ | |
$+SC00D::Send {Raw}`` | |
;-- top row -------------------------------------------------------------------- | |
$q::Send {Raw}å | |
$+q::Send {Raw}Å | |
$w::, | |
$+w::Send `; | |
$e::Send {Raw}. | |
$+e::Send {Raw}: | |
$r::p | |
$t::y | |
$y::f | |
$u::g | |
$i::c | |
$o::r | |
$p::l | |
$[::Send {Raw}' | |
${::Send {Raw}* | |
$]::Send {Raw}~ | |
$}::Send {Raw}^ | |
;-- home row ------------------------------------------------------------------- | |
;a::a ; no change | |
$s::o | |
$d::e | |
$f::u | |
$g::i | |
$h::d | |
$j::h | |
$k::t | |
$l::n | |
SC027::s | |
SC028::- | |
SC02B::Send {Raw}< | |
+SC02B::Send {Raw}> | |
;-- bottom row ----------------------------------------------------------------- | |
$SC056::Send {Raw}ø | |
$+SC056::Send {Raw}Ø | |
$z::Send {Raw}æ | |
$+z::Send {Raw}Æ | |
x::q | |
c::j | |
v::k | |
b::x | |
n::b | |
;m::m ; no change | |
$,::w | |
$.::v | |
$/::z | |
;-- debugging stuff ------------------------------------------------------------ | |
;#K::KeyHistory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment