LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-31-2010, 11:33 AM   #1
Vinter
Member
 
Registered: Feb 2005
Location: Germany
Distribution: Aptosid
Posts: 148

Rep: Reputation: 19
Apple keyboard not working correctly


Hi,


I recently acquired an Apple wire-bound aluminum keyboard, and it has given me nothing but problems.

Several special characters keep changing positions, some keys won't work at all, and multimedia keys lose their assignments. This is true for the evdev driver, running e17 ecomorph on an up-to-date Sidux. Other drivers won't run the keyboard at all.

As I have found no mention of this problem and neither this board nor Sidux help channels have been able to help, I want to do something about this myself. Unfortunately, I have never taken part in an open source software project, which is why I need some beginner's help. Can someone point me in the direction of resources that would help me locate the excact source of the problem, tell me what driver or config file I would have to work on and - if successful - where I would publish this work to make it available to the community for integration in further releases?

Or is this too much of an issue to get to work on as a newbie?

Any help would be greatly appreciated.


Sincerely,

David
 
Old 09-01-2010, 04:21 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
Post Fix0rz

Greetingz!

Don't fret, this one should be an easy fix. For starters, it sounds like your keyboard isn't having a hardware problem. The symptoms you mentioned really point to a software issue;
1) special characters 'changing position'
2) some keys fail to work
3) multimedia keys lose their assignments

Keep in mind that since 'evdev' is a driver for X.Org, one of the best places to search would be the X.Org forums.

A Little Background on X.Org & evdev:

You should have an xorg.conf file somewhere in your /etc. The xorg.conf file is what would initially load and configure the 'evdev' driver.

Code:
Section "InputDevice"
  Identifier "devname"
  Driver "evdev"
  Option "Device"   "devpath"
  Option "Emulate3Buttons"     "True"
  Option "Emulate3Timeout"     "50"
  Option "GrabDevice"     "False"
  ...
EndSection
NOTE: You may have more than one of these 'evedev' sections. Try to find the one for a keyboard.

Possible Fix For You

There's a good write-up of Apple keyboard issues within the Arch-Linux Wiki over here. That link I provided lists (what appears to be) the exact symptoms you are having, and exactly how to fix them;

(Reproduced here for historical reasons in really, really small font)

Quote:
Function keys don't work

If your F<num> keys do not work, this is probably because the kernel driver for the keyboard has defaulted to using the media keys and requiring you to use the Fn key to get to the F<num> keys. To change this behavior, you have to change a driver setting. Do the following as root:

echo 2 > /sys/module/hid/parameters/pb_fnmode

If it tells you that the file doesn't exist, you probably have a newer kernel and will have to do the following instead:

echo 2 > /sys/module/hid_apple/parameters/fnmode

Place whichever command worked for you in /etc/rc.local to make the setting permanent.

< and > have changed place with § and ½

If the < and > are switched with the § and ½ keys, do the following:

setxkbmap -option apple:badmap

Place that in ~/.bash_profile, or if you use KDE:

Go to the "Control Center" -> "Regional & Accessibility" -> "Keyboard Layout" and press the "Xkb Options" tab. Scroll down and check the "apple" and "Swap keycodes of..." checkboxes. Click on "Apply".

If neither of these approaches seem to work, you can add these two lines to your ~/.Xmodmap file:

keycode 49 = less greater less greater bar brokenbar
keycode 94 = section degree section degree notsign notsign


if you use an canadian multilingual layout (where the "ù" and the "/" is switch) use this :

keycode 94 = slash backslash slash backslash bar brokenbar
keycode 49 = ugrave Ugrave ugrave Ugrave notsign notsign


Then run xmodmap ~/.Xmodmap.

Keysym mapping

To map the appropriate functions to your "media" keys place the following in ~/.Xmodmap:

keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume

keycode 144 = XF86AudioPrev
keycode 162 = XF86AudioPlay
keycode 153 = XF86AudioNext

keycode 101 = XF86MonBrightnessDown
keycode 212 = XF86MonBrightnessUp

keycode 204 = XF86Eject


and run xmodmap ~/.Xmodmap. For more information about these mappings see Extra Keyboard Keys in Xorg. and mac hard drive recovery

For more information Mac-How


If That Stuff Worked
If one or more of those things worked, awesome! Please post back into this thread.
Also, it would be really cool if you marked the thread as "[SOLVED]" and maybe gave the post that helped you out a "Thanks" or even some "Reputation" (see the links in my signature for more information).

Have a good one!

Last edited by xeleema; 09-01-2010 at 04:28 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
keyboard: I can't get this sign ^ correctly! xpucto Linux - Newbie 5 05-18-2008 08:00 AM
Apple USB Keyboard not working correctly vladuz976 Linux - Hardware 1 08-12-2006 12:25 PM
apple pro usb keyboard stops working Riichard MEPIS 2 08-12-2006 12:23 PM
Keyboard not working correctly Zakos Ubuntu 0 06-11-2006 02:24 PM
apple keyboard with ssh to linux pevelius Other *NIX 1 01-06-2005 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration