Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

GPC1 script programming for Titan One. Code examples, questions, requests.

Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby SOME12KNOW » Thu Sep 30, 2021 1:35 am

Hey,

Hope you can help!

Problem:
I need a code for my T1 that converts inputs from a GMK Joystick (basically a xbox 360 controller) into Keyboard outputs.

Further Discussion
You can find out more about the GMK Joystick here: https://www.gamingmodkits.com

As I understand it, the GMK Joystick uses the xinput framework, and acts exactly like a xbox 360 controller. I have even been able to register the inputs as XB360 using the AIMMAX DI Plugin in the Gtuner IDE. The only issue is, I don't know how to remap these inputs to keyboard outputs.

Hope MAD :a1chill_angry1: , or some other Titan programming expert, sees this and can help me write a code that translates Xbox 360 controller input to keyboard output for my titan one.
User avatar
SOME12KNOW
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 29, 2021 11:55 pm

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby Mad » Thu Sep 30, 2021 5:34 am

Hi,

You can do it with the Titan Two via script but not the Titan One unfortunately.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby SOME12KNOW » Sat Oct 02, 2021 2:34 am

Thanks Mad! I was slowly coming to this conclusion myself lol. I now have a T2 on the way!

When you get a chance, could you help me put together a GPC2 script that will accomplish this goal?

What I know so far:
1.) I will need to initiate the keyboard framework using: #include <keyboard.gph>
2.) I will need to remap the XB360 controller inputs to keyboard outputs using the define command, such as this:
#define XB360_A = KEY_A
#define XB360_UP = KEY_UP
Etc…
But that is all I know at this point, and I have IDE downloaded on my mac (it is a nice touch that they offer mac os and ios support).

Any input will be helpful, but would really appreciate it if you could send me a copy of a GPC2 script that could get this working.

Thanks mate!
User avatar
SOME12KNOW
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 29, 2021 11:55 pm

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby Scachi » Sat Oct 02, 2021 6:41 am

You can use or take a look at my script "usb-hid gpad2KM" from the online resource in GTuner IV.
Its created for mapping controller input to keyboard/mouse output.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby SOME12KNOW » Sun Oct 10, 2021 9:40 pm

Scachi wrote:You can use or take a look at my script "usb-hid gpad2KM" from the online resource in GTuner IV.
Its created for mapping controller input to keyboard/mouse output.


Hey Scachi! :innocent_smile_1:

Thank you so much for sharing your "usb-hid gpad2KM" script with me. I am blown away with how well it is written, and I think it is the perfect tool to help me finish this project!

I have my titan two plugged into my computer, your script loaded and configured using the very convenient interactive configuration menu that it comes with. I disabled “joystick from multi interface HID OUTPUT” ticked/selected, I saved and ran the script to memory slot one, but once I disconnect it from my computer, and plug the cable into the output section, the LED display just has the line dance around and never stops to show i have memory slot one selected.

Thanks,
RIP
Last edited by SOME12KNOW on Wed Oct 13, 2021 8:03 pm, edited 1 time in total.
User avatar
SOME12KNOW
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 29, 2021 11:55 pm

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby Scachi » Tue Oct 12, 2021 8:45 am

You can use two cables to connect the T2 via prog port to pc and output to console or pc at the same time this enables you to check the Device Monitor what it detects on the different ports and read other information too. Quite useful for debugging or tracking down issues.
I think LED dance is when it doesn't detect any output mode or signal.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby SOME12KNOW » Wed Oct 13, 2021 8:02 pm

Scachi,

Following your advise, I GOT IT TO WORK!!!! Thank you so much for your help; your script is outstanding, and is exactly what I needed!

Quick recap:
I started this project about six months ago when I first got my joystick... I quickly realized the firmware in my joystick was not compatible with console, so I initially attempted to solve this problem using an XIM Apex, because it appeared to be the cheapest and most available solution at the time. However, through trial and error, I quickly found out that the XIM Apex will only send controller outputs and that Fortnite does not allow for dual input on console (side note: I have since been told dual input is allowed on PC, but I have not personally confirmed this yet). So I knew I needed a way to convert the controller outputs to keyboard inputs. After attempting to learn how to flash the firmware on my joystick, which lead me down a very dark programming road of EPROM hacking and the like, I eventually decided that I would almost certainly brick my device if I tried to flash the ARM chip's firmware myself, so I then decided to find a device that could convert the inputs to keyboard outputs in live time. That is when I found the Console Tuner family of products, mistakenly purchased the T1, and soon after purchased the T2, and after you were kind enough to share your code with me... I now have it working, and I seriously could not be happier!

A new chapter begins:
I started this project six months ago! Along the way, I found solutions that were far from perfect. They were either subjected to MAJOR input delay, because I was constantly switching between controller and keyboard output, or I was considering remapping the controller outputs in a way I would potentially break the game rules. But now that I have a setup that is 100% keyboard outputs, I finally have a setup that is compliant with the game rules, and I can officially make the switch to KB&M with joystick movement without needed to buy an expensive gaming PC.

I have learned so much during this journey. It will almost certainly take me a few months before I have this new way of playing down, but I am confident that I now have a setup that will allow me to take my gameplay to the next level. I plan on making a video about this journey, and making it my first upload on my Youtube Channel: RIP90s. Hope you will stay tuned :)

Regards,
RIP
User avatar
SOME12KNOW
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 29, 2021 11:55 pm

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby SOME12KNOW » Mon Mar 21, 2022 2:34 am

The new season of Fortnite has brought with it an update that has broken my setup...

It was working GREAT last season. I had Scachi's "usb-hid gpad2KM" code and it worked perfectly! However, with the latest update, it now stops my joystick inputs any time I use the keyboard. For instance, I use the joystick to move, and it will stop my movement when I click my shotgun button on my keyboard. I have them plugged in separately, so I bet Fortnite put some kind of security measure in that stops input from two different keyboards or something. I am not sure how to solve this problem, it might require creating a set up that lets me put my keyboard into my titan two.

Hope someone can help me solve this problem this season. I plan on making a video about the setup once I get it working again :joia:
User avatar
SOME12KNOW
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 29, 2021 11:55 pm

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby SOME12KNOW » Sat Apr 23, 2022 11:36 pm

Update: Thanks to the genius of Scachi, I was able to solve my competing inputs problem!

Instead of plugging my keyboard directly it into the xbox, I plugged it into my titan two, and with the help of ONLY ONE LINE OF CODE, at the top of the main function, I was able to send the keyboard inputs as a pass through:

key_passthru();


I am super grateful for Scachi’s help on this. It is amazing how only one line of code solved my input problem, and now that I have fixed the input delay caused by not having my keyboard plugged into the titan two, I now want to plug my mouse into the titan two as well. Right now I have my mouse plugged into my console instead of my titan two, and I have been experiencing some minor input delay and glitches (such as being stuck aiming down sight). So hopefully plugging it into the titan two can fix those problems too!

Here is where I am with this:

Scacho wisely pointed out in a private message that the programming port can technically be used as a third input for the Titan two. So after trialing three different cables that did not work, I discovered that if I just use the original cable on my razor keyboard with a converter (UrbanX Micro USB to USB 3.1 Adapter), that I was able to get the keyboard working while plugged into the programming port. :smile0202:

Unfortunately, now I am having difficulties getting the mouse inputs to pass-through while plugged into the titan two… so I am back to the drawing board unfortunately until I am able to figure out how to get my mouse buttons to work. Right now the titan two is only mapping is the mouse movement, but not any of the buttons.

Let me know if anyone has any ideas here… Update coming soon.
User avatar
SOME12KNOW
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 29, 2021 11:55 pm

Re: Easy Script Request: XB360 INPUT TO KEYBOARD OUTPUT

Postby SOME12KNOW » Thu May 05, 2022 3:21 pm

Good news!

I now have all three devices (mouse, keyboard, and GMK joystick) plugged into my titan two and working!

All i needed to do was add "mouse_passthru();" to get this code working for my mouse as well.
User avatar
SOME12KNOW
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 29, 2021 11:55 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 87 guests

cron