This is probably a naive fix for the issue reported:
Try to create a scenario where you input a key and the console exits before carnac displays your key.
The app will stop working since GetAssociatedProcess() method won't find the process Id associated and an exception arises.
So this tries a steps to be more resilient:
if Process.GetProcessById fails, just return null instead of a Process
if we then get a null Process, return a null KeyPress because we can't really do much else
ignore null KeyPress events found in the observable stream
Fixes #89
This is probably a naive fix for the issue reported:
So this tries a steps to be more resilient:
Process.GetProcessById
fails, just return null instead of aProcess
Process
, return a nullKeyPress
because we can't really do much elseKeyPress
events found in the observable streamMake sense @alfhenrik?