added example of flask with key listeners