-
Notifications
You must be signed in to change notification settings - Fork 2
Keyboard Shortcuts #182
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
base: main
Are you sure you want to change the base?
Keyboard Shortcuts #182
Conversation
Look into MaterialApp.shortcuts and .actions ;) |
Since when did that exist? I like my implementation though since it gives more control on when you want things to run |
Not forever, but at least a little while I think Sure, but you can just use a bool for the same effect. Also, can we rethink the key bindings? I think space bar to toggle idle <--> manual makes more sense |
The reason I chose not to do that is because it becomes less of a safety feature and more of a utility where you have to know what is going on. This is intended for quickly E-Stopping when something hazardous is happening and you need to quickly stop it from the laptop. I would want to have it set up so you have a no-doubt disable button where you know for a fact it will stop sending commands to the rover. |
Not as clear cut, because there is a difference between stop sending commands and stop dangerous behavior. You can stop sending commands already by letting go of the controller, but we have a special stop command for all the Subsystems that we map to SELECT, which actively cancels all past commands. If you wanted to emulate the SELECT behavior on the space bar, that could be useful too (put in idle and stop everything) Also, let's be careful with terminology here because e-stop is a physical hardware button that cuts off the battery, and using it immediately ends the mission and gives a 20% penalty |
IMO when you're at the "control station" (the laptop in our case), you should have a way to quickly stop everything
Thanks for the clarification, I'm used to E-stop meaning a completely different thing. A better term would be "e-disable" |
Adds a new service to handle global shortcuts. The shortcuts are only called if the window is in focus, but is not dependent on which specific widget is in focus (which is why I avoided the flutter shortcuts widget).
Right now there's 2 shortcuts which are binded in the
init()
method of theShortcutsService
, but these could be added from anywhereSpace
will set the rover to idle if it's in auto or manual, and[]\
(at the same time) will set it to manual if it's currently idle.And yes, I stole these shortcuts from the FRC driver station