[Bug]: Keyboard input injection does not work in games
- Lingua principale
- TypeScript
- Stelle
- 38
- Fork
- 78
- Merge medio
- 4g 4h
- PR unite (30g)
- 7
Descrizione
### Bug Description
Keyboard input injected through the client works correctly for regular text input and browser-based applications, controls are not recognized by games. The current implementation uses KEYEVENTF_UNICODE with the character code as wScan. This appears to provide text input rather than the physical/scancode keyboard events expected by many games.
As a result, keys such as W, A, S, and D cannot reliably be used for movement in games through Rein's remote keyboard input.
### Steps to Reproduce
1. Start the Rein server and connect using the client.
2. Open a game that uses WASD for movement.
3. Use the client's keyboard input to send W, A, S, or D.
4. Observe that the game does not respond to the injected keys.
5. Test the same input in a browser or text field and observe that the characters are entered correctly.
### Expected Behavior
Injected keyboard input should be recognized by games as actual keyboard key-down and key-up events.
### Desktop Operating System
Windows 11
### Client OS and browser
Brave
### Rein Version
0.5.0
### Console Logs / Error Messages (Optional)
```shell
nil
```
### Screenshots / Recordings (Optional)
nil
### Checklist
- [x] I have searched for existing issues to avoid duplicates
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.