Repository navigation
[Bug] Key mapping release (-command) lost when NUI takes focus during key press #541
Closed
WLVF
started this conversation in
[BUG] FiveM for GTAV Enhanced
Replies: 2 comments 1 reply
|
Thanks, we are looking into it. |
0 replies
|
Hello, |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
If a RegisterKeyMapping "+" handler calls SetNuiFocus(true, ...) while the key is still held, the key-up is swallowed by NUI and the "-" command never runs.
The key mapping keeps the key as "held", so after the NUI closes, the next press of that key does nothing (it only releases the stuck state) and a second press is needed.
Legacy delivers the release when NUI takes focus.
Issue type
Client
Repro rate
Always
Server build version
FXServer-early-access b153 win32
OS
WIndows 11 Home 25H2
CPU
AMD Ryzen 9 7900X
GPU
NVIDIA RTX 3080
RAM
64 GB DDR5
Storage type
SSD NVMe
Connection type
Ethernet
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
None
OS version / distribution
No response
CPU
No response
RAM
No response
Using txAdmin?
None
Hosting provider
None
Machine type
None
/perf endpoint output
No response
DDoS protection
No response
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
Repro Resource: keymap_release_repro.zip
keymap_release_reproto the server andensure keymap_release_repro.[keymaprepro]lines.+ (press) handler ranis printed, but- (release) handler ranis not, even after letting go of F7.- (release) handler ranis printed.From then on, every other F7 press is ignored.
For comparison, run
/keymaprepro workaroundand repeat steps 3–6.The UI is shown on press, but
SetNuiFocusis only called from the-handler.Every F7 press then prints both lines and opens the UI.
/keymaprepro bugswitches back.Expected Behavior
Every press of T opens the UI, as on Legacy.
Actual Behavior
After the first time, every other press of T is ignored because the key mapping still considers T held.
Evidence
No response
Additional Context
Workaround:
Show the UI on press, and call SetNuiFocus only in the "-" (release) handler. ox_lib-style menus that don't take keyboard focus are unaffected.
All reactions