Can I Map Keyboard Function keys onto Xbox Controller?

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

Can I Map Keyboard Function keys onto Xbox Controller?

Postby EricMCrack » Tue Feb 20, 2018 8:26 pm

On XBOX ONE, the keyboard is already supported by the console.... specifically, in fortnite, the keyboard actually functions as it does on the pc.

I have the Titan Two, and logitech g810 keyboard

What I am trying to do is connect keyboard and Xbox controller to my titan, and map the F1,F2,F3,F4 keys to my controller.

Can this be done, where if i hit the mapped button, the console will believe that the Corresponding F key is being hit?

This is main reason i bought this thinking it would be simple to do, but I cannot figure it out.
User avatar
EricMCrack
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Feb 20, 2018 8:20 pm

Re: Can I Map Keyboard Function keys onto Xbox Controller?

Postby Scachi » Tue Feb 20, 2018 8:51 pm

There are some code examples how to get something like this working posted there:
viewtopic.php?f=26&t=7897&p=58709&hilit=keyboard#p58698
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Can I Map Keyboard Function keys onto Xbox Controller?

Postby EricMCrack » Sat Feb 24, 2018 4:40 am

Honestly I’m new to this, and that’s for PS4, and no one actually has a finished code in there.... is there just a simple way to do this
User avatar
EricMCrack
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Feb 20, 2018 8:20 pm

Re: Can I Map Keyboard Function keys onto Xbox Controller?

Postby bonefisher » Sat Feb 24, 2018 6:06 am

EricMCrack wrote:Honestly I’m new to this, and that’s for PS4, and no one actually has a finished code in there.... is there just a simple way to do this

Just use regular scripts that were made for the game with regular controllers then build a input translator to drag and drop over slot where you put script in which is simple form of doing it.....
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Can I Map Keyboard Function keys onto Xbox Controller?

Postby Scachi » Sat Feb 24, 2018 9:42 am

EricMCrack wrote:Honestly I’m new to this, and that’s for PS4, and no one actually has a finished code in there.... is there just a simple way to do this

It doesn't matter if the button names are ps3, ps4 or xbox,
RT is the same as R2 and is the same as BUTTON_5 and is the same as the number 4.
You can see this if you hit F1 in gtuner, that will open the GPC Input reference.
So the code in this post should work for xbox too: viewtopic.php?f=26&t=7897&p=58709&hilit=keyboard#p58703

As far as I know the Input Translator isn't allowing mapping a button to a key, only the other way around,
so you are stuck to using code like the one linked above.
Here is the same code without the wasd mapping and without game controller specific button names:
Change the button number to your need (see Input Reference / F1 in gtuner for them) and the key it should press.
Remove unneeded mapping code lines or copy them for defining more of them, just change the button / keys each time then.
Code: Select all
 
#include <keyboard.gph>
 
init {
    mousemapping();
    keymapping();
}
 
main {
    mouse_passthru();
    key_passthru();
 
    if (get_actual(BUTTON_10)) { key_set(KEY_J,1); }
 
    if (get_actual(BUTTON_7)) { key_set(KEY_Q,1); }
 
    if (get_actual(BUTTON_8)) { key_set(KEY_SPACEBAR,1); }
 
    if (get_actual(BUTTON_9)) { key_set(KEY_LEFTSHIFT,1); }
 
    if (get_actual(BUTTON_1)) { key_set(KEY_ESCAPE,1); }
}
 
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Can I Map Keyboard Function keys onto Xbox Controller?

Postby Sillyasskid » Sat Feb 24, 2018 1:35 pm

EricMCrack wrote:Can this be done, where if i hit the mapped button, the console will believe that the Corresponding F key is being hit?
Well, no.
The Titan Two is only going to be seen as a Xbox One controller when its connect to the Xbox One, the Keyboard is not seen by the Xbox One, only the Titan Two can see the keyboard. Any keyboard commands sent. Will go to the Titan Two, and then re-interpreted as a valid Xbox One controller output.

So unfortunately the setup you had in mind, wont actually work.

You must have the Titan two's output protocol set to Xbox One when you are using a controller. If you want the Xbox one to see your keyboard instead. The protocol must be changed to USB Multi Interface HID. This is the only protocol that fully supports keyboard and mouse passthru.

Key_passthru(); as well as mouse_passthru(); functions can only be used with the USB Multi Interface HID output protocol.

You can play fortnite with the Titan Two using this protocol. However there is no mouse support, So you won't be able to aim. or even attack. You need a controller connected to utilize the right thumbstick. As well as the triggers.

The only way to have your controller connected, is by changing the output protocol back to Xbox One.

EricMCrack wrote:What I am trying to do is connect keyboard and Xbox controller to my titan, and map the F1,F2,F3,F4 keys to my controller.
The Controller can not send any keyboard commands to the Xbox. If you are using the Xbox One Output Protocol. I can try to help, but I'm not much of a fortnite player though.

I did noticed how the F keys had there own separate bindings for each building slot. I'm not familiar with the Xbox One controls scheme. But I guess its safe to assume the controller does not have separate bindings to these building slots?
User avatar
Sillyasskid
Captain
Captain
 
Posts: 574
Joined: Sat May 14, 2016 3:07 am

Re: Can I Map Keyboard Function keys onto Xbox Controller?

Postby EricMCrack » Sat Feb 24, 2018 7:45 pm

EricMCrack wrote:What I am trying to do is connect keyboard and Xbox controller to my titan, and map the F1,F2,F3,F4 keys to my controller.
The Controller can not send any keyboard commands to the Xbox. If you are using the Xbox One Output Protocol. I can try to help, but I'm not much of a fortnite player though.

I did noticed how the F keys had there own separate bindings for each building slot. I'm not familiar with the Xbox One controls scheme. But I guess its safe to assume the controller does not have separate bindings to these building slots?[/quote]

The controller does not have separate bindings, which is why if it was possible to somehow map them to like the paddles of an elite controller, or other buttons would be so great... the xbox natively reads the key board and those keys in game, maybe someone will figure it out some day
User avatar
EricMCrack
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Feb 20, 2018 8:20 pm


Return to Titan Two Device

Who is online

Users browsing this forum: robinss0n and 109 guests