[Y-devel] comment: keyboard
Alberto González alyen at usuarios.retecal.es
Wed Feb 25 18:56:15 GMT 2004
Rupert Mazzucco wrote:
> To put it bluntly (to save space, not to insult anyone):
>
> I think that the current design (if I understand it correctly)
> is too simplistic and likely to repeat the mess of X keyboard
> configuration. Direct mapping of keycodes to keysyms is only
> the low level solution, only a more high level interface should
> be exposed to applications. To explain, I'll give some example
> of what I consider typical usage that should really be supported
> without need for hacks:
>
> - Chinese characters/kanji: Clearly support for those beast will
> be necessary if this is going to be an international success. But
> how do those people enter kanji? I don't claim to be an expert, but
> I had the opportunity to see japanese colleagues at work. They would
> have a keyboard mapped to some phonetic alphabet (can't remember if
> kana or roman, but it doesn't matter). The would hit some special
> key combination that told the system that the were now going to enter
> a kanji. Then they would type the phonetic chars corresponding to
> the pronounciation of said kanji. The system would pop up a small
> window presenting the possibilities (there are usually several), from
> which he would then choose by additional keystrokes or mouseclicks.
>
> Clearly, this process, that inserted finally one unicode character at
> the cursor position, is far too complex to get by with a simple "keycode
> to keysym" mapping, even if those maps could be changed on the fly. On
> the other hand, this *is* just basic input, which should clearly be
> a core functionality of the server. What is needed is the possibility
> to attach a function to a keycode, which may eat more keycodes and do
> some graphic output, before it finaly returns a keysym. This should
> happen *in* the input module, totally transparent for the application.
>
> - More than one alphabet: With the arrival of unicode the number of
> available alphabets has grown enormously. Picture a linguist who
> routinely switches between various ancient scripts. Or a mathematician
> who needs symbols for his equations. Shift and Alt_Gr only get you so
> far, and Alt_Gr+Shift is already a pain in the ass to use. Consequently,
> X left the problem of entering "exotic" characters completely in the
> application domain: In Mathematica, you fumble around with ESC+char+ESC,
> in Latex you need special commands etc.
>
> The convenient solution here would be to change the keymap on the fly;
> some standard keytroke would cycle through several "virtual keymaps"
> loaded into the server. That would work well, because often there is an
> approximate correspondance between the glyphs printed on the keys and the
> glyphs of some other phonetic alphabet (eg a - alpha - aleph, s - sigma -
> sum - integral). I think that is in principle already supported by the Y
> design. But it would be much nicer if such a change of keymap would come
> with some "visual feedback", eg a big semi-transparent layout of the
> current keymap flashing for three seconds every time you change it.
> Without such a visual aid, users will get lost between the different
> keymaps and that will drive them nuts.
>
> - MacOS X gives visual feedback for pressing some keys like the volume
> control keys and the CD eject key. I always thought that this was a nifty
> feature. I don't think that normal PC hardware produces feedback-able
> events for volume control and the CD eject button, but other uses could
> be found.
>
> - "Virtual keyboard": I think I saw such a thing in Windows XP.
> Basically it displays a keyboard on-screen and lets you choose by
> mouse click the character you want to enter. I don't have practical
> use for that, but maybe this is useful for people with disabilities.
> Got to keep their needs in mind as well, it's the 21st century after all.
>
> I hope those examples illustrate what I mean by "high level interface".
> Several keystrokes and some graphical output/mouse interaction should
> be able to produce only *one* keysym which is handed to the application.
> This would allow consistent, application-independent handling of all of
> unicode, allow nifty tricks and provide a basis for a disability-friendly
> user interface.
>
> Regards,
> Rupert
>
>
>
>
I agree with you on the keyboard module system. I think that as Y's
modules are hot-swappable it shouldn't be too difficult to have
different modules for keyboard input. One for roman keyboards, with a
simple keymapping system, with hot-swappable mappings too, and other
modules for special keyboards such as japanese, chinese, etc, which
could have special functions.
I also think that there has to be some sort of a common set of keyboard
shortcuts (Ctrl+P, Ctrl+X, Ctrl+V, ALT+F4 etc), along with custom ones
defined by the clients. At first I thought they could be made
theme-dependent, but i think that can interfere with application defined
ones, ie. the theme could use Ctrl+G to paste and a drawing program
might have defined it for grouping.
Regards,
Alberto
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved