[Y-devel] keyboard layouts (continued)
Alexey Boyko smartly at gala.net
Sun Feb 29 10:22:58 GMT 2004
> > I have thinks what to do with Shift key, because it affects generated
> > characters, but describing behavior in keymap file makes it too
> > complicated. And I have decide, that keycodes, which reaches key tree
> > must be already shifted. For example, keymap module must distinguish key
> > 'a' from key 'A', and generate different characters.
>
> I disagree with you on this. If you have a modifier key and you press it
> first and then delete it,
What means "delete modifier key"? release modifier key?
> you will be in the same state as before you
> pressed it. What the modifier key does is temporarily switch between two
> trees. This of course means that multiple trees must have similar shapes,
> but I don't think that is a problem. We can make verifiers that can check
> a new keymap for consistency.
How to describe two trees in keymap file?
Modifier key itself do not change current tree position. Only keysyms.
For example: we want to describe character cyrillic_io (E with two dots
above). Most of russian do not use this variant of typing, because key with
this character exist on keyboard. But this method was used on old keyboards
without cyrrilic letters.
Let enter cyrillic_io by key sequence e: (e,semicolon)
Pressed keys are:
press e, release e, press shift, press semicolon, release semicolon, release
shift. Describing tree leaf with shift keys make it more complicated. And if
we press shift more then once before "semicolon" we resets tree position. And
what about Caps Lock?
Else we have simple mapping:
"e" "semicolon" -> cyrillic_io;
"E" "semicolon" -> cyrillic_Io; (capital char)
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.
> I agree with Bryce that limiting modifiers to the standard ones may not
> be a good idea, but I also noticed that Macs apparently define certain keys
Keyboard driver determine, which key will be modifier.
> as modifiers in hardware, meaning that you don't get events for them.
>
> https://www.geocrawler.com/mail/msg.php3?msg_id=1396785&list=140
Keyboard driver will preprocess keyboard events to sequence of keysym events.
> This is no problem for the 'multiple trees that you switch between' idea,
Explain, how to switch trees with modifier keys?
> but it does prohibit the use of modifier keys as normal character
> generating keys.
Yes. If Mac keyboard hardware processes modifier key itself we can not do
anything. But we can process shotcuts anyway.
> 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.
> Could you explain as well why you would like to make a distinction between
> key press/release events and typed character events?
As I described above. key press/release events always the same. Their number
is equals to number of keys on keyboard and not depended how many characters
in current language.
> qwerty and dvorak are not necessarily different keyboards. The differences
> are in the location of keys with certain scan codes, for example some
> keyboards have the key with scan code 0x2b above the enter, others have it
> to the left of it.
> (https://www.bhashaindia.com/knowledge/view%20lists/scancode.aspx)
So, with applied mapping, key on which printed letter 'A' will always generate
virtual key code 'A', independent where is key located, and what scan code it
have.
> > Character map module must have access to widget data, where it stores
> > input context.
>
> Input context? Do you mean the character map module should be able to
> retrieve what it produced?
No, input context contains current position in the tree for this widget.
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved