SSK2: Key Visual Parameter not being called

I decided to to try to make a homing projectile project, and have the character move around with WASD. But my visualParam for key does not run: 

require "ssk2.loadSSK" \_G.ssk.init({enableAutoListeners = true}) local physics = require "physics" physics.start() local isWPressed = false local isAPressed = false local isSPressed = false local isDPressed = false function onKeyEvent( self, event ) local vx, vy = self:getLinearVelocity() if event.keyName == "a" then if event.phase == "down" then --transition.to(self, {time = 3000, x = self.x - (display.actualContentWidth / 2)}) isAPressed = true self:setLinearVelocity(-300, vy) elseif event.phase == "up" then --transition.cancel() isAPressed = false if isDPressed == true then self:setLinearVelocity(300, vy) else self:setLinearVelocity(0, vy) end end end if event.keyName == "d" then if event.phase == "down" then --transition.to(self, {time = 3000, x = self.x - (display.actualContentWidth / 2)}) isDPressed = true self:setLinearVelocity(300, vy) elseif event.phase == "up" then --transition.cancel() isDPressed = false if isAPressed == true then self:setLinearVelocity(-300, vy) else self:setLinearVelocity(0, vy) end end end if event.keyName == "w" then if event.phase == "down" then --transition.to(self, {time = 3000, x = self.x - (display.actualContentWidth / 2)}) isWPressed = true self:setLinearVelocity(vx, -300) elseif event.phase == "up" then --transition.cancel() isWPressed = false if isSPressed == true then self:setLinearVelocity(vx, 300) else self:setLinearVelocity(vx, 0) end end end if event.keyName == "s" then if event.phase == "down" then --transition.to(self, {time = 3000, x = self.x - (display.actualContentWidth / 2)}) isSPressed = true self:setLinearVelocity(vx, 300) elseif event.phase == "up" then --transition.cancel() isSPressed = false if isWPressed == true then self:setLinearVelocity(vx, -300) else self:setLinearVelocity(vx, 0) end end end end local target = ssk.display.newRect(nil, centerX, centerY, {key = onKeyEvent}, {gravityScale = 0})

What am I missing?

I placed print statements to check if the function was being called, but nothing was printed.

I also tried this: 

require "ssk2.loadSSK" \_G.ssk.init({})

This is a bug in SSK2.

Long Term Fix
I will release this in version 008 on around Wed or Thur this week.

 
Short Term Fix #1

Edit ssk2/display/extended.lua and find line 23, then make the code look like this.

local autoRuntimeListeners = { "enterFrame", "mouse", "key" -- ADD ME } local autoListeners = { "accelerometer", "axis", "collision", "finalize", --"key", -- COMMENT OUT "sprite", "tap", "touch", }

 
Short Term Fix #2

Alternately, change your code to read thus

local target = ssk.display.newRect(nil, centerX, centerY, {}, {gravityScale = 0}) target.key = onKeyEvent listen("key", target)

Ok, thank you!

Note to the keen observers our there.

I noticed my code should really be:

local autoRuntimeListeners = { "accelerometer", "axis", "enterFrame", "mouse", "key", } local autoListeners = { "collision", "finalize", "sprite", "tap", "touch", }

This fix will be in 2017.008 coming this week

I also tried this: 

require "ssk2.loadSSK" \_G.ssk.init({})

This is a bug in SSK2.

Long Term Fix
I will release this in version 008 on around Wed or Thur this week.

 
Short Term Fix #1

Edit ssk2/display/extended.lua and find line 23, then make the code look like this.

local autoRuntimeListeners = { "enterFrame", "mouse", "key" -- ADD ME } local autoListeners = { "accelerometer", "axis", "collision", "finalize", --"key", -- COMMENT OUT "sprite", "tap", "touch", }

 
Short Term Fix #2

Alternately, change your code to read thus

local target = ssk.display.newRect(nil, centerX, centerY, {}, {gravityScale = 0}) target.key = onKeyEvent listen("key", target)

Ok, thank you!

Note to the keen observers our there.

I noticed my code should really be:

local autoRuntimeListeners = { "accelerometer", "axis", "enterFrame", "mouse", "key", } local autoListeners = { "collision", "finalize", "sprite", "tap", "touch", }

This fix will be in 2017.008 coming this week