[Y-devel] keyboard layouts (continued)

Alexey Boyko smartly at gala.net
Sun Feb 29 13:20:49 GMT 2004


> > Now I meets with one tip, which I forgot first time. If after "e" we
> > press another key (not semicolon) we must enter cyrillic e (without
> > dots), and then process new key.
>
> Right.

I have tryed GTK2 input method "cyrrilic transliterated" (right click on GTK 
entry widget), So, when I pressed a key, which can typed through and is a 
part of key sequence (next key may modify this char) then this char is 
underscored until I press another key. If key will be processed in input 
driver, then I dont know how to give such hints. Chars can appears in pairs.

Sorry, if my bad english does not describe this effect well.

> > Keyboard driver determine, which key will be modifier.
> If you mean the X keyboard driver, then yes. And since we're not using X we
> can and will be in control of what modifiers do (as far as hardware
> allows).

No, I means Y keyboard driver.

> > >   https://www.geocrawler.com/mail/msg.php3?msg_id=1396785&list=140
> > Keyboard driver will preprocess keyboard events to sequence of keysym
> > events.
> I'm not sure what you mean, 

As I read at your link, Mac keyboard generate event only when key with 
modifier was pressed, passing key and modifier flags into driver. Then, if 
such event was catched, keyboard driver can itself generate modifier 
pressing/releasing key events.

For example if Meta+Q catched by driver it sends event Meta press, Q press, Q 
release Meta release.

> traversing the tree. Where it does bother us is with the implementation of
> things like sticky keys (as mentioned by Bryce I think).

About sticky keys I do not thinks yet. May be keyboard driver can do it.

> > > What I do not understand is why you would want to split things up into
> > > a shortcut module and a (shift module+)character map module. In my view
> > > the shortcut module, which is concerned with what I call Actions, was
> > > just a layer of abstraction on top of the character map module.
> >
> > Then it will depends on character map, which is selected current. I think
> > shortcuts module (or Actions module) must accept virtual key codes from
> > input driver.
>
> I am not so sure about this. I have seen that in some cases you would like
> to have the shortcut move when you change the map (ctrl-q when you change
> from qwerty to azerty) and in others, you would like to keep them on the
> same physical key (ctrl-c/ctrl-v when you switch to a map without c and v).

Hm. I think, it not possible cleanly. If we will remap qwerty/other in 
keyboard driver then all shortcuts will be moved with keys, or all shortcuts 
will stay in their places. Or it behavior left on application.

> Therefore I think it would be better to allow multiple shortcuts for the
> same action and make only one active (depending on which keymap you're
> using). I realise that this means there has to be communication between the
> layer handling actions and the layer handling keymaps, but I don't see a
> better solution at the moment.

My idea is, that shortcut Ctrl+A always means that we press Ctrl then press 
key on which printed letter 'A'. Keyboard driver convert scan codes to 
virtual keys accordingly letters on keys. if in qwerty keyboard key 'Q' 
generate 'Q' virual key, then on azerty keyboard it will generate 'A' virtual 
key. So shortcuts always moved with keys.

If you have another view on key processing, describe it. (better by diagrams)

> No, not independent of where it is located. The scan codes are translated
> into virtual key codes that indicate the position on the keyboard. If you
> look at the part of the keyboard where all letters are, at the left in the
> middle there is an 'a' on a us keyboard. The virtual key code for this key
> would tell you that it is the 'left-most key on the middle row within the
> block of letters', it would not tell you that it's an 'a'. This is the
> lowest kind of mapping that we have.
>
> In all keyboards I have used, that particular key generates a scan code of
> 0x1e and the keycap showed an 'a'. But if someone were to make a keyboard
> where the key in that position generated scan code 0x62 and had a '3' on
> its keycap and 'a' was located somewhere else on the keyboard and the key
> that generated scan code 0x1e was on yet another position on the keyboard,
> the 'left-most key on the middle row within the block of letters' would
> still generate the same virtual key code as the 'a' key on my normal
> keyboard.

May be there are difference on our views.

> > No, input context contains current position in the tree for this widget.
> So would you have a state per widget? Would you also have a keymap per
> widget? I agree that you may want to keep the state within a window even if
> it loses focus for a while, but per widget seems overkill.

I think no significal difference.

btw. What keyboard you are using? I'm using qwerty keyboard with cyrillic 
letter printed under latin letters by red color.

I like when shortcuts binded to latin letters, because they independed of 
language I types text.





More information about the Y-devel mailing list









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