Mouse to mouse raw input/bypass?
8 posts
• Page 1 of 1
Mouse to mouse raw input/bypass?
Hello there!
I use a Titan Two with a XboxOne controller for both the Xbox One and MAINLY PC. Recently I started to play FPS in my PC with mouse&keyboard and missed my scripts...
I tried to create macros on the Logitech G HUB, but it SUCKS!!!
Why the GTUNER does't have a mouse to mouse or mouse to keyboard biding?? The perfect scenario would be a mouse movement raw/bypass and a buttons remapping/key biding...
Any comments?
I use a Titan Two with a XboxOne controller for both the Xbox One and MAINLY PC. Recently I started to play FPS in my PC with mouse&keyboard and missed my scripts...
I tried to create macros on the Logitech G HUB, but it SUCKS!!!
Why the GTUNER does't have a mouse to mouse or mouse to keyboard biding?? The perfect scenario would be a mouse movement raw/bypass and a buttons remapping/key biding...
Any comments?
-
Brunissimus - Staff Sergeant
- Posts: 10
- Joined: Tue Apr 11, 2017 11:34 am
Re: Mouse to mouse raw input/bypass?
Brunissimus wrote:Why the GTUNER does't have a mouse to mouse or mouse to keyboard biding?? The perfect scenario would be a mouse movement raw/bypass and a buttons remapping/key biding..
It already does.
This can be done using the key_passthru() and mouse_passthru() functions, just make sure to use the USB Multi-interface HID output though.
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
Re: Mouse to mouse raw input/bypass?
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Mouse to mouse raw input/bypass?
DontAtMe wrote:Brunissimus wrote:Why the GTUNER does't have a mouse to mouse or mouse to keyboard biding?? The perfect scenario would be a mouse movement raw/bypass and a buttons remapping/key biding..
It already does.
This can be done using the key_passthru() and mouse_passthru() functions, just make sure to use the USB Multi-interface HID output though.
Thanks A LOT!!!
-
Brunissimus - Staff Sergeant
- Posts: 10
- Joined: Tue Apr 11, 2017 11:34 am
Re: Mouse to mouse raw input/bypass?
For a complete anti recoil + rapid fire script for USB HID search the online resource for "usb-hid anti recoil" (with the quotes)
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Mouse to mouse raw input/bypass?
Trick question: is it possible to passthru only the "movement" of the mouse? Because my goal is to remap and script the mouse buttons...
-
Brunissimus - Staff Sergeant
- Posts: 10
- Joined: Tue Apr 11, 2017 11:34 am
Re: Mouse to mouse raw input/bypass?
This might be able to do it. It will send the buttons always as "not pressed" but should forward the mouse movements correctly:
- Code: Select all
#include <mouse.gph>
bool bMouseUpdate; // regular update via MREPORT_UPDATED reported (input event found)
bool bMouseForce; // manual update because of rapid fire or anti recoil or other script actions
int32 m[] = { 0, 0, 0, 0}; // mouse x,y,wheel,button1
#define M_X 0
#define M_Y 1
#define M_W 2
#define M_1 3
init {
port_connect(PORT_USB_C, PROTOCOL_HID);
keymapping(); // required for USB Multi Interface HID keyboard
mousemapping(); // required for USB Multi Interface HID mouse
}
main {
key_passthru(); // required for USB Multi Interface HID keyboard
// no mouse pass_thru .. gets send by T2 code instead to override the mouse buttons and movement
fMouseReset();
fMouseUpdate();
fMouseOutput();
}
void fMouseReset() {
m[M_X]=0; m[M_Y]=0; m[M_W]=0;
}
void fMouseUpdate() {
if(mouse_status(MREPORT_UPDATED)) {
bMouseUpdate=TRUE;
m[M_X]=mouse_status(MOUSE_X);
m[M_Y]=mouse_status(MOUSE_Y);
m[M_W]=mouse_status(MOUSE_WHEEL);
m[M_1]=mouse_status(MBUTTON_1);
// do something on mouse button status here:
//if (mouse_status(MBUTTON_1))
//if (mouse_status(MBUTTON_2))
//if (mouse_status(MBUTTON_3))
//if (mouse_status(MBUTTON_4))
//if (mouse_status(MBUTTON_5))
}
}
void fMouseButtons() {
//mouse_set(MBUTTON_1, mouse_status(MBUTTON_1) ? TRUE : FALSE); // <- example to send mouse button status as it is
mouse_set(MBUTTON_1, FALSE); // set all to not pressed
mouse_set(MBUTTON_2, FALSE);
mouse_set(MBUTTON_3, FALSE);
mouse_set(MBUTTON_4, FALSE);
mouse_set(MBUTTON_5, FALSE);
}
void fMouseOutput() {
if (bMouseUpdate || bMouseForce) {
mouse_set(MOUSE_X,m[M_X]);
mouse_set(MOUSE_Y,m[M_Y]);
mouse_set(MOUSE_WHEEL,m[M_W]);
fMouseButtons();
}
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Mouse to mouse raw input/bypass?
Scachi wrote:This might be able to do it. It will send the buttons always as "not pressed" but should forward the mouse movements correctly:
- Code: Select all
#include <mouse.gph>
bool bMouseUpdate; // regular update via MREPORT_UPDATED reported (input event found)
bool bMouseForce; // manual update because of rapid fire or anti recoil or other script actions
int32 m[] = { 0, 0, 0, 0}; // mouse x,y,wheel,button1
#define M_X 0
#define M_Y 1
#define M_W 2
#define M_1 3
init {
port_connect(PORT_USB_C, PROTOCOL_HID);
keymapping(); // required for USB Multi Interface HID keyboard
mousemapping(); // required for USB Multi Interface HID mouse
}
main {
key_passthru(); // required for USB Multi Interface HID keyboard
// no mouse pass_thru .. gets send by T2 code instead to override the mouse buttons and movement
fMouseReset();
fMouseUpdate();
fMouseOutput();
}
void fMouseReset() {
m[M_X]=0; m[M_Y]=0; m[M_W]=0;
}
void fMouseUpdate() {
if(mouse_status(MREPORT_UPDATED)) {
bMouseUpdate=TRUE;
m[M_X]=mouse_status(MOUSE_X);
m[M_Y]=mouse_status(MOUSE_Y);
m[M_W]=mouse_status(MOUSE_WHEEL);
m[M_1]=mouse_status(MBUTTON_1);
// do something on mouse button status here:
//if (mouse_status(MBUTTON_1))
//if (mouse_status(MBUTTON_2))
//if (mouse_status(MBUTTON_3))
//if (mouse_status(MBUTTON_4))
//if (mouse_status(MBUTTON_5))
}
}
void fMouseButtons() {
//mouse_set(MBUTTON_1, mouse_status(MBUTTON_1) ? TRUE : FALSE); // <- example to send mouse button status as it is
mouse_set(MBUTTON_1, FALSE); // set all to not pressed
mouse_set(MBUTTON_2, FALSE);
mouse_set(MBUTTON_3, FALSE);
mouse_set(MBUTTON_4, FALSE);
mouse_set(MBUTTON_5, FALSE);
}
void fMouseOutput() {
if (bMouseUpdate || bMouseForce) {
mouse_set(MOUSE_X,m[M_X]);
mouse_set(MOUSE_Y,m[M_Y]);
mouse_set(MOUSE_WHEEL,m[M_W]);
fMouseButtons();
}
}
Thanks a LOT! I will try it tonight
-
Brunissimus - Staff Sergeant
- Posts: 10
- Joined: Tue Apr 11, 2017 11:34 am
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 64 guests