Magic Lantern Forum

Developing Magic Lantern => Scripting Corner => Scripting Q&A => Topic started by: garry23 on January 22, 2021, 02:00:23 PM

Title: Key event handler and ETTR
Post by: garry23 on January 22, 2021, 02:00:23 PM
@a1ex

In the script I'm playing with I wish to hijack the SET and UNPRESS_SET keys, so I can use these with a long press, ie use normally if the press/unpress is less that x seconds, or use differently if longer than x seconds.

All is OK, other than the ETTR remains triggered by a SET, no matter what I do.

That is, the ETTR triggered by SET seems to circumvent the key event handler, eg if I use the following, ETTR still triggers off of SET:

Code: [Select]
if kk == KEY.SET or kk== KEY.UNPRESS_SET then
    return false
end

Is this intentional or a 'bug'?

Cheers

Garry
Title: Re: Key event handler and ETTR
Post by: a1ex on January 22, 2021, 03:03:32 PM
Answered here: https://www.magiclantern.fm/forum/index.php?topic=21155.msg194047#msg194047

A fix would be non-trivial, and I prefer not to think too much about it right now.
Title: Re: Key event handler and ETTR
Post by: garry23 on January 22, 2021, 03:28:41 PM
@a1ex

You really know how to embarrass someone  :) :) :)

Your memory is phenomenal!

I have a workaround.

Fully understand this is not a priority matter, especially for you.

Cheers and stay safe

Garry