This short example shows how to use iFSM as a rule engine... This example was inspired from this php library: https://github.com/bobthecow/Ruler
You can also have a quick look on how to handle keyboard events...
provided by Intersel