; Colemak layout for AutoHotkey (MS Windows)
; 2006-01-01 Shai Coleman, https://colemak.com/ . Public domain.
; See https://www.autohotkey.com/ for more information
; This is mainly useful for those who don't have privileges to install a new layout
; This doesn't support the international features of the Colemak layout.
;SetTimer, ExitLabel , 1800000  
;  3600000  /  3,600,000 = 1 hour ,  
; 1800000  / 1,800,000 = half hour 
; 600000  /  600,000       = 10 minutes
;----------------------------------------------------------------------------------------------------------------
SetBatchLines, -1 ; speeds up script
#SingleInstance force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#MaxHotkeysPerInterval 5000
#InstallKeybdHook
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetTitleMatchMode 3  ; Exact matching to avoid confusing T/B with Tab/Backspace.
SetCapsLockState,  off
SetScrollLockSate, off
F4::DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0) ; this puts the computer into standby mode.
                      
;-----------------------------------------------------------------------------------------------------------------
$Backspace::
suspend on
SetScrollLockState, on
send {Backspace}
return
$CapsLock:: ;----------------------- This increases the speed of the backspace key which has been remapped to Capslock.
suspend off  ;----------------------- I have slowed down the character repeat rate of the keyboard so passwords aren't mistyped.
SetScrollLockState, off
Send, {BackSpace}
Sleep, 150 ;150This is the delay in MS before the key starts to repeat
Loop
{
   GetKeyState, Go, CapsLock,P
   If (Go="D")
   {
      Send, {BackSpace}
      Sleep, 25 ;25Lower = Faster; Higher = Slower.
   }
   Else
      Break
}
Return
;------------------------------------------------------------------------------------------------------------
;@::"       ; ------this is for the British keyboard layout. I have swapped the @ symbol for the " symbol.
;"::@    ; ------ This will make the British keyboard like the American keyboard layout.            
@::send {"}       ; In sticky keys mode this will only convert the @ to " but not the other way around.
            
;-------------------------------------------------------------------------------------------------------------    
;tab::return ; disables the tab key. This is useful in typing tests so you press the tab by mistake.
;------------------------------------------------------------------------------------------------------------
;sc122::esc ; the play button
;sc124:: ; the stop button
;sc110:: ; the reverse button 
;sc119:: ; the forward button
;sc120:: ; the mute button
;sc045:: ; the lower button 
;sc130:: ; the higher button
;----------------------------------------------------------------------------------------------------------------
;`::`
;1::1
;2::2
;3::3
;4::4
;5::5
;6::6
;7::7
;8::8
;9::9
;0::0
;-::-
;=::=
;q::q
;w::w
e::f
r::p
t::g
y::j
u::l
i::u
o::y
p::;
;[::[
;]::]
;\::\
;a::a
s::r
d::s
f::t
g::d
;h::h
j::n
k::e
l::i
`;::o
;'::'
;z::z
;x::x
;c::c
;v::v
;b::b
n::k
;m::m
;,::,
;.::.
;/::/
;-----------------------------------------
\::ENTER ; I have used this on a UK keyboard layout which has an extra key next to the left shift key.
;-------------------------;----------- RELEASE KEYS FROM REMAP WHEN MODIFIER DOWN 
*Ctrl:: 
SetKeyDelay -1 
Send {Blind}{Ctrl DownTemp} 
Suspend On 
return 
*Ctrl up:: 
Suspend Off 
SetKeyDelay -1 
Send {Blind}{Ctrl Up} 
return 
*Alt:: 
SetKeyDelay -1 
Send {Blind}{Alt DownTemp} 
Suspend On 
return 
*Alt up:: 
Suspend Off 
SetKeyDelay -1 
Send {Blind}{Alt Up} 
return 
*LWin:: 
SetKeyDelay -1 
Send {Blind}{LWin DownTemp} 
Suspend On 
return 
*LWin up:: 
Suspend Off 
SetKeyDelay -1 
Send {Blind}{LWin Up} 
return 
*RWin:: 
SetKeyDelay -1 
Send {Blind}{RWin DownTemp} 
Suspend On 
return 
*RWin up:: 
Suspend Off 
SetKeyDelay -1 
Send {Blind}{RWin Up} 
return 
;-----------------------------------------------------------------------------------------------------
;ExitLabel: ;--------- This is for the timer mode at the start of the script.
;ExitApp     ;--------  I have disabled these two by putting a semi-colon there. 
;Enable the timer by getting ride of the semi colons at the beginning of the script.
;-----------------------------------------
^x::ExitApp ;------- Control X to exit autohotkey_____________________________
my test score: http://hi-games.net/profile/871
Last edited by jag50 (14-Jun-2008 22:06:47)