How do I find mouse buttons?

Titan Two general support. Questions, firmware update, feature request.

How do I find mouse buttons?

Postby EmperorRosko » Wed Sep 19, 2018 7:30 am

Hi All,

Really newbie question here, can't seem to find anything in any documentation.

I am trying to create my own input maps for mouse and keyboard. Unfortunately none of the online library utilise the 2 side buttons on my Roccat mouse, which I always use for melee and grenade throw.

I can't seem to find a way to see what the Titan Two sees those mouse buttons as so I can map them?

I can see the way that I add a new mouse button, and the drop down shows "Button 3, Button 4, etc, etc." but how do I know which Button refers to those on my mouse?

Thanks
Ross
User avatar
EmperorRosko
Sergeant First Class
Sergeant First Class
 
Posts: 17
Joined: Fri Aug 24, 2018 12:35 pm

Re: How do I find mouse buttons?

Postby Scachi » Wed Sep 19, 2018 8:33 am

Good question, no idea. Hopefully J2kbr can help.

For my G502 logitech mouse I can get 5 buttons to work as mouse buttons when configured like this in the mouse software (mouse internal memory), I can use the rest of the buttons as keys only:
1:left, 2:right, 3:middle, 4:"forward" , 5:"backward"

tested with this code:
Code: Select all
#include <mouse.gph>
 
bool Report_MouseMove = FALSE;
bool Report_MouseWheel = TRUE;
 
 
main {
  uint8 i;
  if (mouse_status(MREPORT_UPDATED)) {
    if (Report_MouseMove && mouse_status(MOUSE_X)) printf("MOUSE_X");
    if (Report_MouseMove && mouse_status(MOUSE_Y)) printf("MOUSE_Y");
    if (Report_MouseWheel && mouse_status(MOUSE_WHEEL)) printf("MOUSE_WHEEL");
    if (Report_MouseWheel && mouse_status(MWHEEL_FORWARD) == 1) printf("MWHEEL_FORWARD");
    if (Report_MouseWheel && mouse_status(MWHEEL_BACKWARD) == -1) printf("MWHEEL_BACKWARD");
    for (i=4; i<20;i++) {
      if (mouse_status(i)) printf("MBUTTON_%d",i-3);
    }
  }
}
 


Output panel:
Code: Select all
GVM Output: MBUTTON_1
GVM Output: MBUTTON_2
GVM Output: MBUTTON_3
GVM Output: MBUTTON_4
GVM Output: MBUTTON_5
GVM Output: MOUSE_WHEEL
GVM Output: MWHEEL_FORWARD
GVM Output: MOUSE_WHEEL
GVM Output: MWHEEL_BACKWARD
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: How do I find mouse buttons?

Postby EmperorRosko » Fri Sep 21, 2018 11:12 pm

I figured another way to do it was just map the side buttons on my mouse to keyboard letters V & G and then map them in the Titan Two like that. Simples!
User avatar
EmperorRosko
Sergeant First Class
Sergeant First Class
 
Posts: 17
Joined: Fri Aug 24, 2018 12:35 pm

Re: How do I find mouse buttons?

Postby pablosscripts » Wed May 22, 2019 8:22 am

J2kbr: can you elaborate on this? I’m curious myself and I’d like to add this to my pc coding guide.
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
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am


Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 163 guests