modified version to get control key
Merge pull request #61 from jtanx/master

modified version to get control key