Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquiry on Native Keyboard Input Support in Chiaki4deck #324

Open
PekkaPekka071 opened this issue May 10, 2024 · 10 comments
Open

Inquiry on Native Keyboard Input Support in Chiaki4deck #324

PekkaPekka071 opened this issue May 10, 2024 · 10 comments

Comments

@PekkaPekka071
Copy link

Hello,

I hope this message finds you well. I wanted to take a moment to express my appreciation for the chiaki4deck project. It's an impressive fork that has significantly enhanced the PlayStation Remote Play experience for many users, myself included.

I'm reaching out to discuss a particular feature related to keyboard inputs. I've noticed that when connecting chiaki4deck to my PS5, the console recognizes it as a keyboard device. This is a promising aspect, as my goal is to have keyboard inputs handled similarly to the official PS Remote Play app, where the keyboard is not emulating a controller but is used directly.

Upon reviewing the chiaki4deck project, I observed that there are components related to keyboard input handling. Given this, I'm curious if there's a way to configure or modify chiaki4deck to remove the controller emulation entirely and use keyboard inputs natively.

Would it be possible to achieve this by recoding the input handling portion of the chiaki4deck codebase? Or is there an alternative method that you might recommend?

Any guidance or suggestions you could provide would be greatly appreciated. Thank you for your time and for the incredible work on chiaki4deck.

@streetpea
Copy link
Owner

Have you taken a look at the enable_keyboard flag in the connect_info of streamsession.cpp

this->enable_keyboard = false; // TODO: from settings
and the keyboard set text and other functions in ctrl?
CHIAKI_EXPORT ChiakiErrorCode chiaki_ctrl_keyboard_set_text(ChiakiCtrl *ctrl, const char *text)
... if you are trying to achieve entering text with a keyboard .. not exactly sure what you're trying to achieve

@PekkaPekka071
Copy link
Author

Thank you for your prompt response and for taking the time to consider my query. I apologize for any confusion caused by my initial message.

To clarify, my intention is not to enter text with a keyboard. Instead, I am looking to use chiaki4deck to play games with a keyboard and mouse setup. The game I frequently play encounters issues when recognizing controller and mouse inputs simultaneously, leading to input conflicts. My goal is to configure chiaki4deck in such a way that it allows me to use keyboard and mouse inputs without emulating a controller, thereby avoiding these conflicts.

I hope this explanation makes my objective clearer. If you have any suggestions on how I might achieve this, or if there's a possibility to include such functionality in future updates, I would be very grateful to hear your thoughts.

Thank you once again for your attention to this matter.

@streetpea
Copy link
Owner

Ah i see … how are you getting mouse support with Chiaki4deck I thought that wasn’t supported…

@streetpea
Copy link
Owner

streetpea commented May 10, 2024

Are you saying using keyboard and mouse works with the official remote play app from Sony? I thought mouse wasn’t supported.

@PekkaPekka071
Copy link
Author

Thank you for your response and for raising that point. Let me clarify: my mouse is directly connected to my PS5 via USB, and it's the keyboard functionality that I'm looking to implement through chiaki4deck wirelessly. Essentially, I'm aiming to use chiaki4deck as a wireless keyboard, similar to how an external keyboard would be recognized when connected to the PS5.

This setup works seamlessly with the official PS Remote Play, where the system recognizes the keyboard inputs directly. My hope is to replicate this functionality in chiaki4deck, allowing me to use my mouse (connected via USB to the PS5) and a 'virtual' keyboard through chiaki4deck simultaneously without any input conflicts.

I appreciate your time and assistance in exploring whether this is a feasible enhancement for chiaki4deck.

@streetpea
Copy link
Owner

I think I understand now. In that case you will want a setting for native keyboard support (you will want a separate option since most would want keyboard to emulate controller to support games without keyboard support) and you will need to reverse engineer whatever PlayStation is doing for native keyboard support

@PekkaPekka071
Copy link
Author

Yes, that's exactly the issue I've been trying to articulate, and I'm grateful for your understanding. I'm interested in learning more about how to specifically achieve this. Would it involve inspecting the PS Remote Play's keyboard input handling and then attempting to replicate that functionality within chiaki4deck?

I understand this might be a complex task, but any guidance or starting points you could provide would be immensely helpful. Thank you once again for your time and assistance.

@streetpea
Copy link
Owner

Yes, I would start by inspecting the packets and looking for what is sent when using the keyboard … you can inspect packets using wireshark on ports 9295 (tcp) and 9296 (udp) for the local connection … the stuff for 9295 is here https://github.com/streetpea/chiaki4deck/blob/main/lib/src/ctrl.c the stuff that is over 9296 is here https://github.com/streetpea/chiaki4deck/blob/main/lib/src/takion.c (the packets have a type that is set in the first byte of the message to differentiate them

typedef enum takion_packet_type_t {
).

@JohnShiozo
Copy link

im also facing the same issues as @PekkaPekka071
looks like its a input conflict

@JohnShiozo
Copy link

im really looking forward if this issue could be solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants