<p dir="ltr">I agree with the following solution.</p>
<div class="gmail_quote">On Feb 17, 2014 8:42 AM, "Ted Felix" <<a href="mailto:ted@tedfelix.com">ted@tedfelix.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/11/2014 11:29 PM, Lingzhu Xiang wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If now acpid users change rules to handle button/f20 for mic muting,<br>
and in the future udev maps something else to f20 in your case, then<br>
those rules will break again.<br>
</blockquote>
<br>
But that's a configuration file change, not a code change. So that's ok. The key is to avoid code changes at all costs. Give the users the power to do what they need.<br>
<br>
Mapping both the micmute event and the F20 button to button/micmute in the code limits the user's abilities. It also hides an implementation detail that the users, unfortunately, should be aware of.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I can.<br>
</blockquote>
<br>
If you can work with button/f20, then let's go with that for an interim fix. Then we can consider alternatives.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Based on the particulars, I have a number of alternative solutions that<br>
should solve your current issue and future-proof acpid at the same time.<br>
</blockquote></blockquote>
<br>
As an example of an alternative that would move the changes out of the code and into the config files, we can implement a "remapping" feature in acpid that would allow the user, through a config file, to remap an event (say button/f20) to another event (say button/micmute). Then you've got exactly what you want, and acpid code need not change in the future when someone else would like to use F20 for something else.<br>
<br>
(Thanks for copying the entire email. My ISP's email server does not like <a href="http://bugs.debian.org" target="_blank">bugs.debian.org</a> at all.)<br>
<br>
Ted.<br>
</blockquote></div>