[Y-devel] Key mappings

Mark Thomas mark at www.y-windows.org
Thu Feb 26 19:53:43 GMT 2004


Rupert Mazzucco wrote:

> Your Meta+Ctrl+Shift groups may work for you, but just imagine
> you invite a guest over and have to explain how he can find his
> characters.  And I'm not talking about a fellow geek who is all
> excited by the occasion to learn some key combinations he will
> never again need in his life.

How about: hold down Control+Alt+Meta+Shift+Vendor+Hyper+Super and type 
"I can eat glass, it does not hurt me" in the language of your choice to 
switch to it.

Maybe not.

Having read the rest of this thread, I think the best way is as follows:

- RAW keyboard interface, where events are triggered by the loaded input
   module (or anything else, such as an on-screen keyboard).

- Multiple loaded keymaps, where only one keymap is active at any one
   time.  The keymaps monitor the RAW interface and generate CHAR events
   if a match is made.

- The keymaps can be changed by the windowmanager, so it should
   intercept keymap change shortcuts and change the keymap appropriately.
   It can associate particular keymaps with certain windows or widgets,
   or it can just have one global keymap.

- IMEs are extensions keymaps.  There will need to be extra hooks for
   certain widgets, so I think we should leave IMEs for the moment.

In fact, I see no reason why Y can't ship with ALL keymaps and IMEs 
available, with the user selecting which one they use most often for the 
default, and customising kb shortcuts to switch to or amongst their 
favourite keymaps.  This means I should be able to walk up to a Y 
installation in Russia, press Ctrl+Alt+K, say, pick Japanese from the 
drop down menu that appears, and start typing in Japanese (though the 
keycaps will probably be slightly wrong).

The RAW events would probably look like:

    RawKeyDown (enum YKeyCode k);
    RawKeyUp (enum YKeyCode k);

The CHAR events would probably look like:
    TypedInput (int nchars, wchar_t *string);

[yes, that's a string, some keypresses may generate a series of unicode 
codepoints, and this would also handle some form of IME input]

Thoughts?

Regards,

   Mark.

-- 
|| Mark Thomas
|| www.y-windows.org
||
||



More information about the Y-devel mailing list









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