Git Product home page Git Product logo

ibinputsimulator's Introduction

IbInputSimulator

A library for simulating keyboard and mouse input with drivers.

Download

Releases

Supported drivers

  • Logitech Gaming Software

    No Logitech hardware required. However, in the new versions of LGS, the mouse driver has been removed (#8). You can install v9.02.65 to make the mouse driver available.

    e.g. IbSendInit("Logitech")

  • Logitech G HUB

    No Logitech hardware required. However, in the new versions of G HUB, the mouse driver has been removed (#8). Unfortunately, there is currently no known way to install an old version.

    e.g. IbSendInit("Logitech")

  • Razer Synapse 3

    In the new versions of Razer Synapse, Razer hardware is required to make the driver available. The old versions do not require Razer hardware, but the online installer of Razer Synapse can only install the newest version. To install an old version manually, see #7 for details.

    e.g. IbSendInit("Razer")

  • MouClassInputInjection

    e.g. IbSendInit("MouClassInputInjection", 1, process_id)

  • DD Virtual Mouse & Virtual Keyboard

    May cause a blue screen; difficult to uninstall cleanly; need network.

    To use it, put the DLL (DD94687.64.dll/DD64.dll/DDHID64.dll) with your script file, and then:

    IbSendInit("DD")

    or specify the DLL path when call IbSendInit:

    IbSendInit("DD", 1, "C:\SomeDir\DD64.dll")
  • EDI (private, not for sale)

Software compatibility

Software SendInput Logitech Razer MCII DD EDI DM Other
Blade & Soul (Korean) ✔️ ✔️ ✔️ ❌ SendInput hook
Genshin High

For SendInput, software with High indicates that the target process usually has a high integrity level, which may block SendInput due to UIPI. To put it simply, this means that you need to run the input simulator with administrator privileges.

Supported languages

AutoHotkey

AutoHotkey v2 AutoHotkey v1
; Run Notepad, type "Hello world!"
; and then select all text by mouse.

#Include "IbInputSimulator.ahk"

IbSendInit()  ; IbSendInit("AnyDriver", 1)

Send("#r")
WinWaitActive("ahk_class #32770")
Send("notepad`n")

WinWaitActive("ahk_exe notepad.exe")
Send("Hello world{!}")
Sleep(100)
MouseClickDrag("Left", 5, 5, 150, 50)
; Run Notepad, type "Hello world!"
; and then select all text by mouse.

#Include %A_ScriptDir%
#Include IbInputSimulator.ahk

IbSendInit() ; IbSendInit("AnyDriver", 1)

Send #r
WinWaitActive, ahk_class #32770
Send notepad`n

WinWaitActive, ahk_exe notepad.exe
Send Hello world{!}
Sleep 100
CoordMode, Mouse, Client
MouseClickDrag, Left, 5, 5, 150, 50

Build

vcpkg:

vcpkg install detours rapidjson --triplet=x64-windows-static

CMake (or open the directory with Visual Studio and config it manually):

mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE="C:\...\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build . --config Release

For the test you also need:

vcpkg install boost-test fmt

And add -DBUILD_TESTING=ON when calling cmake .. .

See also

Credits

Sponsors:

Date Sponsor Comment
2022-04-03 任性 MouClassInputInjection
2023-04-22 任性 Logitech
2023-02-28 -
2021-08-28 任性 Razer

ibinputsimulator's People

Contributors

chaoses-ib avatar pennywise007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ibinputsimulator's Issues

Install LGS drivers without installing LGS

"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\lgAudio.inf" DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\LGSBulk\LGPBTDD.inf" DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\LGSHidFilter\LGSFMouHID.inf" DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\LGSHidFilter\LGSFUsbFilt.inf" DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\VirtualBus\LGBusEnum.inf" npnp=root\LogiGamePanelVirtualBus DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\VirtualBus\LGVirHid.inf" DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\LGJoyHid.inf" DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\DifxInstaller.exe" install "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\WinUSB\LGJoyWinUsb.inf" DRIVER_PACKAGE_FORCE
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\LGCoreTempInstall.exe" /S /company=Logitech
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\Install_apo.exe" --remove 1 --inf "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\lgAudio.inf"
"C:\Program Files\Logitech Gaming Software\Drivers\Installers\Install_apo.exe" --repair --inf "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\lgAudio.inf"

"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\LCD\x86\LgLcdApi.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\LCD\x64\LgLcdApi.dll"
 /s "C:\Program Files\Logitech Gaming Software\SDK\LCD\x64\LgLcdApi.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\G-key\x86\LogitechGkey.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\G-key\x64\LogitechGkey.dll"
 /s "C:\Program Files\Logitech Gaming Software\SDK\G-key\x64\LogitechGkey.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\LCD\x86\LogitechLcd.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\LCD\x64\LogitechLcd.dll"
 /s "C:\Program Files\Logitech Gaming Software\SDK\LCD\x64\LogitechLcd.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\LED\x86\LogitechLed.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\LED\x64\LogitechLed.dll"
 /s "C:\Program Files\Logitech Gaming Software\SDK\LED\x64\LogitechLed.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\Arx Control\x86\LogitechGArxControl.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\Arx Control\x64\LogitechGArxControl.dll"
 /s "C:\Program Files\Logitech Gaming Software\SDK\Arx Control\x64\LogitechGArxControl.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\SteeringWheel\x86\LogitechSteeringWheel.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\SDK\SteeringWheel\x64\LogitechSteeringWheel.dll"
 /s "C:\Program Files\Logitech Gaming Software\SDK\SteeringWheel\x64\LogitechSteeringWheel.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\LGCapturePropPage.dll"
 /s "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\LGCapturePropPage.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\LGRenderPropPage.dll"
 /s "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\LGRenderPropPage.dll"
"regsvr32" /s "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\LGSpeakerPropPage.dll"
 /s "C:\Program Files\Logitech Gaming Software\Drivers\USBAudio\LGSpeakerPropPage.dll"

"C:\Program Files\Logitech Gaming Software\Drivers\APOService\LogiRegistryService.exe" -install
"C:\Program Files\Logitech Gaming Software\Drivers\APOService\LogiRegistryService.exe" -start
C:\WINDOWS\system32\services.exe
"C:\Program Files\Logitech Gaming Software\Drivers\APOService\LogiRegistryService.exe"

"C:\WINDOWS\system32\regsvr32" /s "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\LgJoyFrc.dll"
 /s "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\LgJoyFrc.dll"
"C:\WINDOWS\SysWOW64\regsvr32" /s "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\LgJoyFrc32.dll"
"C:\WINDOWS\system32\regsvr32" /s "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\LGHppFrc.dll"
 /s "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\LGHppFrc.dll"
"C:\WINDOWS\SysWOW64\regsvr32" /s "C:\Program Files\Logitech Gaming Software\Drivers\LGJoyHid\LGHppFrc32.dll"
"C:\WINDOWS\system32\regsvr32" /s "C:\Program Files\Logitech Gaming Software\LGJoyDriverAPI.dll"
 /s "C:\Program Files\Logitech Gaming Software\LGJoyDriverAPI.dll"

"C:\Program Files\Logitech Gaming Software\Drivers\Installers\OverwolfInstallerLogitech.exe" -silent

Install Razer drivers without installing Razer Synapse

I also found that you can actually install the RzComDriver without Synapse. There are various logs generated by razer synapse and one of them is Manifest.log this contains an XML manifest of all software products from razer. I have a console app I wrote in c# that actually uses the C# API used by Razers software to download the same Manifest file.

Within the Manifest, there is a link to the full Razer Synapse install (eg: https://cdn.razersynapse.com/1665042231FcnE6gEARazerSynapseSetup_v3.7.1015.100615.exe).

This exe is in a format that can be extracted from and within the $PLUGINSDIR RzComDriver_vx.x.xx.x.exe exists which is the Razer Common Control Driver.

image

image

Originally posted by @ChrisKader in #6 (comment)

how to mouse move?

i cant seem make it work please help

loot()
{
  pixelSearch, lootX1, lootY1, 744, 341, 836, 458, 0x6B29A5, 0, Fast RGB
  if(ErrorLevel) {
  return
} else if(!ErrorLevel) { 

Newlootx1 := lootX1 + 20
Newlooty1 := lootY1 + 40
IbSendMouseMove("{%Newlootx1%, %Newlooty1%}")     ;---------- i cant make it work
sleep, 150
IbSend("{click down}")
sleep, 30
IbSend("{click up}")
sleep, 500
return
    } else {
        sleep, 10
        return
    }
}

edit:
this seems to work if i specified my coords
IbSend("{click 1179 83 0}")

but i cant make this work
IbSend("{click %NewlootX% %NewlootY% 0}")

any ideas T_T

awesome it bypass gameguard but how to controlsend?

im so amazed that it bypassed my gameguard for macro
most of keystroke and clicks working 100% perfectly

but can i ask how to controlsend(send keystroke to background) like this?
ControlSend, ahk_parent, {F2}, ahk_exe choboApp.exe

i tried this but i cant make it work
IbSend("ControlSend, ahk_parent, {F2}, ahk_exe choboApp.exe")

please help me.. thank you for awesome library!

Memory leaks on every success call of the `IbSendInit `

When user receives Send::Error::Success from IbSendInit function it means that send variable has been initialized with any of the 'SendTypes'. But when we stop the program it calls IbSendDestroy, or in my case I can call this function several times to reinit dll with another driver with calling IbSendDestroy before Init.
IbSendDestroy checks if send variable is not empty and calls send.release(). Which leads to the memory leak. I guess you call it because you got problems with inheritance and if you simply replace this line with main::send.reset() it will fail to destroy objects.
It can be also resolved by adding default destructor to Base class like:
virtual ~Base() = default;

您好,請問如何讓python使用IbAhkSend.dll?

如題,以下是萌新小弟我的代碼:

import ctypes
import os
import time

root = os.path.abspath(os.path.dirname(file))
driver = ctypes.CDLL(f'{root}/IbAhkSend.dll')
driver.IbSendInit("Logitech")

for i in range(5):

driver.IbSendKeybdDown('n')
driver.IbSendKeybdDownUp('n')  

print('press n')
time.sleep(1)

報錯:
OSError: exception: access violation reading 0x0000000000000000

雖然可能是個白癡問題,但還是請大佬指教一下~~

alt and shift keys issue

i cant seem make alt or shift keys work am i doing wrong?

alt 3 for example
please help thank you

 IbSend("{alt down}")
 sleep, 40
 IbSend("{3 down}")
sleep, 60
IbSend("{3 up}")
sleep, 60
IbSend("{alt up}")

示例程序无法正常工作

C:\L\C++\packages\IbInputSimulator-0.3\AhkDll\AhkDll.vcxproj : error : 找不到导入的项目“C:\L\C++\packages\IbWinCppLib\IbWinCppLib.props”。请确认 Import 声明“C:\L\C++\packages\IbWinCppLib\IbWinCppLib.props”中的表达式正确,且文件位于磁盘上。 C:\L\C++\packages\IbInputSimulator-0.3\AhkDll\AhkDll.vcxproj C:\L\C++\packages\IbInputSimulator-0.3\AhkDll.Test\AhkDll.Test.vcxproj : error : 找不到导入的项目“C:\L\C++\packages\IbWinCppLib\IbWinCppLib.props”。请确认 Import 声明“C:\L\C++\packages\IbWinCppLib\IbWinCppLib.props”中的表达式正确,且文件位于磁盘上。 C:\L\C++\packages\IbInputSimulator-0.3\AhkDll.Test\AhkDll.Test.vcxproj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.