I agree that this would be a nice enhancement. However, note that for the maintenance form toolstrip, it wouldn't actually be added there, but rather at the form level. Why? Because if the toolstrip handled the shortcuts, they would only work if the toolstrip was receiving the key presses. I.e. if the user was in a text box and hit the keyboard shortcut, the maintenance form toolstrip wouldn't know about it. However, key presses bubble up to parent controls, so if you handled the shortcut at the form level, it would work great.
It is easy to implement though. Typically, you override the ProcessCmdKey method on the form. Then you'd use a select case (switch in C#) statement to test for the various keys and then call whatever methods. The following would implement save and new short cuts:
Protected Overrides Sub ProcessCmdKey(msg As System.Windows.Forms.Message _
, keyData As System.Windows.Forms.Keys)
'-- Track if the key is handled here
Dim keyHandled As Boolean = False
'-- Handle any configured keyboard shortcuts
' Note that these are the same methods used by the
' SF MaintenanceFormToolstrip
Select Case keyData
Case Keys.Control Or Keys.S
'-- Clt + S. Use SF StandardForm Save method...saves all configured BOs
Me.Save()
Case Keys.Control Or Keys.N
'-- Clt + N. Use SF STandarForm Add method
Me.Add()
End Select
'-- If key was handled, set message result, if not use base processor
If keyHandled Then
'-- Trent says this is a good idea...not sure why or what this is, but...
msg.Result = IntPtr.Zero
Else
keyHandled = MyBase.ProcessCmdKey(msg, keyData)
End If
'-- Return if key was handled
Return keyHandled
End Sub
Hope that helps!