RobotStudio event

Keyboard shortcut (macro)

Well the only way to get user defined shortcuts into RS without going through windows it to use a view.
This code works only if you have opened a station, then clicked in the graphics view, then push a key if the key is 'r' or 'a' then you get a messagebox.

Dim WithEvents myView As View
Private Sub Application_StationAfterOpen(ByVal Station As Station)
    Set myView = ActiveView
End Sub
Private Sub myView_KeyDown(ByVal Char As Long, ByVal RepCnt As Long, ByVal Flags As Long)
    'MsgBox Char
    Select Case Char
    Case 65
        MsgBox "You just pressed 'a'"
    Case 82
        MsgBox "You just pressed 'r'"
    End Select
End Sub

image