Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 294650 Details for
Bug 426576
[PATCH] macbook 3.1 and apple aluminum keyboards fn key does not work
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Updated kernel patch for 2.6.23 x86_64
cnolan-macbook-keyboard.new.patch (text/plain), 6.44 KB, created by
Chris Nolan
on 2008-02-12 12:39:28 UTC
(
hide
)
Description:
Updated kernel patch for 2.6.23 x86_64
Filename:
MIME Type:
Creator:
Chris Nolan
Created:
2008-02-12 12:39:28 UTC
Size:
6.44 KB
patch
obsolete
>--- > >--- a/drivers/hid/hid-input.c 2007-12-22 15:37:48.000000000 +0000 >+++ b/drivers/hid/hid-input.c 2007-12-22 15:53:22.000000000 +0000 >@@ -115,6 +115,30 @@ static struct hidinput_key_translation p > { } > }; > >+static struct hidinput_key_translation apple_keyboard_fn_keys[] = { >+ { KEY_BACKSPACE, KEY_DELETE }, >+ { KEY_F1, KEY_BRIGHTNESSDOWN, POWERBOOK_FLAG_FKEY }, >+ { KEY_F2, KEY_BRIGHTNESSUP, POWERBOOK_FLAG_FKEY }, >+ { KEY_F3, KEY_CYCLEWINDOWS, POWERBOOK_FLAG_FKEY }, >+ { KEY_F4, KEY_CONFIG, POWERBOOK_FLAG_FKEY }, >+ { KEY_F7, KEY_PREVIOUSSONG, POWERBOOK_FLAG_FKEY }, >+ { KEY_F8, KEY_PLAYPAUSE, POWERBOOK_FLAG_FKEY }, >+ { KEY_F9, KEY_NEXTSONG, POWERBOOK_FLAG_FKEY }, >+ { KEY_F10, KEY_MUTE, POWERBOOK_FLAG_FKEY }, >+ { KEY_F11, KEY_VOLUMEDOWN, POWERBOOK_FLAG_FKEY }, >+ { KEY_F12, KEY_VOLUMEUP, POWERBOOK_FLAG_FKEY }, >+ { KEY_UP, KEY_PAGEUP }, >+ { KEY_DOWN, KEY_PAGEDOWN }, >+ { KEY_LEFT, KEY_HOME }, >+ { KEY_RIGHT, KEY_END }, >+ { } >+}; >+ >+static struct hidinput_key_translation apple_keyboard[] = { >+ { KEY_VOLUMEUP, KEY_EJECTCD }, >+ { } >+}; >+ > static struct hidinput_key_translation powerbook_numlock_keys[] = { > { KEY_J, KEY_KP1 }, > { KEY_K, KEY_KP2 }, >@@ -172,8 +196,10 @@ static int hidinput_pb_event(struct hid_ > > if (hid_pb_fnmode) { > int do_translate; >- >- trans = find_translation(powerbook_fn_keys, usage->code); >+ if (hid->quirks & HID_QUIRK_APPLE_KEYBOARD) >+ trans = find_translation(apple_keyboard_fn_keys, usage->code); >+ else >+ trans = find_translation(powerbook_fn_keys, usage->code); > if (trans) { > if (test_bit(usage->code, hid->pb_pressed_fn)) > do_translate = 1; >@@ -196,8 +222,8 @@ static int hidinput_pb_event(struct hid_ > } > } > >- if (test_bit(usage->code, hid->pb_pressed_numlock) || >- test_bit(LED_NUML, input->led)) { >+ if (!(hid->quirks & HID_QUIRK_APPLE_KEYBOARD) && (test_bit(usage->code, hid->pb_pressed_numlock) || >+ test_bit(LED_NUML, input->led))) { > trans = find_translation(powerbook_numlock_keys, usage->code); > > if (trans) { >@@ -213,6 +239,14 @@ static int hidinput_pb_event(struct hid_ > } > } > >+ if (hid->quirks & HID_QUIRK_APPLE_KEYBOARD) { >+ trans = find_translation(apple_keyboard, usage->code); >+ if (trans) { >+ input_event(input, usage->type, trans->to, value); >+ return 1; >+ } >+ } >+ > if (hid->quirks & HID_QUIRK_POWERBOOK_ISO_KEYBOARD) { > trans = find_translation(powerbook_iso_keyboard, usage->code); > if (trans) { >@@ -237,6 +271,12 @@ static void hidinput_pb_setup(struct inp > for (trans = powerbook_numlock_keys; trans->from; trans++) > set_bit(trans->to, input->keybit); > >+ for (trans = apple_keyboard_fn_keys; trans->from; trans++) >+ set_bit(trans->to, input->keybit); >+ >+ for (trans = apple_keyboard; trans->from; trans++) >+ set_bit(trans->to, input->keybit); >+ > for (trans = powerbook_iso_keyboard; trans->from; trans++) > set_bit(trans->to, input->keybit); > >--- a/drivers/hid/usbhid/hid-quirks.c 2007-12-22 15:37:48.000000000 +0000 >+++ b/drivers/hid/usbhid/hid-quirks.c 2007-12-22 15:53:22.000000000 +0000 >@@ -59,6 +59,22 @@ > #define USB_DEVICE_ID_APPLE_GEYSER4_ANSI 0x021a > #define USB_DEVICE_ID_APPLE_GEYSER4_ISO 0x021b > #define USB_DEVICE_ID_APPLE_GEYSER4_JIS 0x021c >+ >+/* Apple 2007 Wired keyboards */ >+#define USB_DEVICE_ID_APPLE_KEYBOARD_ANSI 0x0220 >+#define USB_DEVICE_ID_APPLE_KEYBOARD_ISO 0x0221 >+#define USB_DEVICE_ID_APPLE_KEYBOARD_JIS 0x0222 >+ >+/* macbook3,1 keyboards */ >+#define USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI 0x0229 >+#define USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO 0x022a >+#define USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS 0x022b >+ >+/* Apple 2007 Wireless keyboards */ >+#define USB_DEVICE_ID_APPLE_WIRELESS_KEYBOARD_ANSI 0x022c >+#define USB_DEVICE_ID_APPLE_WIRELESS_KEYBOARD_ISO 0x022d >+#define USB_DEVICE_ID_APPLE_WIRELESS_KEYBOARD_JIS 0x022e >+ > #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a > #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b > >@@ -527,6 +543,22 @@ static const struct hid_blacklist { > { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, > { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD}, > { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, >+ >+ /* Apple 2007 Wired keyboards */ >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_KEYBOARD_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD}, >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_KEYBOARD_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD | HID_QUIRK_POWERBOOK_ISO_KEYBOARD}, >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_KEYBOARD_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD}, >+ >+ /* macbook3,1 keyboards */ >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD}, >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD | HID_QUIRK_POWERBOOK_ISO_KEYBOARD}, >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD}, >+ >+ /* Apple 2007 Wireless keyboards */ >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WIRELESS_KEYBOARD_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD}, >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WIRELESS_KEYBOARD_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD | HID_QUIRK_POWERBOOK_ISO_KEYBOARD}, >+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WIRELESS_KEYBOARD_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_KEYBOARD}, >+ > { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, > { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, > >--- a/include/linux/hid.h 2007-12-22 15:37:15.000000000 +0000 >+++ b/include/linux/hid.h 2007-12-22 15:55:38.000000000 +0000 >@@ -276,6 +276,7 @@ struct hid_item { > #define HID_QUIRK_HIDINPUT 0x00200000 > #define HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL 0x00400000 > #define HID_QUIRK_LOGITECH_EXPANDED_KEYMAP 0x00800000 >+#define HID_QUIRK_APPLE_KEYBOARD 0x01000000 > > /* > * Separate quirks for runtime report descriptor fixup
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 426576
:
290294
|
292293
|
294650
|
298060
|
298521