Bind a key for deploy in eclispe

We are using C++.

Has anyone been able to bind a keyboard shortcut to deploy code to the roboRio in Eclipse? I looked under Windows->Preferences->General->Keys, but I don’t see how to find a command for “Run As-> C++ WPILib Deploy”. Any idea of the steps?

Thanks,
Brian

I think this might be what you’re looking for: https://wiki.eclipse.org/FAQ_How_do_I_provide_a_keyboard_shortcut_for_my_action%3F

Did you ever get this working? I’m looking to do the same thing.

Deploy runs an ant script, so I think if you bind a key to “run last launched external tool” it should work.

Did anyone ever find a solution to this? Went searching again last night and it seems like it’s something that should exist but I couldn’t get anything to work.

Allen, have you checked out GradleRIO? Deploying from the command line for us is usually

[Up Arrow]
[Enter]

I guess changing the entire build system to be able to get a keyboard shortcut is an option, hopefully not the quickest option. :grin:

I have looked at GradleRIO but getting all the students to switch to it is harder since they can’t just follow screensteps live. It also isn’t the standard system so it gets harder to help other teams when they are using something different from you and you become less familiar with the other way.

Have you looked into AutoHotKey? Its basically making your own macros, so you could have something like Shift+B send the mouse to the correct spot, wait x seconds, then move to “build” and click on that. It would assume your workspace doesnt change though (if you made it without the WPILib bar and then added WPILib its gonna throw the whole thing off and youll have to change the pos of the mouse) but it may be worthwhile if Eclipse doesnt have that as a macro.

This may explain it better than I can, though its for use in Premiere.

AutoHotkey might be the best bet, I already use it for autocorrect and getting rid of caps lock (I hate caps lock).

Crtl+F11 will open the Run As dialog, then (down, up, enter) will deploy so that should be easy enough to build a macro for.

Autohotkey script for deploying


f10::
WinGetTitle, Title, A
IfInString, Title,Eclipse
{
	Send,^{F11}
	SetKeyDelay, 300 
	Send,{Down}
	Send,{Up}
	Send,{Enter}
	return
}
return

If someone finds an easier way please let me know, but this does what I want.