Make sure to pass the variables correctly for 'keyevent'.

Fix for https://github.com/mutualmobile/appium/commit/38453c48470a46ca636c5bdb8bd03db0705341d7 mentioned in https://github.com/appium/appium/pull/1155.