Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyPublisher does not treat all shortcuts equally #201

Open
AndrejOrsula opened this issue Mar 26, 2021 · 1 comment
Open

KeyPublisher does not treat all shortcuts equally #201

AndrejOrsula opened this issue Mar 26, 2021 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@AndrejOrsula
Copy link

AndrejOrsula commented Mar 26, 2021

Environment

  • OS Version: Ubuntu 20.04
  • Ignition: Edifice, built from source
  • ign-gui branch: main (da55587), built from source - together with Edifice

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.

  • Expected behavior: All keypresses are published, including "blank space" ("spacebar") key.
  • Expected behavior (alternative): All keypresses except bound shortcuts are published.
  • Actual behavior: Keys such as 't' (shortcut for Translate mode) or 'r' (shortcut for Rotate mode) are published together with other keys. However, key for "spacebar" (shortcut for pause/play) is not published.

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
@AndrejOrsula AndrejOrsula added the bug Something isn't working label Mar 26, 2021
@chapulina
Copy link
Contributor

chapulina commented Mar 26, 2021

Oh this is related to gazebosim/gz-sim#466 and gazebosim/gz-sim#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.

@chapulina chapulina added help wanted Extra attention is needed bug Something isn't working and removed bug Something isn't working labels Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants