public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Andries Brouwer <Andries.Brouwer@cwi.nl>
Cc: Jirka Bohac <jbohac@suse.cz>, lkml <linux-kernel@vger.kernel.org>,
	roman@augan.com, hch@nl.linux.org
Subject: Re: [rfc] keytables - the new keycode->keysym mapping
Date: Wed, 9 Feb 2005 17:03:45 +0100	[thread overview]
Message-ID: <20050209160345.GA16487@ucw.cz> (raw)
In-Reply-To: <20050209152740.GD12100@apps.cwi.nl>

On Wed, Feb 09, 2005 at 04:27:40PM +0100, Andries Brouwer wrote:

> > The keycodes are mapped into keysyms using so-called keymaps. A keymap is
> > an array (of 255 elements per default) of keysyms, and there is one such
> > keymap for each modifier combination. There are 9 modifiers (such as Alt,
> > Ctrl, ....), so one would need to allocate 2^9 = 512 such keymaps to make
> > use of all modifier combinations. However, there is a limit of 256 keymaps
> > to prevent them eating too much memory. In short, you need a whole keymap
> > to add a new modifier combination to a single key -- bad.
> > 
> > The problem is, that not all keyboard modifiers can actually be assigned a
> > keyboard map - CapsLock and NumLock simply aren't on the list.
> 
> The current keyboard code is far more powerful than you seem to think.
> 
> Keymaps are allocated dynamically, and only few people use more than 16.
> You can have 256 keymaps, but they are not necessarily the 2^8 maps
> belonging to all 2^8 combinations of simultaneously pressed modifier keys.
> 
> You can assign the "modifier" property to any key you like.
> You can assign the effect of each modifier key as you like.
> There are modifier keys with action while pressed, and modifier keys
> that act on the next non-modifier keystroke (say, for handicapped),
> and modifier keys that lock a state (say, to switch between Latin
> and Cyrillic keyboards).
> 
> It seems very unlikely that you cannot handle Czech with all
> combinations of 8 keys pressed, and need 9.

A czech keyboard has the letters 'escrzyaie' with accents on the number
row of keys. With a Shift, they are supposed to produce the original
numbers, but with a CapsLock, they're supposed to produce the uppercase.
With a right alt or one of three czech dead keys they should produce
the !@#$%^&*() symbols.

It's kind of logical, kind of stupid, but anyway it's the national standard.

You can't do that currently. The main problem is that CapsLock is
hardcoded to work as a Shift on keys and you can't make it work
differently for normal letter keys and for the upper row of keys.

> Please document carefully what you want to do and why you want
> to do it. I think most reasonable things are possible.
> 
> (The weakest part is the support for Unicode / UTF8 - don't know
> whether improvement would be good - it is clear that one doesnt
> want to have full Unicode support in the kernel, but there is
> continued pressure to add some support for diacriticals. We might.)

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  reply	other threads:[~2005-02-09 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050209132654.GB8343@dwarf.suse.cz>
2005-02-09 15:27 ` [rfc] keytables - the new keycode->keysym mapping Andries Brouwer
2005-02-09 16:03   ` Vojtech Pavlik [this message]
2005-02-09 16:38     ` Andries Brouwer
2005-02-09 16:55       ` Vojtech Pavlik
2005-02-09 19:05         ` Andries Brouwer
2005-02-09 17:19   ` Jirka Bohac
2005-02-09 20:03     ` Andries Brouwer
2005-02-10 12:53       ` Jirka Bohac
     [not found]         ` <20050216182035.GA7094@dwarf.suse.cz>
2005-02-16 21:49           ` Andries Brouwer
2005-02-17 15:19             ` Jirka Bohac

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=20050209160345.GA16487@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=hch@nl.linux.org \
    --cc=jbohac@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roman@augan.com \
    /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