Add Keyboard method to open the Keyboard screen#14
Add Keyboard method to open the Keyboard screen#14scmcgowen wants to merge 3 commits intoReconnectedCC:1.20.1from
Conversation
… forward mouse events, scaled to the 2d canvas when used by .captureInput()
|
To clarify, this merge request implements a keyboard module method to open the keyboard "GUI" as if the player right clicked the module itself, right? |
|
Yes, that is what it does, though interestingly right clicking the module no longer opens the NI's keyboard (unrelated to my PR, its something I noticed when testing) |
|
Is there any safe guard to prevent the player from being stuck in a loop that keeps opening the keyboard? |
|
Currently, the best way would be to set |
|
Is there any meaningful usecase for this? It feels prone to exploitation, especially if misconfigured by a server owner |
|
The primary use case I envision is getting key and mouse input at the normal rate a terminal does on a keybind, such as for a NI chat system or a graphical menu using the Overlay Glasses. |
|
I am open to suggestions on how to mitigate exploitability, however, and will consider any option to reduce the impact while not eliminating the envisioned primary use case |
|
I have a suggestion, what if instead of getting regular mouse output, which is only useful for 2d canvases, you threw a raycast and got an object on the 3d canvas it would return 3d coordinates and but if it hits a 2d overlay first it would return 2d coordinates. |
|
That sounds more complicated to implement, plus I'd have to get the 3d canvas to see what's on it to do a raycast. Seems interesting though, but also doesn't seem to prevent the problem of effectively softlocking yourself by calling it in a loop. |
|
I'm thinking that client side there could be an SOS option to disable the method taking effect on the client, on modmenu or something |
|
Also add a cooldown for the method after its GUI is closed, like a second or two. |
|
I'll try to implement that tomorrow |

The Keyboard screen will forward mouse inputs scaled to the grid of the 2d canvas.