Adding Hot Key(s) to Ground Control

I have a feature request for Ground Control: I would like hot keys for run, pause and stop buttons. Is it possible, would it be hard? Sorry, I don’t know Python.

1 Like

For the base Ground Control, I did a quick search, and it looks like Kivy could support it.

2 Likes

Thanks for looking into it.

Which keys did you have in mind? ‘R’, ‘P’ and ‘S’ maybe? The way GC is set up, single-key hot keys are pretty easy to implement, multi-key one not so easy.

1 Like

We may want to have multiple keys, in addition to RPS as you suggest:
the space bar be pause/unpause
escape be stop/abort

The keys would be editable in Settings/GroundControlSettings, that limits us to one key per action.
Assign the escape key using the word escape or assign the spacebar using the word spacebar.

1 Like

there is Runs vs Pause and there is toggle run/pause with a single key

how would you specify both with your approach?

My plan is to have the hot key call the same routine that clicking the button calls. That handles updating the text on the ‘Pause’ button when it changes state.

It’d be nice to be able to assign custom keys. My preference would be to have the space bar be stop, I’m not as concerned about the run and pause keys, ‘r’ and ‘p’ are fine.

1 Like

Ok, I’ve opened a PR in the GroundControl repository to do that.

  • The key assignments are editable in Settings/GroundControlSettings, though that limits us to one key per action. Defaulted to ‘r’, ‘p’, ‘s’ (lower case)
  • The escape key can be assigned using the word escape, the spacebar using the word spacebar. Avoid upper case, shifted or meta characters.
  • Assign a character to disable FAKE_SERVO mode, press that key along with ‘ctrl’ or ‘alt’ or ‘cmd’ to enable FAKE_SERVO. Defaulted to ‘f’ for off.
  • The Run/Pause/Stop hotkeys call the same routine that clicking the corresponding button calls. That handles updating the text on the ‘Pause’ button when it changes state.
2 Likes

Thanks! I’ll give it a try, and let you know how it goes.

2 Likes