Keyboard mapping question - what does "Negative" mean?

Gtuner IV general support. Operation, questions, updates, feature request.

Keyboard mapping question - what does "Negative" mean?

Postby pablosscripts » Wed Feb 01, 2017 3:30 am

Image
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

Re: Keyboard mapping question - what does "Negative" mean?

Postby Prototype » Wed Feb 01, 2017 10:44 am

Maybe like the Titan One inv function, to invert axes. The keyboard mapping is very good :joia: But how or is it possible to map a key to an extra button or a predefined variable like EXTRA_1, EXTRA_2 ?
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3252
Joined: Sun Dec 16, 2012 1:43 pm

Re: Keyboard mapping question - what does "Negative" mean?

Postby J2Kbr » Wed Feb 01, 2017 11:12 am

prototype wrote:Maybe like the Titan One inv function, to invert axes.

You nailed it. Normally the keyboard keys will set the mapped input to 100.00% when pressed. If the Negative flag is checked, the value set will be -100.00%.

prototype wrote:The keyboard mapping is very good :joia:

Thanks.

prototype wrote:But how or is it possible to map a key to an extra button or a predefined variable like EXTRA_1, EXTRA_2 ?

for that you can use the build-in function "key_status()", it returns the current status (an Boolean value representing pressed or not pressed) of any key. An list of available keys can be fond in the keyboard.gph file:
http://www.consoletuner.com/wiki/index. ... yboard_gph

So, let's say you want run an combo if the key "1" is pressed:

Code: Select all
#include <keyboard.gph>
 
main {
    if(key_status(KEY_1)) {
        combo_run(MyCombo);
    }
}
 
combo MyCombo {
    //
    // COMBO CODE HERE
    //
}
 

In this case there is no need of map the key "1" to any input (such EXTRA_1 from the Titan One), as you can read the status of any key from the keyboard directelly.
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: Keyboard mapping question - what does "Negative" mean?

Postby Prototype » Wed Feb 01, 2017 11:21 am

Awesome :smile0203: Thanks.
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3252
Joined: Sun Dec 16, 2012 1:43 pm

Re: Keyboard mapping question - what does "Negative" mean?

Postby pablosscripts » Wed Feb 01, 2017 11:44 am

Ok this is a bit far out there...

But is there any solution to this?

On XIM, I map the X button on my Sony Nav to change the XIM profile (the actual X button is then mapped to right click on my mouse, but this is irrelevant).

Would there be any way at all to map this to T2 somehow so that I can use the same button to change profiles? It would be cool if the XIM and T2 moved in lock step.
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

Re: Keyboard mapping question - what does "Negative" mean?

Postby paname » Wed Feb 01, 2017 2:25 pm

now that would be so cool to be able to use the razr chroma SDK and be able to set key color individually via Titan2.

like using a chroma keyboard/keypad for various status notification or visual key toggle..

https://terrycain.github.io/razer-drivers/
http://developer.razerzone.com/works-wi ... /download/
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm

Re: Keyboard mapping question - what does "Negative" mean?

Postby J2Kbr » Wed Feb 01, 2017 2:28 pm

pablogroup wrote:On XIM, I map the X button on my Sony Nav to change the XIM profile (the actual X button is then mapped to right click on my mouse, but this is irrelevant). Would there be any way at all to map this to T2 somehow so that I can use the same button to change profiles? It would be cool if the XIM and T2 moved in lock step.

With the X button of Nav mapped to change profile on XIM4, this blocks the button "signal", correct? if that is correct, there is no way of Titan Two know you pressed that button, as XIM4 does not includes it on the data report.
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: Keyboard mapping question - what does "Negative" mean?

Postby pablosscripts » Wed Feb 01, 2017 3:02 pm

Ok I thought so, thanks for confirming anyway
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

Re: Keyboard mapping question - what does "Negative" mean?

Postby Prototype » Wed Feb 01, 2017 3:39 pm

What is the GPC2 code to invert axes like the Titan One inv function ?
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3252
Joined: Sun Dec 16, 2012 1:43 pm

Re: Keyboard mapping question - what does "Negative" mean?

Postby J2Kbr » Thu Feb 02, 2017 8:26 am

prototype wrote:What is the GPC2 code to invert axes like the Titan One inv function ?

GPC2 does not have an inv build-in function, to invert any number, just multiply it by -1.

Here an example inverting the Y look axis:
Code: Select all
main {
    set_val(STICK_1_Y, get_val(STICK_1_Y) * -1.0);
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Next

Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 54 guests