First of all thanks a lot for the help you provide on this board.
I m really close to make my headset working in order to hang up and hang down a call from an app.
Here is the script :
Code: Select all
SetWorkingDir %A_ScriptDir%
#include ahkhid.ahk
#InstallKeybdHook ;install keyboard hook, enables you to use modifier keys in conjunction with the Powermate
Gui, +LastFound
GuiH := WinExist()
;Intercept WM_INPUT messages
WM_INPUT := 0xFF
OnMessage(WM_INPUT, "InputMsg")
AHKHID_Register(11, 5,GuiH, RIDEV_INPUTSINK) ;register device
InputMsg(wParam, lParam)
{
Local devh, key
Critical ;or otherwise you could get ERROR_INVALID_HANDLE
;get handle of device
devh := AHKHID_GetInputInfo(lParam, II_DEVHANDLE)
If (devh <> -1)
And (AHKHID_GetDevInfo(devh, DI_DEVTYPE, True) = RIM_TYPEHID)
And (AHKHID_GetDevInfo(devh, DI_HID_VENDORID, True) = 27027) ;Replace these three
And (AHKHID_GetDevInfo(devh, DI_HID_PRODUCTID, True) = 45128) ;numbers with your
And (AHKHID_GetDevInfo(devh, DI_HID_VERSIONNUMBER, True) = 257) ;devices numbers.
{
;get the keycode
key := (AHKHID_GetInputInfo(lParam, II_MSE_RAWBUTTONS))
If (key <> -1) ; a
SendInput {Ctrl down}{Shift down}{a down}{Ctrl up}{Shift up}{a up}
}
}
The script was working before a modification i made but i m sure it s about those lines :
Code: Select all
If (key <> -1) ; a
SendInput {Ctrl down}{Shift down}{a down}{Ctrl up}{Shift up}{a up}
Besides sorting that out, i would like to add a fonction which is double tap on that button.
The VendorId / ProductID / Version number are correct
How is this possible?