 #UseHook
 
 
-is_target()
+is_not_terminal()
 {
-  ; In terminal app, I disable AHK
   ifWinActive,ahk_exe WindowsTerminal.exe
     return 1
   return 0
+}
+
+is_vscode()
+{
+  ifWinActive,ahk_exe Code.exe
+    return 0
+  return 1
 }
 
 

; Mac-style commands

<#a::
  if is_target()
    send %A_ThisHotkey%
  else
    send ^a
  return


; Cursor

^a::
  if is_not_terminal()
    send %A_ThisHotkey%
  else
    send {HOME}
  return

^e::
  if is_not_terminal()
    send %A_ThisHotkey%
  else
    send {END}
  return

^p::
  if is_not_terminal()
    send %A_ThisHotkey%
  else
    send {Up}
  return

^n::
  if is_not_terminal()
    send %A_ThisHotkey%
  else
    send {Down}
  return

^f::
  if is_not_terminal()
    send %A_ThisHotKey%
  else
    send {Right}
  return

^+f::
  if is_not_terminal()
    send %A_ThisHotKey%
  else
    send ^f
  return

^b::
  if is_not_terminal()
    send %A_ThisHotKey%
  else
    send {Left}
