David :)
I have this simple test script: but it doesn't respond as I would expect:
event.keypress = function(key)
if key == KEY.PLAY then
display.notify_box (key,3000)
return false
else
return true
end
end
I would expect the notify to display only if PLAY is pressed, ie value 24; and play is not enacted by Canon, ie return false.
What seems to happen is notify is called every time a key is pressed.
Any hints what I'm missing?
David
Sorry, still getting confused.
Why does this create errors?
event.keypress = function(key)
if key == KEY.PLAY then
key.press(KEY.PLAY)
return false
else
return true
end
end
I'm surprised it doesn't lock up the camera. Theoretically you've set up an infinite loop.
Of course: how stupid of me.
The Lua key.press will call the event handler, that's running!!!
I was trying to see if I could use Lua to reprogram functionality to the PLAY key.
My thought was to reprogam PLAY to operate like the ETTR SET, which, unfortunately is not in the ML EOS-M version.
Once again, thanks for the (obvious :-[) pointer.