Post subject: Mapping unused function or special key to arbitrary command
Posted: Thu Apr 30, 2009 11:59 pm
Joined: Wed Apr 22, 2009 5:01 am Posts: 14 Location: Melbourne, Australia
eeePC model: 900SD
Hi all,
Just wanted to return something back, as I've posted enough queries on here in the last week
This is aimed at those with minimal Linux experience, to help them better understand how the Eee PC ACPI utilities work.
Here's how I mapped the Fn+F3 key combination to launching Firefox web browser. These instructions can be generalised, i.e. you can replace Fn+F3 with another key combination, or launch a different app.
NOTE: Using the Eee PC ACPI configuration files to map Fn+F3 to a non-ACPI related function may seem like an inappropriate use of such files. However, on my PC at least, these configuration files are used to map functions to all the Fn+Fx key combinations except for Fn+F3 and Fn+F4 (and also to all the 4 "instant" keys above the function keys). So to use a completely different method to map Fn+F3 to a function just because it happens to be a non-ACPI function seems like an unnecessary complication.
1. Switch to superuser mode, by typing 'su' on command line then entering root password.
2. Make backup copies (i.e. with different filenames) of the files /etc/default/eeepc-acpi and /etc/acpi/eeepc/eeepc-actions.sh
3. Edit the /etc/default/eeepc-acpi file, and change (uncomment) the line
Code:
# KEY_SHOW=1
to
Code:
KEY_SHOW=1
4. Logoff then logon again.
5. Press the Fn+F3 key combination, and write down the displayed keycode in the popup window.
6. Switch to superuser mode, by typing 'su' on command line then entering root password.
7. Edit the /etc/default/eeepc-acpi file again, and add the lines
Code:
# This is the trigger key to run Firefox web browser. KEY_INTERNET="00000037"
Note: Replace the "00000037" displayed above with your written down keycode. 00000037 just happens to be the Fn+F3 keycode on my system.
8. Edit the /etc/acpi/eeepc/eeepc-actions.sh file, and search for the line
You should probably check that the icon pathname above is correct - it is on my system, but may not exist on yours. Just search for an appropriate .svg file.
9. Logoff then logon again.
10. Press Fn+F3, and verify that the keycode popup window, followed by the "Launching Firefox" popup window appear, and that Firefox is then executed. If this fails for some reason, you can always restore the backup copies made in step 2 to reverse the file changes and then reboot - all will then be as it was before
11. Having verified the key combination now works, edit the /etc/default/eeepc-acpi file again, and change the line
Code:
KEY_SHOW=1
back to
Code:
# KEY_SHOW=1
This removes the popup windows telling you what the keycode is for the function or instant key combination you just pressed. You may even choose to keep these popups (I did, because I like to know these things ), in which case just skip this step.
Now, if you'll excuse me, I'm off to map Fn+F4 (the only unused function-key combination I still have )
Cheers - Victor E.
_________________ Eee PC 1000HE / 2GB RAM / 160GB HDD / 16GB SDHC card / Eeebuntu Standard 2.0
Post subject: Re: Mapping unused function or special key to arbitrary command
Posted: Fri May 08, 2009 4:31 pm
Joined: Mon Dec 15, 2008 1:55 am Posts: 1969 Location: El Puerto de Santa María, España
eeePC model: 1000HA
Aurora version: Beta 4.0
Yes, very good tut
_________________ Asus Eee 1000HA - Fuduntu 2012.1 Asus Eee 1000 - Aurora Beta 0.5 (EB4 beta 1 with all updates applied) (left on airplane) Asus G73JHA1 - Fuduntu 2012.1
Post subject: Re: Mapping unused function or special key to arbitrary command
Posted: Fri May 08, 2009 4:54 pm
Joined: Thu Mar 12, 2009 1:43 am Posts: 1369
eeePC model: 1000HE
Aurora version: Beta 4.0
Yes, this is very good data, good enough to be added to the StatUX Wiki (which is open for anonymous editing now).
The function of starting Firefox could have been done with a CUSTOM token, but this is very helpful to users that want to add functionality regardless.
Post subject: Mapping unused function or special key to arbitrary command
Posted: Fri May 15, 2009 1:32 pm
Joined: Thu Mar 12, 2009 1:43 am Posts: 1369
eeePC model: 1000HE
Aurora version: Beta 4.0
Thanks again for this tutorial. I took a copy of it, and posted it on the wiki. I've changed the functionality, but it doesn't take away from your intended goal. I've made sure you get credit for the original too.
Users browsing this forum: No registered users and 2 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum