On Fri, 29 Dec 2006 19:52:31 +0000
Aleksej Struk <[EMAIL PROTECTED]> wrote:

> 
> Hi Nick,
> 
> The implementation of the key binding in mixer module is similar to
> the implementation in language module. iirc, it was taken exactly from
> that module.
> 
> The idea is, that module has to define the following things:
> 
> 1) the action, which will be executed on key press, For example
> "mixer_mute"
> 2) the function, which is associated with the action.
> 3) The 'human readable' name of the action. For example "Mute The
> Mixer". This name will appear in keybinding dialog.
> 4) The keybinding that uses the "mixer_mute" action. Actually this is 
> optional. And has to be
> done if you want to have default binding.
> 5) Finally, you have to do reverse actions on module unload.
> 
> 1) and 2) are done by those several lines of code:
> 
> E_Actoin *a;
> a = e_action_add("mixer_mute");
> if (a) a->func.go = _some_binding_callback_funcition
> 
> 3) is done basically by calling e_action_predef_name_set function (see
> e_action.h)
> 
> 4) You have to define a E_Config_Binding_Key *eb variable and fill it
> in with the correct values. After doing that, you have to: (i) insert
> eb into e_config->key_bindings, and (ii) call to e_bindings_key_add to
> make the binding active. Note, that you have to enclose (i) and (ii)
> between e_manager_keys_ungrab() and e_managers_keys_grab() after.
> 
> 
> For further information look into language madule e_mod_keybindigs.c
> file. 
> 
> Feel free to contact me on IRC if you need more detailed explanation.
> 
> sndev
> 
> 
> 
> On Fri, Dec 29, 2006 at 04:12:15PM +0100, Nikolas Arend wrote:
> > Hi,
> > 
> > the key bindings for "Decrease/Increase Volume" and "Mute mixer" don't 
> > seem to work for me (SuSE 10.1). Could somebody give me a short 
> > explanation of how they are implemented? I guess they are supposed to 
> > work and it's a problem on my side?
> > 
> > 
> > Thanks a lot,  Nick.
> > 

Hi,
as sndev said, the keybinding code in mixer was taken from the language module.
The bindings in the mixer modules need at least one gadcon instance of the mixer
in order to work. The mixer initialize is configuration only if an instance is 
created.
Once the configuration is filled with the right mixer then the keybinding can 
works.
So you need to put the mixer module in a shelf to have keybindings working.

I could have move a part of the configuration code in order to make it works 
right 
after the module is loaded. But at that time I wasn't really seeing the point.

The other issue can be because of the default value of the keybindings. 
I used some default keycodes for the media keys. Since I don't really know if 
there's 
some kind of specs making keyboards. I've asked a few people with different 
keyboards to give me there keysymbols and keycodes for this media keys.
None of them had a keysymbols and the keycodes was the same.

And so I set the keybindings by default on keycodes 160 174 and 176.
It might not be always that values but you can change them on E keybindings 
config.

lok

> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to