Bug 10947

Summary: F5 and F6 keys on Macbook Air (and possibly other macbooks)
Product: Drivers Reporter: Henrik Rydberg (rydberg)
Component: Input DevicesAssignee: drivers_input-devices
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: v2.6.26-rc7 Subsystem:
Regression: --- Bisected commit-id:
Attachments: add (and correct) FN+F5 and FN+F6 keys for macbook air

Description Henrik Rydberg 2008-06-21 07:30:19 UTC
Latest working kernel version: unknown
Earliest failing kernel version: unknown
Distribution: ubuntu hardy
Hardware Environment: macbook air
Software Environment: kernel source from git tree
Problem Description: hid-input.c contains no mapping for F5 and F6 keys

Steps to reproduce: none

Being a complete newcomer to kernel work, this might have other solutions (based on quirks?), but here it is anyway:

In drivers/hid/hid-input.c, the apple_fn_keys translation table contains no entries for the F5 and F6 keys, and the FN+F3 key is mysteriously mapped to FN_F5. A patch is attached which maps the F5 and F6 keys to KBDILLUMDOWN and UP, respektively, which make them work as keyboard backlight control keys. Again, please note that this is only checked on the macbook air, and if there are other means of solving this, please disregard the patch.
Comment 1 Henrik Rydberg 2008-06-21 07:34:55 UTC
Created attachment 16570 [details]
add (and correct) FN+F5 and FN+F6 keys for macbook air

Patch created against the v2.6.26-rc7 kernel source with the command

diff -u ../../../upstream-2.6/drivers/hid/hid-input.c hid-input.c