From: Gordon <gkoefner@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] force key-release events for Samsung p560 and r560 laptops in atkbd.c
Date: Mon, 15 Jun 2009 11:07:38 +0200 [thread overview]
Message-ID: <9a518b600906150207l1be4c0e4w6e2ec2ece6b89181@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
Hi all,
certain FN keys on the Samsung P560 and R560 laptops do not produce
"unknown key pressed" events in dmesg. But if I use setkeycodes to
make them known the keyboard gets 'stuck'. These keys seem to not send
keyrelease events.
Attached is a patch for the SAMSUNG P560 laptop, the DMI match just
needs to be modified to work for the R560 model as well. keycodes are
afaik (a colleague has the R560) the same for both. I modified an
existing patch for the NC10 from bugzilla as it is basically the same
problem.
Thread:
http://bugzilla.kernel.org/show_bug.cgi?id=12021
and here is my bug report:
https://bugs.launchpad.net/ubuntu/+source/hal-info/+bug/338182
I hope someone can include this patch into newer releases of the kernel :)
with best regards,
Gordon Köfner
[-- Attachment #2: atkbd-samsung-p560.patch --]
[-- Type: text/x-patch, Size: 1162 bytes --]
--- linux-2.6.28-old/drivers/input/keyboard/atkbd.c 2008-12-13 23:52:26.000000000 +0000
+++ linux-2.6.28/drivers/input/keyboard/atkbd.c 2008-12-14 18:16:23.000000000 +0000
@@ -884,6 +884,21 @@ static void atkbd_inventec_keymap_fixup(
}
/*
+ * Samsung P560 with Fn+F? key release not working
+ */
+static void atkbd_samsung_keymap_fixup(struct atkbd *atkbd)
+{
+ const unsigned int forced_release_keys[] = {
+ 0x82, 0x83, 0x84, 0x86, 0x88, 0x89, 0xb1, 0xb3, 0xf7
+ };
+ int i;
+ if (atkbd->set == 2)
+ for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+ __set_bit(forced_release_keys[i],
+ atkbd->force_release_mask);
+}
+
+/*
* atkbd_set_keycode_table() initializes keyboard's keycode table
* according to the selected scancode set
*/
@@ -1493,6 +1508,15 @@ static struct dmi_system_id atkbd_dmi_qu
.callback = atkbd_setup_fixup,
.driver_data = atkbd_inventec_keymap_fixup,
},
+ {
+ .ident = "Samsung P560",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "P560"),
+ },
+ .callback = atkbd_setup_fixup,
+ .driver_data = atkbd_samsung_keymap_fixup,
+ },
{ }
};
next reply other threads:[~2009-06-15 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 9:07 Gordon [this message]
2009-09-04 17:58 ` Gordon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9a518b600906150207l1be4c0e4w6e2ec2ece6b89181@mail.gmail.com \
--to=gkoefner@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®