Added key commands to the Python script.