text: #--------------------------------------------------------------------------------------------------------------#
  # Import sub-packages -----------------------------------------------------------------------------------------#
  #--------------------------------------------------------------------------------------------------------------#
  from pynput.keyboard import Key
  from pynput.keyboard import Listener
  
  
  #--------------------------------------------------------------------------------------------------------------#
  # Import files ------------------------------------------------------------------------------------------------#
  #--------------------------------------------------------------------------------------------------------------#
  from audio import setAppVolumeName
  
  
  #--------------------------------------------------------------------------------------------------------------#
  # Constants ---------------------------------------------------------------------------------------------------#
  #--------------------------------------------------------------------------------------------------------------#
  SIM_HIGH = 0.8
  SIM_LOW = 0.05
  
  
  #--------------------------------------------------------------------------------------------------------------#
  # Global variables --------------------------------------------------------------------------------------------#
  #--------------------------------------------------------------------------------------------------------------#
  active_sim = SIM_HIGH
  
  
  #--------------------------------------------------------------------------------------------------------------#
  # Methods -----------------------------------------------------------------------------------------------------#
  #--------------------------------------------------------------------------------------------------------------#
  def on_release(key):
      global active_sim
  
      if key == Key.f1:
          if active_sim == SIM_HIGH:
              setAppVolumeName('FlightSimulator.exe', SIM_LOW)
              print(f'Flight-Simulator volume set to {SIM_LOW * 100}%')
              active_sim = SIM_LOW
  
          elif active_sim == SIM_LOW:
              setAppVolumeName('FlightSimulator.exe', SIM_HIGH)
              print(f'Flight-Simulator volume set to {SIM_HIGH * 100}%')
              active_sim = SIM_HIGH
  
          else:
              setAppVolumeName('FlightSimulator.exe', SIM_HIGH)
              print(f'Flight-Simulator volume set to {SIM_HIGH * 100}%')
              active_sim = SIM_HIGH
  
      # if key == Key.f5:
      #   print('Quit')
      #   exit(1)
  
  
  #--------------------------------------------------------------------------------------------------------------#
  # Execute -----------------------------------------------------------------------------------------------------#
  #--------------------------------------------------------------------------------------------------------------#
  if __name__ == '__main__':
      try:
          with Listener(on_release=on_release) as listener:
              listener.join()
      except Exception as e:
          print(e)
          input()
  