That's very weird !
And you say that the caracted actually turns around ? yet no feedback in the log ?
Man that is VERY very strange.
Well if you ever manage to make it work, I did a bit of fiddling around. and I would reccomend to change the first chunck of code (the one regarding what happens if the key is released) by this :
function keyboardHandler(eventType, character, keycode, modifiers)
if eventType==eEvtKeyUp then
print('key up: ' .. keycode)
keycode = keycode % 1073741824
if keycode == 80 then -- left
if charmove_x ~= 100 then -- as long as char is not going right
charmove_x = 0
end
elseif keycode == 79 then -- right
if charmove_x ~= -100 then -- as long as char is not going left
charmove_x = 0
end
elseif keycode == 81 then -- down
if charmove_y ~= -100 then -- as long as char is not going up
charmove_y = 0
end
elseif keycode == 82 then -- up
if charmove_y ~= 100 then -- as long as char is not going down
charmove_y = 0
end
end
createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y},25)
It's a first improvement that will prevent the character to stop if you do for exemple :
press left (char move left), press right (char move right), release left (with the original version the char would stop then resume moving to the right, here it just keep on moving right).
There is still lots of room for improvement, I may look it up later.
cheers