gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
74 stars 43 forks source link

KeyPublisher does not treat all shortcuts equally #201

Open AndrejOrsula opened 3 years ago

AndrejOrsula commented 3 years ago

Environment

Description

Very minor thing, which might as well not by an issue - just something done by design. I do not have any use-case for it currently (just something I noticed when trying out the demo), so please just close this issue if you think it works as it should.

Note: Combinations with holding "ctrl" or "shift" allow "spacebar" key to be published

Steps to reproduce

  1. ign gazebo empty.sdf
  2. Add Key publisher GUI plugin (manually)
  3. ign topic -e -t /keyboard/keypress
  4. While Gazebo GUI is in focus, press keys such as 'a' or 'b' - keys are published
  5. While Gazebo GUI is in focus, press keys such as 't' (shortcut for translate mode) or 'r' (shortcut for Rotate mode) - keys are published
  6. While Gazebo GUI is in focus, press "spacebar" - no key is published
chapulina commented 3 years ago

Oh this is related to https://github.com/ignitionrobotics/ign-gazebo/pull/466/ and https://github.com/ignitionrobotics/ign-gazebo/issues/369. I believe we should update ignition::gui::WorldControl not to use a QML shortcut for the space bar, because that swallows the events. Instead, it should filter key events from the main window like ignition::gazebo::gui::TransformControl plugin is doing now.