; Clove 2 ; AutoHotKey Translation Layer ; Variable definitions Active = 0 Suspend, On ;Start with everything except enabling disabled return ;setup complete ;=========Start Activation Handling ^!c:: Suspend, Permit ;Allow this to active even when suspension is on (Active=0) Active:=1-Active ;Switch the active state MMode=0 ;Reset the mode to ensure that we start in Mode 0 (alpha) if Active=1 { Soundbeep, 262, 200 Soundbeep, 330, 200 Soundbeep, 392, 200 MMode = 0 MCtrl = 0 MAlt = 0 MShift = 0 BounceLast = "" ;For debouncing usage BouncePend = 0 ;Is there a debounce timer active? Suspend, Off } else { Suspend, On ;Suspend BEFORE the tones Soundbeep, 392, 200 Soundbeep, 330, 200 Soundbeep, 262, 200 } return ;==========End Activation Handling ;==>== 1 6 H ++ y Y Up Up ==<== $ScrollLock::SendTranslation("y","Y","{Up}","{Up}","","") ;==>== 2 7 H ++ f F Down Down < < ==<== $PrintScreen::SendTranslation("f","F","{Down}","{Down}","<","<") ;==>== 3 8 H ++ g G Right Right ~ ~ | ==<== $F11::SendTranslation("g","G","{Right}","{Right}","~","~") ;==>== 4 9 H ++ w W Left Left > > | ==<== $F9::SendTranslation("w","W","{Left}","{Left}",">",">") ;==>== 5 10 H + o O 8 * ; F5 | ==<== $F7::SendTranslation("o","O","8","*",";","{F5}") ;==>== 6 11 H + i I 4 $ ? F4 | ==<== $F5::SendTranslation("i","I","4","$","?","{F4}") ;==>== 7 12 H + n N 5 % + F3 | ==<== $6::SendTranslation("n","N","5","%","{+}","{F3}") ;==>== 8 13 H + h H 9 ( ' F2 | ==<== $4::SendTranslation("h","H","9","(","'","{F2}") ;==>== 9 14 H 0 Space - - - - - - - - - - - - - - - - - - - - > | Always a space ==<== $3::SendTranslation("{Space}","{Space}","{Space}","{Space}","{Space}","{Space}") ;==>== 10 15 H 0 Mode - - - - - - - - - - - - - - - - - - - - > | $F3:: MMode++ Soundbeep 262, 100 If MMode=3 { Soundbeep 131, 100 MMode=0 } return ;==>== 11 16 H 0 Shift - - - - - - - - - - - - - - - - - - - - > | $F1:: MShift++ If MShift=3 MShift=0 return ;==>== 12 17 H 0 Ctrl - - - - - - - - - - - - - - - - - - - - > | $Escape:: MCtrl:=1-MCtrl return ;==>== 13 14 G + s S End End = | Knuckles rub $e::SendTranslation("s","S","{End}","{End}","=","") ;==>== 14 15 G + r R Home Home ] | " $Delete::SendTranslation("r","R","{Home}","{Home}","]","") ;==>== 15 16 G + d D 6 ^ [ | " $PgDn::SendTranslation("d","D","6","{^}","[","") ;==>== 16 17 G + l L 7 & _ | " $Tab::SendTranslation("l","L","7","&","_","") ;==>== 17 7 E +++ z Z App App | $NumpadDiv::SendTranslation("z","Z","{AppsKey}","{AppsKey}","","") ;==>== 18 8 E +++ q Q Win Win | $Home::SendTranslation("q","Q","{LWin}","{LWin}","","") ;==>== 19 9 E ++ j J Tab Tab | $0::SendTranslation("j","J","{Tab}","{Tab}","","") ;==>== 20 11 E ++ x X Esc Esc \ F12 | $=::SendTranslation("x","X","{Esc}","{Esc}","\","{F12}") ;==>== 21 12 E ++ v V Enter Enter | F11 | $y::SendTranslation("v","V","{Enter}","{Enter}","|","{F11}") ;==>== 22 13 E + u U 3 # / F1 | $r::SendTranslation("u","U","3","{#}","/","{F1}") ;==>== 23 15 E ++ k K ` ^ F10 | $Insert::SendTranslation("k","K","`","{^}","","{F10}") ;==>== 24 16 E ++ b B PgUp PgUp { F9 | $PgUp::SendTranslation("b","B","{PgUp}","{PgUp}","{{}","{F9}") ;==>== 25 17 E ++ p P PgDn DgDn } F8 | $1::SendTranslation("p","P","{PgDn}","{PgDn}","{}}","{F8}") ;==>== 26 1 H 0 Alt - - - - - - - - - - - - - - - - - - - - - > | $Pause:: MAlt:=1-MAlt return ;==>== 27 3 H 0 e E 2 @ " | $Right::SendTranslation("e","E","2","@","^'","") ;==>== 28 12 F + m M Del Del - F7 | $7::SendTranslation("m","M","{Del}","{Del}","-","{F7}") ;==>== 29 13 F + c C BkSp BkSp : F6 | $5::SendTranslation("c","C","{Backspace}","{Backspace}",":","F6") ;==>== 30 16 F 0 t T 0 ) . | $F2::SendTranslation("t","T","0",")",".","") ;==>== 31 17 F 0 a A 1 ! , | $`::SendTranslation("a","A","1","{!}",",","") $F10::return ;==Begin Functions SendTranslation(a, b, c, d, e, f) { global ;==Choose key based on Mode and Shift if (MShift=0 and MMode=0) out=%a% if (MShift<>0 and MMode=0) out=%b% if (MShift=0 and MMode=1) out=%c% if (MShift<>0 and MMode=1) out=%d% if (MShift=0 and MMode=2) out=%e% if (MShift<>0 and MMode=2) out=%f% If BouncePend=1 { If BounceLast=%out% return } BounceLast=%out% SetTimer, ClearDebounce, -250 ;only run once BouncePend = 1 ;==Apply modifiers if MAlt=1 out= !%out% if MCtrl=1 out= ^%out% ;==Send the key SendInput, %out% Soundbeep 131, 10 ;==Reset Modifiers if MShift=1 MShift=0 MAlt=0 MCtrl=0 } ClearDebounce: ;global BouncePend = 0 return