Author Topic: Simulated Q Button for EOSM  (Read 2986 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1772
Simulated Q Button for EOSM
« on: January 05, 2017, 09:27:39 PM »
Although the EOSM is rather limited in the number of buttons, many say this is made up for via the touch screen.

Maybe: but if you have 'fat fingers' or just like using buttons (like me), you may like to try this small helper script.

All it does is convert one of the EOSM buttons into a Q button: I use [INFO].

To use, simply put in the script folder, make sure Lua module is running and the script is in autorun mode.

The [INFO] is only switched to be a simulated [Q] when the ML menu is active: at all other times [INFO] acts like [INFO].

You can easily change KEY.INFO to, say, KEY.PLAY if you wish - your choice :)

With the script running, it is very easy to move through the ML menu on the EOSM simply using the main wheel and the [INFO/Q] button.

Usual caveats: works for me and I provide no guarantees  ;)

Cheers

Garry

Code: [Select]
q_pressed = false

function sim(arg)
if q_pressed == true and menu.visible then
key.press(KEY.Q)
q_pressed = false
return false
else
return true
end
end

function test4Q(key)
    if key == KEY.INFO and menu.visible then
q_pressed = true
return false
else
return true
end
end

event.keypress = test4Q
event.shoot_task = sim

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3250
  • 5D3 / M1 / 7D / 70D / SL1 / M2
Re: Simulated Q Button for EOSM
« Reply #1 on: January 05, 2017, 10:16:39 PM »
Hell yeah @garry23 this one is smoking hot!
5D3.113 • 5D3.123 • EOSM.203 • 7D.203 • 70D.112 • 100D.101 • EOSM2.*

Licaon_Kter

  • Hero Member
  • *****
  • Posts: 519
  • M
Re: Simulated Q Button for EOSM
« Reply #2 on: January 05, 2017, 11:04:29 PM »
I find Q ok, but nice LUA script reference. Thanks

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1772
Re: Simulated Q Button for EOSM
« Reply #3 on: January 06, 2017, 08:37:37 AM »
@Licaon_Kter

I agree the EOSM [Q] button gets you into the ML menus OK, but because on the EOSM the [Q] is also the [SET], you can't use that button to go backwards/out of the ML menus.

By simulating the Q on, say, the [INFO], you can go in/out of the ML menus.

The 'beauty' of the script is that this functionality only works when you need it, ie at all other times you have [INFO] or another button to sim [Q], operating as normal.

I must say, being able to move around the ML menu with the simulated [Q] greatly speeds up my access/control of the ML menus on the EOSM. Previously I found I was often missing the touch-Q, eg fat/cold fingers.

Cheers

Garry

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12283
  • Emergencies only
Re: Simulated Q Button for EOSM
« Reply #4 on: January 13, 2017, 09:43:59 AM »
Reformatted the script a bit:

Code: [Select]
-- Open ML submenus with INFO
-- This script remaps the INFO button to [Q] when ML menu is active.

function remap_info_to_q(key)
  if key == KEY.INFO and menu.visible then
    key.press(KEY.Q)
    return false
  else
    return true
  end
end

event.keypress = remap_info_to_q

Changes:
- first comment line is what appears in menu
- second line appears in menu as help text (description)
- use spaces for indentation (tabs width may be different in other editors)
- renamed the event handler
- removed the shoot_task hook (discussed here)


garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1772
Re: Simulated Q Button for EOSM
« Reply #5 on: January 13, 2017, 09:59:44 AM »
@A1ex

Once again: many thanks for your time.

I had noticed the indent 'problem' and will use spaces in future if I can. I'm currently using Visual Studio Code as my editor.

Now I know I can use key.press inside an event.keypress function (up until now I thought I couldn't as I thought it might create a 'recursive' situation), I will fix that in my other scripts.

Bottom line: I really appreciate you and others spending time mentoring/coaching us 'newbies'.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12283
  • Emergencies only
Re: Simulated Q Button for EOSM
« Reply #6 on: January 13, 2017, 10:09:11 AM »
Now I know I can use key.press inside an event.keypress function (up until now I thought I couldn't as I thought it might create a 'recursive' situation), I will fix that in my other scripts.

Canon's GUI code (where this event is placed) uses a message queue. Calling key.press will put a new message (a key event) in the queue, so the keypress hook will be called again, after the first one exits.

FGP

  • Just arrived
  • *
  • Posts: 1
Re: Simulated Q Button for EOSM
« Reply #7 on: February 23, 2018, 02:37:20 PM »
Hello guys, I tried to use this script but it does not seem to work with the last build :/
I tried both versions, the second versions is bring an error in LUA script.

Also, using the LUA script makes it a bit slower to start the EOS-M, so I think I will finally pass on that.
Too bad this is not implemented in the build fore EOS-M though.

Just reporting ;)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12283
  • Emergencies only
Re: Simulated Q Button for EOSM
« Reply #8 on: February 24, 2018, 12:08:11 PM »
Too bad this is not implemented in the build for EOS-M though.

Please try the experimental lua_fix build (it uses a long SET/Q press to open submenus), and report back if you want this feature in mainline (since I need to know how well it works in order to include it).

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1772
Re: Simulated Q Button for EOSM
« Reply #9 on: February 24, 2018, 12:14:20 PM »
@FPG

As @a1ex says, try the latest experimental build, the long press works well  :)

Also, the original script was written for the EOSM back then and did work, but the Lua module evolves and scripts can become ‘broken’.

I have suggested that there be a Lua version data field, that script writers can access, ie to ensure older builds are not used. But with all the other development needs, this is hardly a priority item for the developers.


Jip-Hop

  • Freshman
  • **
  • Posts: 87
Re: Simulated Q Button for EOSM
« Reply #10 on: July 05, 2019, 01:28:38 PM »
I was wondering about the Q button and if there's still the need for this script in Dannes builds for the EOS M.
But it's a bit tricky searching the thread for Q button when "Each word must be at least two characters long".
With the play button I can enter and exit submenu's in ML menu.

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6841
Re: Simulated Q Button for EOSM
« Reply #11 on: July 05, 2019, 07:33:56 PM »
Enter this in google:
Code: [Select]
"eos m" "q button" site:magiclantern.fm/forum"" = match string
site: = restrict to given location (and sub URLs)
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

Jip-Hop

  • Freshman
  • **
  • Posts: 87
Re: Simulated Q Button for EOSM
« Reply #12 on: July 05, 2019, 08:12:24 PM »
Clever!
Found this thread https://www.magiclantern.fm/forum/index.php?topic=15681.new#new

I understand now where my confusion comes from. I kept seeing the Q button (which is also the SET button) in the ML interface but now I understand it's remapped to the play button while in ML menu.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12283
  • Emergencies only
Re: Simulated Q Button for EOSM
« Reply #13 on: July 05, 2019, 09:06:01 PM »
Indeed, the EOS M could use a different icon, as PLAY is now the primary way of opening submenus on this camera. See e.g. here for how it was done on other models without a Q button.

This change (PLAY button for submenus) was done with EOS M in mind, but it was applied to all models (alongside the real Q button, where present).

Jip-Hop

  • Freshman
  • **
  • Posts: 87
Re: Simulated Q Button for EOSM
« Reply #14 on: July 05, 2019, 09:30:11 PM »
Interesting, thanks a1ex!