Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudd901 committed Sep 17, 2019
2 parents 8f50185 + e176f03 commit 347a362
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SendInputKeyCommands
Custom wrapper for user23 SendInput keyboard commands
________________________________________________________________

- Reference SendInputKeyCommands.dll in your script.
- Create new instance of SendInputKeyCommands
- Call a SendKey method = win.
________________________________________________________________

This wrapper with convert strings to VirtualKeyCodes for use with SendInput.
It will also detect and use Shift to enter symbols or uppercase letters.
The option for using VirtualKeyCodes directly is still there.

Setup Example:

using System;
using SendInputKeyCommands;

namespace YourHotkeyProgram
{
public static YourClass()
{
public static void Test()
{
SendInputKeyCommand sendKeyComm = new SendInputKeyCommand();

//Example1:
string sentence = "This is a sentence.";
foreach (char c in sentence)
{ sendKeyComm.SendKeyPress(c.ToString()); }

//Example2:
sendKeyComm.SendKeyDown("CTRL");
sendKeyComm.SendKeyPress("v");
sendKeyComm.SendKeyUp("CTRL");

//Example3:
sendKeyComm.SendKeyPress(SendInputKeyCommand.VirtualKeyCode.HOME);

//Example3b:
sendKeyComm.SendKeyPress("Home");
}
}
}


0 comments on commit 347a362

Please sign in to comment.