Author Topic: Button management core/modules  (Read 2600 times)

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Button management core/modules
« on: September 28, 2013, 10:17:56 AM »
Well, I'm not much of a C coder, but I can offer some ideas - "Those who can't do, teach", you know :-p ...

Problem: With more features and modules, assignment of buttons to functions gets confusing. I'm currently writing a hotkey module for use outside lv, but keeping up do date in which situations another functions for example does something with SET is a pita.

Currently: Currently modules have CBR_KEYPRESS, and then, nobody knows what keys they intercept or what they do with them - in the core it's even worse, you can hook into the shoot task everywhere and use keys.

Suggestion: Modules (and also the core itsself, for that matter) should explicitly register keys with the core as either blocking (only they want to tie a function to it) or non-blocking (everybody else also can afterwards). For blocking functions, the core could then issue an "ok, nobody else is using it" return code or fail with a hint which other function was quicker - so if the user cannot use function 1 which wants to use SET, he/she knows what to disable. Also the "register" function should have a "override Canon" switch for taking away buttons from Canon like SET. The core could also then easily print a list of keys that do something with ml in a help menu.

What do you think - is this useful or overengineering (and anybody else wondering what his SET currently does - Canon function, ettr, af, ...)? Anybody with good C coding ability volunteering :-p ?

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Button management core/modules
« Reply #2 on: September 29, 2013, 08:03:23 AM »