All of lore.kernel.org
 help / color / mirror / Atom feed
From: finkler <finkler@officinamentis.org>
To: linux-kernel@vger.kernel.org
Subject: Questions about the console keyboard driver / translation tables
Date: Sun, 11 Mar 2012 00:14:11 +0100	[thread overview]
Message-ID: <jjgn8b$evc$1@dough.gmane.org> (raw)

Hi there,

I am trying to understand the logic of the Linux keyboard driver, I am 
not sure if this is the right place to ask, but I don't know where else 
I could.

Btw. I am talking about an unicode console here.

1.) The Linux kernel (currently) can take 256 translation tables 
(keymaps), I figured that if I have 8 Mod-Keys and I can press two at 
the same time, then this makes 256 possible modifications.
E.g. the value of my keycode of the button 'a' is 0x0b61 (small letter 
a) in table 0 and 0x0b41 (capital letter A) in table 1, so is it true 
that table 1 is for shift pressed keycodes?
If so, then why is shift (KG_SHIFT in linux/keyboard.h [1]) set to 0, 
and how do I compute the modifications, meaning how do I know what e.g. 
index 231 represents?

2.) As seen above, the value for 'a' is actually 0x0b61 instead of 
0x0061, if b indicates a type (here KT_LOCK) why isn't it 0xfb61, 
because I thought that only values above 0xf000 represent typed values, 
and the values below are simply unicode values.
The values above are read via the KDGKBENT ioctl [2], are these values 
read differently then written?
E.g. would I only type 0xfb61 when using the KDSKBENT ioctl?

3.) If I wanted to assign "Return" to a keycode, what is the difference 
between using a simple 0x000d (13) and the KT_SPEC type with the 
function fn_enter (which is supposedly 0xf201)?

I hope anyone can help me out a little,
thank you very much in advance,
regards,
Finkler

1: http://tomoyo.sourceforge.jp/cgi-bin...nux/keyboard.h
2: http://www.kernel.org/doc/man-pages/...e_ioctl.4.html


                 reply	other threads:[~2012-03-10 23:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='jjgn8b$evc$1@dough.gmane.org' \
    --to=finkler@officinamentis.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.