Cut out extraneous keyboard management code.
Added button to trigger automation and some debug logging.