Mouse Sided Buttons

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

Mouse Sided Buttons

Postby ShimmiShu » Wed Sep 16, 2020 10:13 am

I am sure this has been asked before but i cant find any posts for this, maybe because of wrong keywords...

I play with a Zowie S2 that comes with two left sided Buttons. In Windows they can be used to "forward" and "backward" in Browser etc.

In Gtuner there is no setting for this 2 Buttons but i use them for "reload" and "extra Abilities"
How can i assign them to an Input Translator?
User avatar
ShimmiShu
Sergeant Major
Sergeant Major
 
Posts: 73
Joined: Tue Mar 17, 2020 11:30 am

Re: Mouse Sided Buttons

Postby J2Kbr » Wed Sep 16, 2020 10:55 am

Normally the extra mouse buttons are assigned to keyboard keys ( and not actual mouse buttons).

To check what are the key codes for the extra mouse buttons, load the following script to the Titan Two and, with the mouse plugged to the device, press one and then the other extra buttons. The key code will be printed on Gtuner's Output panel.

Code: Select all
#include <keyboard.gph>
 
main {
    // Output the key code of pressed keys
    output_keycode();
}
 
void output_keycode() {
    static uint8 previous_keycode;
    uint8 keycode;
 
    keycode = key_check();
    if(keycode != previous_keycode) {
        if(keycode) {
            printf("Key Code: %02X", keycode);
        }
        previous_keycode = keycode;
    }
    return;
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Mouse Sided Buttons

Postby ShimmiShu » Wed Sep 16, 2020 12:45 pm

Thx - Found them. Its Button 4 and 5
User avatar
ShimmiShu
Sergeant Major
Sergeant Major
 
Posts: 73
Joined: Tue Mar 17, 2020 11:30 am

Re: Mouse Sided Buttons

Postby DontAtMe » Wed Sep 16, 2020 2:33 pm

ShimmiShu wrote:Thx - Found them. Its Button 4 and 5

:joia:

Reference:
Mouse Button 1: Left Mouse Button
Mouse Button 2: Right Mouse Button
Mouse Button 3: Middle Mouse Button/Mouse Wheel Button
Mouse Button 4: Mouse Back Button
Mouse Button 5: Mouse Forward Button

Mouse Button 6 - 16:
These buttons are not usually mapped on mice. If you have a mouse with 6+ buttons, these buttons are likely mapped to a keyboard key or specific mice setting.
Usually, they can be re-assign in your mouse's software.
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: Mouse Sided Buttons

Postby ShimmiShu » Wed Sep 16, 2020 2:58 pm

:smile0517: :smile0201: :joia:
Thanks
User avatar
ShimmiShu
Sergeant Major
Sergeant Major
 
Posts: 73
Joined: Tue Mar 17, 2020 11:30 am

Re: Mouse Sided Buttons

Postby jelly44 » Wed Sep 16, 2020 4:16 pm

J2Kbr - what do I do when Gtuner gives Key Codes which are Higher than button 16 for instance, (20, 1C...etc) - how do I assign PS4 buttons to them?

I believe that the input translator, in the mouse section I can only assign up to button 16.

Hope my question makes sense :D
- My recommendation for learning C programming: 'C Programming Absolute Beginner's Guide'
- Create your own scripts with GPC2 Scripting
User avatar
jelly44
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 220
Joined: Tue Feb 05, 2019 3:49 pm

Re: Mouse Sided Buttons

Postby Scachi » Wed Sep 16, 2020 5:49 pm

When your mouse outputs keys on mouse button presses , like you have mapped key to them in your mouse software, you need to use the key mapping area to map buttons to those keys (matching the keys of the mappings of the mouse buttons).
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Mouse Sided Buttons

Postby jelly44 » Thu Sep 17, 2020 7:01 am

I have mapped the keyboard keys 3, V and R to my mouse software and saved the setup in the mouse onboard memory. The Key Codes are the ones shown in the screen shot as follows, 20, 19 and 15 for the keyboard keys 3, V, and R respectively.

Output Panel Gtuner.PNG
Output Panel Gtuner
Output Panel Gtuner.PNG (7.11 KiB) Viewed 1245 times


In the input translator, mouse mapping section, I've managed to map the R key based on the Key Code 15 for the Button 15. However, in the mouse section the highest available Button displayed is button 16, while I have outputs 20 and 19 for the remaining keys. That's where my challenge is right now. I'm not sure how to map those keys since the highest button is 16.

Mouse Mappning Gtuner.PNG
Mouse Mapping GTuner
Mouse Mappning Gtuner.PNG (8.62 KiB) Viewed 1245 times
- My recommendation for learning C programming: 'C Programming Absolute Beginner's Guide'
- Create your own scripts with GPC2 Scripting
User avatar
jelly44
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 220
Joined: Tue Feb 05, 2019 3:49 pm

Re: Mouse Sided Buttons

Postby Scachi » Thu Sep 17, 2020 7:16 am

jelly44 wrote:I have mapped the keyboard keys 3, V and R to my mouse software and saved the setup in the mouse onboard memory. The Key Codes are the ones shown in the screen shot as follows, 20, 19 and 15 for the keyboard keys 3, V, and R respectively.

"KEY CODES" it not button numbers anymore.

As I said, use the "Keyboard Mapping" section instead. Your mouse isn't reporting mouse button presses anymore for that button you have assigned keys to in yours mouse software.

Example:
mouse software: mapped "mouse button 14" to key "P"
gtuner IV will now receive the key "P" when you press that mouse button .. the KEY_P in this case (0x13, as in keyboard.gph)
to map it to a controller button/input use the Keyboard Mapping section and map KEY_P to the button you want to use for that mouse button/key)
or in a personal script use key_status(KEY_P)to check for that key press
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Mouse Sided Buttons

Postby jelly44 » Thu Sep 17, 2020 7:18 am

got it now, Scachi. Thank you! I will do some testings ;)
- My recommendation for learning C programming: 'C Programming Absolute Beginner's Guide'
- Create your own scripts with GPC2 Scripting
User avatar
jelly44
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 220
Joined: Tue Feb 05, 2019 3:49 pm


Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 95 guests