Skip to content

chdh/kb-send

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kbSend - Send text through the keyboard

This is a Windows command-line utility program, written in C#. It transfers text data through the keyboard input channel. It is used when the clipboard cannot be used to paste text or for simple automation scripts.

Example for sending a string to the Remote Desktop Client (mstsc.exe):

kbsend -text "abc" -windowTitle "Remote Desktop Connection"

Example for copying text from the clipboard to the Citrix Client:

kbsend -clipboard -windowExe "\CDViewer.exe" -charDelay 12 -lineDelay 125

Parameters

Input text

-text "..." Text string passed as a parameter. -clipboard Text is read from the clipboard. -file <fileName> Text is read from a file. 

Target window

-nextWindow Moves the focus to the next window. Windows Explorer windows are ignored. This is the default. -currentWindow Keeps the current focus window. -windowTitle "title substring" Moves the focus to the window with the specified string in the title. Case-insensitive substring search is used to compare the window titles. -windowExe "exe file path substring" Moves the focus to the window with the specified string in the EXE file path. Case-insensitive substring search is used to compare the EXE file paths. 

Misc. options

-charDelay <ms> Delay per character in milliseconds. Default is 1. -lineDelay <ms> Delay per line in milliseconds. Default is 25. -sendHomeKey Sends HOME after ENTER when the previous line started with blanks. This is necessary when line indent is inherited from the line above. -sendEscKey Sends ESC before ENTER at end of line. This is necessary to close a popup e.g. for Microsoft SQL Server Management Studio. -listWindows Lists window titles and EXE file names of the desktop windows. -help Displays this help text.