View previous topic :: View next topic |
Author |
Message |
VanFanel Apprentice
Joined: 19 Feb 2007 Posts: 161
|
Posted: Thu Mar 08, 2012 10:13 am Post subject: [SOLVED] Disable spacial fn keys functions in apple kbd? |
|
|
Hello there
I've been happily using an aluminium Apple keyboard for the last years with Gentoo, but I just updated the whole system and now my fn keys are configured as volume and brightness controls etc.
I'd like to get back to their default behaviour. I know I could just xmodmad the whole keys array, but I'm sure there's a more elegant solution.
I have read there's an /etc/conf.d/ file for the APPLE HID module, butI have all USB HID stuff compiled in-kernel. No modules.
Thanks!
Last edited by VanFanel on Thu Mar 08, 2012 9:44 pm; edited 1 time in total |
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Thu Mar 08, 2012 4:17 pm Post subject: |
|
|
Don't know if that is generic for Apple, but this works on my MBP Code: | echo X > /sys/module/hid_apple/parameters/fnmode |
for X in: 0=completly disabled, 1=normal FX-keys, 2=Function-Keys _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
|
VanFanel Apprentice
Joined: 19 Feb 2007 Posts: 161
|
Posted: Thu Mar 08, 2012 7:34 pm Post subject: |
|
|
Thanks for trying, avx, but I don't have /sys/module/hid_apple/parameters/fnmode file, since I don't have HID_APPLE as module, but built-in into the kernel. |
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Thu Mar 08, 2012 7:44 pm Post subject: |
|
|
Meh, would you at least try the command instead of only reading it?! Code: | #grep HID_APPLE .config
CONFIG_HID_APPLE=y |
This virtual directory has nothing to do with built-in or module, even if the name suggests otherwise. _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
|
VanFanel Apprentice
Joined: 19 Feb 2007 Posts: 161
|
Posted: Thu Mar 08, 2012 9:29 pm Post subject: |
|
|
oh, it DOES work!
However, I've to do it as root, and I can't sudo the command:
manuel@macmini ~ $ sudo echo 0 > /sys/module/hid_apple/parameters/fnmode
bash: /sys/module/hid_apple/parameters/fnmode: Permission denied
So, where do you recommend me to put it so it's done on every boot?
I'd put it in .bash_profile, but since it won't give me permission to sudo it, I can't. |
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Thu Mar 08, 2012 9:35 pm Post subject: |
|
|
Just drop something like '01_fnkeys.start' into /etc/local.d, make it executable and put Code: | #!/bin/bash
echo X > /sys/module/hid_apple/parameters/fnmode | in there, then it'll be executed at boot.
Alternatively, you could chmod the file as needed. _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
|
VanFanel Apprentice
Joined: 19 Feb 2007 Posts: 161
|
Posted: Thu Mar 08, 2012 9:43 pm Post subject: |
|
|
It worked, yay!!
And I learned a new way to run custom scripts at boot
Thanks, avx!! Thanks!! |
|
Back to top |
|
|
|