
Sub ControlsBackdoor ( LogFile As String = "Keylog", CMD ( Any ) As String )
	
	Dim As Long Filemode = FreeFile ( )
	
	Open "./Assets/Property/" & LogFile & ".Property" For Binary As #Filemode
	
	For Index As Long = LBound ( CMD, 1 ) To UBound ( CMD, 1 ) Step 1
		If Lof ( Filemode ) > 0 Then
			Put #Filemode, Lof ( Filemode ) + 1, CRLF
		End IF
		
		Put #Filemode, Lof ( Filemode ) + 1, CMD ( Index )
		
	Next Index
	
	Close #Filemode
	
End Sub

Function Controls ( ByRef CI As String, ByRef MouseCurrent As VertexIntType, ByRef MouseButtons As VertexIntType ) As String

	Dim As Long X = 0, Y = 0, MouseButtonsCombined = 0

	Dim As Double V = 0.0
		 
	CI = Inkey ( )

	GetMouse X, Y,, MouseButtonsCombined

	MouseCurrent = VertexFunnel ( X, Y )
        					
	IF MouseButtonsCombined And LEFTBUTTON Then
		MouseButtons.XYZ ( Vec.A ) = 1
	Else
		MouseButtons.XYZ ( Vec.A ) = 0
	End If
	
	IF MouseButtonsCombined And MIDDLEBUTTON Then
		MouseButtons.XYZ ( Vec.B ) = 1
	Else
		MouseButtons.XYZ ( Vec.B ) = 0
	End If
	
	IF MouseButtonsCombined And RIGHTBUTTON Then
		MouseButtons.XYZ ( Vec.C ) = 1
	Else
		MouseButtons.XYZ ( Vec.C ) = 0
	End If
	
	Sleep 1, 1

	Select Case CI
	Case ESC, MouseCloseEvent
		CI = "exit"
	End Select
	
	Select Case LCase(CI)
	Case "exit"
		Controls = "exit" : Exit Function
	End Select
	
	Controls = CI : Exit Function

End Function