HID and Default Protocol in Xbox/PS4
7 posts
• Page 1 of 1
HID and Default Protocol in Xbox/PS4
Hello guys!
I am developing a script in which I would like to do the following procedure:
I performed numerous tests such as:
However I was not successful in any. Would you have a solution for this scenario?
The code would look something like.
I am developing a script in which I would like to do the following procedure:
- 1. If you press the SHIFT button on the keyboard, xbox understands the HID protocol instead of the standard one;
2. If you press the ALT button on the keyboard, xbox understands it as the console's standard protocol.
I performed numerous tests such as:
- 1. Use HID protocol in xbox instead of the standard and write a script that does the opposite.
2. Use the xbox protocol and write a script that alternates in the middle of the code to execute these specific buttons.
3. I used KMG with virtual control, using HID protocol (GTuner Beta)
However I was not successful in any. Would you have a solution for this scenario?
The code would look something like.
- Code: Select all
#include <xb1.gph>
#include "../workdir/_xkeys/xkeys.gph"
#define XKEYS_TO_MONITOR_MAX 2
uint8 KEY1, KEY2;
init {
KEY1=xkeys_add(KEY_LEFTALT);
KEY2=xkeys_add(KEY_LEFTSHIFT);
}
main {
if(xkeys_is_active(KEY1)) combo_run(Example1);
if(xkeys_is_active(KEY2)){
// exec HID command (Native SHIFT keyboard)
}
}
combo Example1 {
set_val(XB1_Y, 100);
wait(20);
set_val(XB1_Y, 0);
wait(20);
set_val(XB1_RB, 100);
wait(20);
set_val(XB1_RB, 0);
}
-
NyzdeN - Sergeant First Class
- Posts: 18
- Joined: Tue Sep 10, 2019 3:33 am
Re: HID and Default Protocol in Xbox/PS4
You have to change protocol with port_connect and this takes roughly one second, then you can do whatever you need.
- Code: Select all
#include <xb1.gph>
#include "xkeys.gph"
#define XKEYS_TO_MONITOR_MAX 2
#define DEFAULT_PROTOCOL PROTOCOL_XB1
uint8 KEY1, KEY2;
init {
keymapping();
mousemapping();
KEY1=xkeys_add(KEY_LEFTALT);
KEY2=xkeys_add(KEY_LEFTSHIFT);
}
main {
key_passthru();
mouse_passthru();
// holding key1 calls port_connect once
if(xkeys_event_active(KEY1)) {
port_connect(PORT_USB_C, PROTOCOL_HID);
}
// on release back to DEFAULT_PROTOCOL
if(xkeys_event_release(KEY1)) {
port_connect(PORT_USB_C, DEFAULT_PROTOCOL);
}
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4533
- Joined: Wed May 22, 2019 5:39 am
Re: HID and Default Protocol in Xbox/PS4
Hello mad, thanks for the guidance.
Just to contextualize, I would like to obtain the following results as shown in the video below:
https://www.youtube.com/watch?v=jfA6X3RVEsM
(Note that at 8:20, the game (Fortnite) interprets different inputs (Xbox / Keyboard) as you press the keys)
Do you believe it is possible to do this, without the need for a "mod", just using script?
Thank you
Just to contextualize, I would like to obtain the following results as shown in the video below:
https://www.youtube.com/watch?v=jfA6X3RVEsM
(Note that at 8:20, the game (Fortnite) interprets different inputs (Xbox / Keyboard) as you press the keys)
Do you believe it is possible to do this, without the need for a "mod", just using script?
Thank you
-
NyzdeN - Sergeant First Class
- Posts: 18
- Joined: Tue Sep 10, 2019 3:33 am
Re: HID and Default Protocol in Xbox/PS4
Hi NyzdeN, please note that -currently- the Titan Two can output as regular controller OR keyboard/mouse. Both at the same time is not possible.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: HID and Default Protocol in Xbox/PS4
Thanks for the clarification Jeff.
Taking advantage of the moment, are there plans for T2 in future updates to accept this type of behavior?
Taking advantage of the moment, are there plans for T2 in future updates to accept this type of behavior?
-
NyzdeN - Sergeant First Class
- Posts: 18
- Joined: Tue Sep 10, 2019 3:33 am
Re: HID and Default Protocol in Xbox/PS4
NyzdeN wrote:Thanks for the clarification Jeff.
Taking advantage of the moment, are there plans for T2 in future updates to accept this type of behavior?
yes, this is something on the plans.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: HID and Default Protocol in Xbox/PS4
any ETA on dual outputs?
-
toom3456 - Corporal
- Posts: 4
- Joined: Sat Sep 12, 2020 9:33 pm
7 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: Google [Bot] and 105 guests