No subject


Sat Feb 13 07:31:19 PST 2010


no compose sequences with modifiers are defined.  As non-modifiers only
trigger on key press, and modifiers only on key release, no additional
syntax is required in the Compose file to distinguish the two cases.

For example,

<Control_L>    : ssharp
<Shift_R> <o>  : odiaeresis

would allow to enter an =C3=9F with the left control key, and an =C3=B6 by a
sequence of right shift key and o.

Why is this useful?  The number of keys in convenient reach for touch
typing is limited.  The proposal would allow to make double use of
modifier keys, some of which have a fairly good position on the keyboard
(in particular, the Control key to the left of A on Unix-style
keyboards).  So, the motivation is typing efficiency.

For demonstration, I attach a modified version of ximcp/imLcFlt.c which
seems to do the trick.  The code abuses storage for the Thai input
method; this might not be acceptable for production code, but avoids
changing data structure sizes, making the experiment simpler for me.

Regards,

Andreas


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=imLcFlt.c
Content-Transfer-Encoding: base64

LyogJFhvcmc6IGltTGNGbHQuYyx2IDEuMyAyMDAwLzA4LzE3IDE5OjQ1OjEzIGNwcWJsZCBFeHAg
JCAqLwovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqCgogICAgICAgICAgICAgIENvcHlyaWdodCAxOTkyIGJ5IEZ1amkgWGVy
b3ggQ28uLCBMdGQuCiAgICAgICAgICAgICAgQ29weXJpZ2h0IDE5OTIsIDE5OTQgYnkgRlVKSVRT
VSBMSU1JVEVECgpQZXJtaXNzaW9uIHRvIHVzZSwgY29weSwgbW9kaWZ5LCBkaXN0cmlidXRlLCBh
bmQgc2VsbCB0aGlzIHNvZnR3YXJlCmFuZCBpdHMgZG9jdW1lbnRhdGlvbiBmb3IgYW55IHB1cnBv
c2UgaXMgaGVyZWJ5IGdyYW50ZWQgd2l0aG91dCBmZWUsCnByb3ZpZGVkIHRoYXQgdGhlIGFib3Zl
IGNvcHlyaWdodCBub3RpY2UgYXBwZWFyIGluIGFsbCBjb3BpZXMgYW5kCnRoYXQgYm90aCB0aGF0
IGNvcHl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gMDsKCSAgICBldi0+eGtleS50eXBlID0gS2V5UHJlc3M7ICAvKiBuZWVkZWQg
Zm9yIEtleVJlbGVhc2UgKi8KCSAgICBldi0+eGtleS5zdGF0ZSA9IHN0YXRlOyAgICAvKiBuZWVk
ZWQgZm9yIEtleVJlbGVhc2UgKi8KCSAgICBYUHV0QmFja0V2ZW50KGQsIGV2KTsKCSAgICAvKiBp
bml0aWFsaXplIGludGVybmFsIHN0YXRlIGZvciBuZXh0IGtleSBzZXF1ZW5jZSAqLwoJICAgIGlj
LT5wcml2YXRlLmxvY2FsLmNvbnRleHQgPSAoKFhpbSlpYy0+Y29yZS5pbSktPnByaXZhdGUubG9j
YWwudG9wOwoJICAgIHJldHVybihUcnVlKTsKCX0KICAgIH0gZWxzZSB7IC8qIFVubWF0Y2hlZCAq
LwoJLyogQW4gdW5tYXRjaGVkIGtleSByZWxlYXNlIGRvZXMgbm90IGFib3J0IGEgY29tcG9zZSBz
ZXF1ZW5jZS4gKi8KCWlmKGljLT5wcml2YXRlLmxvY2FsLmNvbnRleHQgPT0gKChYaW0paWMtPmNv
cmUuaW0pLT5wcml2YXRlLmxvY2FsLnRvcCB8fAoJICAgZXYtPnR5cGUgPT0gS2V5UmVsZWFzZSkg
ewoJICAgIHJldHVybihGYWxzZSk7Cgl9CgkvKiBFcnJvciAoU2VxdWVuY2UgVW5tYXRjaCBvY2N1
cmVkKSAqLwoJLyogaW5pdGlhbGl6ZSBpbnRlcm5hbCBzdGF0ZSBmb3IgbmV4dCBrZXkgc2VxdWVu
Y2UgKi8KCWljLT5wcml2YXRlLmxvY2FsLmNvbnRleHQgPSAoKFhpbSlpYy0+Y29yZS5pbSktPnBy
aXZhdGUubG9jYWwudG9wOwoJcmV0dXJuKGV2LT50eXBlID09IEtleVByZXNzKTsKICAgIH0KfQo=
--=-=-=--


More information about the xorg-devel mailing list