Project

General

Profile

Bug #3437

UI Elements don't capture keyboard and mouse on Linux

Added by seehp about 10 years ago. Updated over 8 years ago.

Status:
Closed
Severity:
Low
Assignee:
-
Category:
Controls and UI
Target version:
-
Start date:
11/05/2014
% Done:

100%

Version:
Platform:
Linux
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

(This bug is partly a duplicate of Bug #1230 but updated for 0.25)

Short Description

This bug's issues lead to issues of "click through UI" and "not captured data entry".

Reproduction

To reproduce keyboard bug (1):

- Go to VAB
- Select any root part
- (1) Go to vehicle name field or description field and move the cursor with the left/right/up/down keys. Watch how the view rotates, while the cursor is also moved in the field.

Another keyboard bug (2):

- Launch a flight with only the Mk1-2 Command Pod
- Right click on the pod and select "Rename Vessel"
- Enter the letter "c" in the name field. The view switches to IVA view.

To reproduce mouse bug (3):

- Go to VAB
- Select a large root part (i.e. Mk1-2 Command Pod)
- Scroll down view until Command Pod is beneath vehicle name field.
- You can now right click through the name field or the description text field.

Another mouse bug (4):

- Launch a flight with only the Mk1-2 Command Pod
- Right click on the pod and select "Rename Vessel"
- Move the mouse over the pod and watch it being highlighted in green even if the mouse is over the renaming UI window. (Compare this behavior with the right click dialog itself. Here the mouse is captured by the UI properly)

Another keyboard bug (5):

The keyboard capturing error occurrs also when typing into the title and text box when placing a new flag.

Another mouse bug (6):

On a mission, open the "done contracts" popup (there must be some available :). Clicking the delete or close button will click through. If you place some left-clickable part under the button (i.e. the hatch of a vessel), the EVA/transfer dialog will open.

All bugs seem to be related with the UI not capturing inputs properly. The behavior is very much pronounced when using addons/mods which require data or text entry and heavily affects KSP's usability. They are however very visible and very annoying in the game itself and leads to unplanned and unexpected bahavior, making the usage of action groups very dangerous.

Summary

This bug is related to both, mouse and keyboard behavior and might be split into two bugs.
This bug should be considered high, as it is a bug at a very low level regarding most of the UI and shows the need for a general review of in-game mouse and keyboard handling.
This is a linux-only bug, but it seems to be an issue on such a basic level, that the priority should not be set lower than normal to solve the root cause and not just singular issues!

How KSP should behave:

- Example 1 (Keyboard): While a cursor is active (any text entry), the keyboard entries should be fully captured.
- Example 2 (Mouse): In the building selection menu right click on a building (i.e. VAB). A context window pops up. It properly captures the mouse and does not allow click through. (It captures the mouse whereever on the screen it is)
- Example 3 (Mouse): In the same view open the contracts overview. Rotate the view so that some clickable building is beneath the contract list. Now you cannot click through. (It does not capture the mouse completely, you can still highlight/click on the buildings outside the contract list)
- Example 4 (Mouse): Start a flight with the Mk1-2 Command Pod only. Right click the pod. Move the mouse in and out of the context menu. The pod will only be highlighted when the mouse is outside the menu. This should be true to all UI elements!


Related issues

Related to Kerbal Space Program - Bug #1230: On Linux Plugins that have you type in a text box don't take focus away from craft controlsClosed08/23/2013

Has duplicate Kerbal Space Program - Bug #3878: UI Elements don't capture keyboard and mouse on Linux (regarding Flags, VAB, SPH, Actiongroups and more)Duplicate12/20/2014

History

#1 Updated by seehp about 10 years ago

When writing about capturing the mouse I mean catching the mouse. Capturing should only apply to the keyboard inputs.

#2 Updated by unseeingwhale about 10 years ago

  • Description updated (diff)
  • Status changed from New to Confirmed
  • Severity changed from High to Low
  • % Done changed from 0 to 10

#3 Updated by seehp about 10 years ago

Priority of bugs like this (http://bugs.kerbalspaceprogram.com/issues/2858) is normal, but this UI bug is low?
Are linux related bugs generally categorised as low?

#4 Updated by Ruedii about 10 years ago

This bug directly interferes with using any text entry windows during gameplay. For instance, the rename ship panel. It also makes use of the scroll wheel to scroll text boxes also zoom the screen.

#5 Updated by unseeingwhale almost 10 years ago

0.90 Update

Situation 1 is fixed

Situation 2 is still an issue

Situation 3 is easily avoidale by clicking on an area where you won't select the craft or moving the position of the craft before hand.

Situation 4, while you can right click on the vehicle and with the exception of #2 above the box works ok. Just don't right click on the pod.

#6 Updated by seehp almost 10 years ago

I created bug 3878 as a v0.90 follow up and update (including some more variations of this).

Please close this issue and do NOT downgrade the priority of the new bug below normal. This issue is a general problem and the root cause should be solved, not just swatting one occasion after another.

This bug will be kept instead of the new one.

#7 Updated by Ted almost 10 years ago

As you say, this is a pretty serious issue. However, like the other input issues on Linux (numpad input sporadically or completely not working etc.) the root cause of this issue lies with Unity and we can only do so much to combat this or workaround it. There is good news, Unity appear to be getting to fixing Linux-related input issues - 4.6.1 has a fix for the numpad input. Hopefully we'll see this one being tackled and in the meantime I'll up our priority for it and see what we can do on our end to tackle it.

Also, please do try to understand how the issue priorities work. A high priority issue is an issue that disables a significant portion of the game frequently, critical issues are issues that prevent the game from functioning at all and occur often to frequently. The issue priority field does not reflect the internal priority that the issue has for us, ie how quickly we're wanting to fix it.

Thanks again!

#8 Updated by seehp almost 10 years ago

Is there any way to send some pressure to the Unity team? I would gladly help.

#9 Updated by seehp almost 10 years ago

Ted, please copy the description of the new bug (#3878) to this one.

#10 Updated by unseeingwhale almost 10 years ago

  • Version changed from 0.25 to 0.90

#11 Updated by NavyFish almost 10 years ago

It would be useful for plugin authors to have the ability to reset the clickCount field on KSP's Mouse class. This is more of a feature request than a bug, but this bug report is the closest I've seen to describing the problem at hand: Since GUI click-through is such an issue, rapidly clicking buttons in a GUI window causes KSP to receive a double-click event. In-flight this deselects targets, etc. Being able to reset the clickCount would help. If more appropriate, I can create a separate ticket.

#12 Updated by Squelch almost 10 years ago

  • Description updated (diff)

seehp wrote:

Ted, please copy the description of the new bug (#3878) to this one.

I've taken the liberty of replacing the description with the one from the other issue. The original text from this one is quoted below for reference:

seehp wrote:

(This bug is partly a duplicate of Bug #1230 but updated for 0.90)

This bug's issues lead to issues of "click through UI" and "not captured data entry".

To reproduce keyboard bug (1):
- Go to VAB
- Select any root part
- (1) Go to vehicle name field or description field and enter the letter "x". Watch how symmetry mode changes with each keypress, while the letter is also entered in the field.
- (2) Go to vehicle description field and try to use "return" key for line break. It does not work.

Another keyboard bug (2):
- Launch a flight with only the Mk1-2 Command Pod
- Right click on the pod and select "Rename Vessel"
- Enter the letter "c" in the name field. The view switches to IVA view.

To reproduce mouse bug (3):
- Go to VAB
- Select a large root part (i.e. Mk1-2 Command Pod)
- Scroll down view until Command Pod is beneath vehicle name field.
- You can now right click through the name field or the description text field.

Another mouse bug (4):
- Launch a flight with only the Mk1-2 Command Pod
- Right click on the pod and select "Rename Vessel"
- Move the mouse over the pod and watch it being highlighted in green even if the mouse is over the renaming UI window. (Compare this behavior with the right click dialog itself. Here the mouse is captured by the UI properly)

Both bugs seem to be related with the UI not capturing inputs properly. The behavior is very much pronounced when using addons/mods which require data or text entry and heavily affects KSP's usability. They are however very visible in the game itself.

This bug is related to both, mouse and keyboard behavior and might be split into two bugs.
This bug should be considered high, as it is a bug at a very low level regarding most of the UI.

How KSP should behave:
- Example 1 (Keyboard): While a cursor is active (any text entry), the keyboard entries should be fully captured.
- Example 2 (Mouse): In the building selection menu right click on a building (i.e. VAB). A context window pops up. It properly captures the mouse and does not allow click through. (It captures the mouse whereever on the screen it is)
- Example 3 (Mouse): In the same view open the contracts overview. Rotate the view so that some clickable building is beneath the contract list. Now you cannot click through. (It does not capture the mouse completely, you can still highlight/click on the buildings outside the contract list)
- Example 4 (Mouse): Start a flight with the Mk1-2 Command Pod only. Right click the pod. Move the mouse in and out of the context menu. The pod will only be highlighted when the mouse is outside the menu. This should be true to all UI elements!

#13 Updated by seehp almost 10 years ago

While I understand that the Unity engine has some issues, the problem itself is being tackled in this plugin:
http://forum.kerbalspaceprogram.com/threads/108561-0-90-%28Jan25-15%29-Control-Lock-Input-text-into-text-fields-without-issuing-commands-to-your-vessel

Squad should be perfectly able to implement the functionality in KSP, as this bug is a major issue and ruins the game for my little nephew (and many others, as far as I am aware).

The only difference to the mod would be automatically locking the ship's controls when a textfield is entered, and unlock them when leaving...

#14 Updated by sal_vager about 9 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 10 to 100

Issues 1,2,4,5 and 6 are fixed in the current build (1028) though issue 3 still occurs.

Issues with addon dialogue click-through need to be addressed by the modders.

Marking as resolved, as 6 is pending the 1.1 UI overhaul.

#15 Updated by TriggerAu over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF