dcs-scratchpad icon indicating copy to clipboard operation
dcs-scratchpad copied to clipboard

Issue with MP chat and keyboard focus

Open Wamwod opened this issue 1 year ago • 5 comments

Bug when opening the Multiplayer chat to type into chat with Shift-Tab, if you have scratchpad open the keyboard inputs get lost somewhere, I can't tell where and you can no longer close the chat box and you can't use the keyboard for any binds or to even open the menu to quit the server, this forces a full game restart annoyingly.

Steps to reproduce.

  • Have DCS Scratchpad open.
  • Have the Tab text chat open.
  • Press Shift-Tab to type into Multiplayer chat.

I think Scratchpad and DCS are typing to take keyboard inputs at the same time which is what causes this, I've noticed it really only works when you hit tab in scratch pad while scratch pad isn't actively being edited.

Wamwod avatar Aug 15 '22 11:08 Wamwod

Thanks for the report! That seems to be an interesting one. I am unable to reproduce it while sitting in an F16 or F/A-18, but can reproduce it in an Ka50. Which aircraft are you using when encountering the issue?

rkusa avatar Sep 04 '22 12:09 rkusa

Can be reproduced in A-10C II on Hoggit PAWG server. Thought I'd help out fix the issue.

M00niebrav0 avatar Sep 07 '22 23:09 M00niebrav0

Thanks for the report! That seems to be an interesting one. I am unable to reproduce it while sitting in an F16 or F/A-18, but can reproduce it in an Ka50. Which aircraft are you using when encountering the issue?

Apologies I was having the issue in the Uh1H and the F18.

Wamwod avatar Sep 08 '22 04:09 Wamwod

@M00niebrav0 thanks for jumping in and confirming that you also have the issue, that helps to know!

Steps to reproduce.

  • Have DCS Scratchpad open.
  • Have the Tab text chat open.
  • Press Shift-Tab to type into Multiplayer chat.

@Wamwod Do you press Shift-Tab while the Scratchpad has focus (the cursor is active in the Scratchpad)? Or does it happen for you regardless of whether the focus is in the Scratchpad or not?

rkusa avatar Sep 08 '22 16:09 rkusa

i dont never had that kind problem., but i'm very interested what is your scratchpad problem

Dragonius avatar Sep 12 '22 15:09 Dragonius

I've been able to speedrun replicate with scratchpad on DCS 2.8 and Scratchpad 0.6.1 Grayflag Syria with the mod Hercules with SRS installed, should be the same on any server and airframe and SRS should be irrelevant.
(having an SRS install provides evidence of how the keyboard interaction still can do some things though)

Steps to replicate Connect to any DCS multiplayer server with scratchpad installed Slot into an airframe, let normal F1 view load, or switch to an alternate view (doesn't matter what view mode you're in) Push CTRL-SHIFT-X once (or alternate keybind to load scratchpad) Still having the yellow + icon for cursor movement Pushing SHIFT-TAB here has no negative effect, it loads chat, push SHIFT-TAB again and ingameChat cycles away. Click into the Scratchpad Text UI (you will now have cursor visible)

Push SHIFT-TAB again, this will load Chat with keyboard focus whilst Scratchpad has a keyboard focus lock, this seems to be what breaks the keyboard/UI layer controls.

Pure-HOTAS commands will respond (on Hercules mod, having refuel/rearm bound to a single HOTAS key it will still respond, this is very useful to do if you've just done an hour long supply ferry flight and belly landed because keyboard flaps/gear controls don't respond)

Should be irrelevant but i have got Joy2key installed to send some keyboard commands from HOTAS inputs (logitech x52) to send LEFT-ALT and RIGHT-ALT modifiers from buttons on throttle/stick.

After locking the keys up, LEFTALT-F8 keybind won't work to open refuel/rearm screen, most/all keyboard controls won't interact with the aircraft or stock UI elements, CTRL-SHIFT-ESC will work to cycle the SRS overlay Stock CTRL-SHIFT-X will work to cycle the scratchpad overlay

HOTAS controls and clicky switch ingame controls work.

HOTAS controls to open UI elements such as rearm/refuel work without a keyboard modifier UI elements that have a "close window" button such as rearm/refuel will close with that UI button press.

Viable workarounds / lockup prevention steps at present Close Scratchpad with CTRL-SHIFT-X or alternate keymap on any occasion prior to cycling in-game chat with SHIFT-TAB this is the safest way of ensuring no conflict between the two UI layers

Recovery options are just to keep flying without being able to use keyboard shortcuts, ultimately only fix is to close DCS and restart and reconnect, this is problematic if you were quite far from any valid spawn points on starting a new login.

Possible fix options ED-side - if DCS had a close button in the corner of chat, this would likely solve the issue with this mod and anything else that's had UI/keyboard layer problem, this doesn't seem an exclusive issue to scratchpad, anything that interacts with chat ingame and runs LUA - DCS.lockKeyboardInput(keyboardEvents) or similar commands through DCS can cause this issue

Scratchpad-side, potentially an extra button or keymap that forces a lock/unlock cycle on KeyboardInput MAY work to disengage the lock that ingame chat has? tests of various changes to the scratchpad-hook.lua that i've done to add that sort of thing haven't had any success yet though, at least in 2.7, not re-tried editing that sort of function in DCS 2.8 with the 0.6.1 scratchpad release.

Scratchpad-side fix option 2, if scratchpad can surrender it's lock on ingameChat opening, this may prevent this from locking up?

Alternate runs through the replication steps in a hornet on Hoggit PGAW server produced the same effect, it's potentially an edge case that few pilots will trigger, but does seem to apply to any potential scratchpad user, that also uses ingame multiplayer chat.

Berakdev avatar Oct 29 '22 22:10 Berakdev