<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def onKeyInCommandEntry(self, event):
        '''Called when a key is pressed when the command entry box has focus.'''
        if event.char == '\r':
            self.onSendCommand()
            self.canvas.focus_set()