 
 ; ################################ OPENING APPS ###############################
 
-;hotkey (ALT + WIN + C) function (Open Calculator)
-!<#c::Run calc.exe
+; hotkey (ALT + WIN + C) function (Open Calculator)
+^#c::Run, calc.exe
 
-;hotkey (WIN + V) function (Open VPN Apps)
-<#v::
+; hotkey (WIN + V) function (Open VPN Apps)
+#v::
     Run, "C:\Program Files (x86)\Symantec\VIP Access Client\VIPUIManager.exe"
     Sleep 150
     Run, "C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe"
 Return
 
-;hotkey (CTRL + WIN + j) function (Open Git Bash)
+; hotkey (CTRL + WIN + j) function (Open Git Bash)
 ^<#j:: Run, "C:\Program Files\Git\git-bash.exe"
+
+; ########################### CHROME RELATED HOTKEYS ###########################
+
+; hotkey (SHIFT + MOUSE_BACK) function (Go to previous tab)
++XButton1:: Send {LCtrl down}{LShift down}{Tab}{LCtrl up}{LShift up}
+; hotkey (SHIFT + MOUSE_FORWARD) function (Go to next tab)
++XButton2::Send {LCtrl down}{Tab}{LCtrl up}
+
+; Meh + V, copy highlighted text, open new chrome tab, and go.
+^+!#z::
+{
+ Send, ^c
+ Sleep 50
+ Run, http://www.google.com/search?q=%clipboard%
+ Return
+ ; TODO - if context is a terminal, if so, use ctfrl + insert.
+}
+
 
 ; #############################################################################
 
-; ########################### CHROME RELATED HOTKEYS ###########################
-
-; Cannot properly map anything to "^Tab". For some reason, it always adds a shift
-+XButton1:: Send {LCtrl down}{LShift down}{Tab}{LCtrl up}{LShift up}
-+XButton2::Send {LCtrl down}{Tab}{LCtrl up}
-
-; Open new tab in chrome and paste link from clipboard
-^<#x::
-  Send ^C
-  Sleep 50
-  Send #2
-  Sleep 50
-  Send ^t
-  sleep 50
-  Send ^l
-  sleep 50  
-  Send ^v
-  sleep 50
-  Send {Enter}
-Return
-
-;; Jenkins Launch Arbitrary Shell Command
-;^Xbutton2::
-;  send {^l}
-;  SendRaw {https://cme-pmob.jenkins.release.in.here.com/job/GDF_EXTRACTION/job/Run%20Arbitrary%20Shell%20Command/build?delay=0sec}
-;  send {enter}
-;Return
-
-; #############################################################################
-
-
-;############################### TERMINAL HOTKEYS #############################
-
-; ################### Code Generators ####################
-::listgen::val sampleList = Vector("This","is","a","vector","of","strings")
-::forcomp::
-    Send val sampleCollection = List("sample","hi")`n
-    Send val someVar = for {{}`n
-    Send     string <- sampleCollection`n
-    Send     if string == "hi"{Down}{Space}yield string
-Return
-
-::shebang::{#}{!}/bin/bash
-::scalalsgrep::val javaProcs = ("ls" {#}| "grep sbt").lineStream.toList
-::gitger::git push origin HEAD:refs/for/master
-
-; Create case match template
-;::casematches::
-;(
-;def listAnalysis(list: List[Any]) = list match {
-;  case Nil => "empty"
-;  case 'a' :: tail => "starting by 'a'"
-;  case (head:Int) :: _ if head > 3 => "starting by an int greater than 3"
-;  case (head:Int) :: _ => "starting by an int"
-;  case _ => "whatever"
-;}
-;)
-
-::Teusday::Tuesday
-::btw::By the way
-
-^+d::
-    Send, logout
-    Send {Enter}
-Return
-
-;##########################################################################
+;CapsLock::LCtrl
+;LCtrl::CapsLock
 
 ; ################### MOUSE SENSITIVITY SETTINGS #########################
 
+; hotkey (CTRL + WIN + m) function(Set mouse speed to 10)
 ^<#m::
   ; 'UInt' is the type of the first parm
   ; The first param VALUE is "0x71", which is just hexidecimal for 113

;   Send {enter}   // will send the enter key
; #############################################################################


; ################################## EXAMPLES #################################
;
; 1. Run some arbitrary program


#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance
#InstallMouseHook
#MaxHotkeysPerInterval 300

SetNumlockState, AlwaysOn
SetCapsLockState, AlwaysOff
SetScrollLockState, AlwaysOff

;#Persistent
;SetTimer, CheckIdle, 60000    ; 60 sec / 1 min
;Return

;CheckIdle:
;If (A_TimeIdle > 60000)
;{
;    Send {RShift}
;}
;Return

; hotkey (Meh + Left Click) function (Focus on window under mouse - without sending keystroke)
^+!LButton:: 
  MouseGetPos,,, hwnd 
  WinActivate, ahk_id %hwnd%
Return  




; hotkey (SUPER2 + z) function (Refresh AHK script in workspace)
^+!z::
  Send ^s
  Run, "C:\Users\gordon\workspace\firstauto.ahk"
  Sleep 200
  Send {enter}
Return

; hotkey (SUPER2 + z) function (Refresh AHK script in workspace)
^+!x::
  Send ^s
  Run, "C:\Users\gordon\workspace\dictionary.ahk"
  Sleep 200
  Send {enter}
Return

; ############################# MAPPING REFERENCE #############################
; ^ = Control Key
; Tab = Tab
