From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: matrix_keyboard based driver
Date: Mon, 21 Nov 2011 09:27:15 -0800 [thread overview]
Message-ID: <20111121172715.GA2362@core.coreip.homeip.net> (raw)
In-Reply-To: <CAH9NwWd+40pC=UQFZnQcXoYp7J_Ui=cfcGh0WLaXV6niOjfF4g@mail.gmail.com>
Hi CHristian,
On Mon, Nov 21, 2011 at 02:52:17PM +0100, Christian Gmeiner wrote:
> Hi all,
>
> today I started with a basic matrix_keyboard based keypad driver. It
> seems to work quite
> well but I have some questions.
>
> Is it possible to define following values from user space?
>
> * debounce time in [ms]
No as it is mostly hardware property, not user preference.
> * auto repeat time in [ms]
Yes: EVIOCSREP (kbdrate or similar). Note that X ignores kernel
autorepeat and implements its own.
> * multi click abort time in [ms]
I have no idea what that is, so apparently no ;)
>
> I am also not sure about the default keymap I should use in the
> platform_data. At
> the moment it looks like:
>
> static const uint32_t ot200_keymap[] = {
> KEY(0, 1, 0x01),
> KEY(0, 2, 0x02),
> KEY(0, 3, 0x03),
> KEY(0, 4, 0x04),
> KEY(0, 5, 0x05),
> KEY(0, 6, 0x06),
> KEY(0, 7, 0x07),
> KEY(0, 8, 0x08),
> KEY(0, 9, 0x09),
> ...
> ...
> KEY(9, 6, 0x96),
> KEY(9, 7, 0x97),
> KEY(9, 8, 0x98),
> KEY(9, 9, 0x99),
The last items in triplets should be KEY_* constant defined in
include/linux/input.h
> };
>
> I need to configure the mapping from userspace and it is be done via loadkeys
> if I am not wrong.
To adjust mapping of the input device itself one should use 'setkeycode'
or some other utility issuing EVIOCGKEYCODE/EVIOCSKEYCODE ioctls.
loadkeys adjusts higher level keymap used by the console.
> Does the input core handle cases like SHIFT key and
> CAPS lock?
No, that is the task for higher layers (console, X, etc...).
Thanks.
--
Dmitry
next prev parent reply other threads:[~2011-11-21 17:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 13:52 matrix_keyboard based driver Christian Gmeiner
2011-11-21 17:27 ` Dmitry Torokhov [this message]
2011-11-22 12:52 ` Christian Gmeiner
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=20111121172715.GA2362@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=christian.gmeiner@gmail.com \
--cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).