Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Disable spacial fn keys functions in apple kbd?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
VanFanel
Apprentice
Apprentice


Joined: 19 Feb 2007
Posts: 161

PostPosted: Thu Mar 08, 2012 10:13 am    Post subject: [SOLVED] Disable spacial fn keys functions in apple kbd? Reply with quote

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
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Thu Mar 08, 2012 4:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
VanFanel
Apprentice
Apprentice


Joined: 19 Feb 2007
Posts: 161

PostPosted: Thu Mar 08, 2012 7:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Thu Mar 08, 2012 7:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
VanFanel
Apprentice
Apprentice


Joined: 19 Feb 2007
Posts: 161

PostPosted: Thu Mar 08, 2012 9:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Thu Mar 08, 2012 9:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
VanFanel
Apprentice
Apprentice


Joined: 19 Feb 2007
Posts: 161

PostPosted: Thu Mar 08, 2012 9:43 pm    Post subject: Reply with quote

It worked, yay!!

And I learned a new way to run custom scripts at boot :D

Thanks, avx!! Thanks!! 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum