[Y-devel] Key mappings

Rupert Mazzucco maz at ap.univie.ac.at
Fri Feb 27 21:55:53 GMT 2004


I'm afraid I was not very clear so far and I'm already tired.
But I'll try to comment once more before I go to bed.

On Fri, 27 Feb 2004, Maurice van der Pot wrote:

> In any case, the uniqueness I meant was that if a key press causes
> an event with this value (say 'alpha') that there can never be a
> situation where a key generates the same value but it actually means
> '$'.

This is clear for "normal" characters, but not for control
characters.  If mapping 1 maps physical a to logical a etc,
and mapping 2, for some obscure reason, maps physical a to
logical b and vice versa, and the app has some meaning attached
to logical ctrl+a, then you should obviously press physical
ctrl+a in map 1, and physical ctrl+b in map 2.

But this is not really obvious, despite my calling it so.  I
suspect that a normal user would expect physical ctrl+a to
work as logical ctrl+a also in map 2, although it's really
logical ctrl+b.

Thinking about it, maybe ctrl+key events should really have their
own keysym that is mapped to some combination of key*codes* and
wouldn't usually be remapped along with the normal alphanumeric
chars.  Powerusers that really wanted to could still do it.

Thinking about it some more, is that maybe what you suggested?

> if you have a key k1 that with latin keymap generates character X and
> is bound to the paste action, what would you want to happen if with
> the greek keymap k2 produced the same character X?
> Would you want the shortcut to be triggered by pressing k2 or k1?

I think my thoughts from above somehow apply to that also.

> > But obviously I wasn't thinking clearly, because this is nonsense.
> > There would still be written "a" on the key, and this is what counts.
> > There is, of course, the possibility of a pathological remapping that
> > moves the logical "a" to the physical "b" and vice versa.  Then
> > confusion would be complete.  Should probably be forbidden and enforced.
>
> So that means that if pressing 'q' is quit and I change my qwerty keymap
> to an azerty one, I suddenly have to press the key that produces an 'a'?

Hmm, no, what I said that such a change should be forbidden.  But
you are right, there are people who actually do that and find it
convenient.  Still I think it shouldn't be encouraged.

> > It seems to me now that the server needs to know, on the lowest level,
> > not only the available keycodes, but also what is actually printed on
> > the key that corresponds to a certain keycode (or, while we're at it,
> > make that a complete physical layout).  It would be quite annoying if,
> > after much keymap switching, an application for some control purpose
> > demanded pressing <some fancy unicode char> that the user can't actually
> > find on the board by looking at what's written on the keys!
>
> You will always need to be able to switch keymaps, so I can imagine you
> always have to use the same physical key to switch, but that is as far
> as I'm willing to go at the moment.

Actually it would be nice if a confused user could somehow shout "help"
and the server restored the keymap that corresponded to the actual layout
of the keyboard.

Regards,
Rupert




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved