Bug with the MWHEEL_FORWARD and MWHEEL_BACKWARD maps?
5 posts
• Page 1 of 1
Bug with the MWHEEL_FORWARD and MWHEEL_BACKWARD maps?
When I run the following script, scrolling up OR down will output "ab". Have I done something wrong or is there a problem with the mappings?
I wonder if this is the cause - both the middle click and scroll up seems to be mapped to the same index:
- Code: Select all
#include <keyboard.gph>
#include <mouse.gph>
init {
port_connect(PORT_USB_C, PROTOCOL_HID);
keymapping();
mousemapping();
}
main {
key_passthru();
mouse_passthru();
if(mouse_status(MWHEEL_FORWARD)) {
key_set(KEY_A, TRUE);
}
if(mouse_status(MWHEEL_BACKWARD)) {
key_set(KEY_B, TRUE);
}
}
I wonder if this is the cause - both the middle click and scroll up seems to be mapped to the same index:
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
Re: Bug with the MWHEEL_FORWARD and MWHEEL_BACKWARD maps?
- Code: Select all
#include <keyboard.gph>
#include <mouse.gph>
init {
port_connect(PORT_USB_C, PROTOCOL_HID);
keymapping();
mousemapping();
}
main {
key_passthru();
mouse_passthru();
if(mouse_status(MREPORT_UPDATED)){
if(mouse_status(MWHEEL_FORWARD) == 1) key_set(KEY_A, TRUE);
if(mouse_status(MWHEEL_BACKWARD) == -1) key_set(KEY_B, TRUE);
}
}
The middle mouse button is is mapped as MBUTTON_3 not MOUSE_WHEEL.pablosscripts wrote:I wonder if this is the cause - both the middle click and scroll up seems to be mapped to the same index:
MOUSE_WHEEL can be used as an Alternative of MWHEEL_FORWARD and MWHEEL_BACKWARD like this,
- Code: Select all
if(mouse_status(MREPORT_UPDATED)){
//MWHEEL_FORWARD
if(mouse_status(MOUSE_WHEEL) == 1) key_set(KEY_A, TRUE);
//MWHEEL_BACKWARD
if(mouse_status(MOUSE_WHEEL) == -1) key_set(KEY_B, TRUE);
}
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
Re: Bug with the MWHEEL_FORWARD and MWHEEL_BACKWARD maps?
Thank you!!!!
What is mouse_forward and mouse_backward then? The documentation isn’t super clear
What is mouse_forward and mouse_backward then? The documentation isn’t super clear
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
Re: Bug with the MWHEEL_FORWARD and MWHEEL_BACKWARD maps?
pablosscripts wrote:Thank you!!!!
What is mouse_forward and mouse_backward then? The documentation isn’t super clear
For use when manually creating a mousemapping() function.
- Code: Select all
#include <mouse.gph>
const uint8 mmap[] = {
MOUSE_X, STICK_1_X,
MOUSE_Y, STICK_1_Y,
MWHEEL_FORWARD, BUTTON_17,
MWHEEL_BACKWARD, BUTTON_10,
MBUTTON_1, BUTTON_5,
MBUTTON_2, BUTTON_8,
};
init{
mousemapping(mmap);
}
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
Re: Bug with the MWHEEL_FORWARD and MWHEEL_BACKWARD maps?
Makes sense thanks. I thought it was a limitation in the game I was playing until I realized this issue was happening in other games too.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
5 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 163 guests