Bug 26705

Summary: Allow modifier key releases to be used is XIM compose sequences
Product: xorg Reporter: Andreas Wettstein <wettstae>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: enhancement    
Priority: low CC: cloos, jeremyhu
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:
Attachments:
Description Flags
changes in modules/im/ximcp none

Description Andreas Wettstein 2010-02-22 11:39:16 UTC
Created attachment 33497 [details] [review]
changes in modules/im/ximcp

I would like to use modifiers keys (such as Control_L or Shift_R) as
dead keys in compose sequences.

Currently, only non-modifiers can be part of a compose sequence, and
they are matched against the defined compose sequences at the time the
key is pressed.  I want to extend this to modifier keys, but in contrast
to non-modifiers, they should be matched to the defined compose
sequences when the key is released, and only when no other key has been
pressed since the modifier had been pressed.

When a compose sequence is ongoing, but a non-matched non-modifier key
is pressed, the compose sequence is aborted.  In contrast, for backward
compatibility, releasing a non-matched modifier during an ongoing
compose sequence should have no effect, rather than aborting the compose
sequence.

From the user's point of view, compose would work as before, as long as
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 ß with the left control key, and an ö 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.

I attach a patch that achieves what I want.  The code in
ximcp/imLcFlt.c abuses storage for the Thai input method; this might
not be acceptable for production code, but avoids changing data
structure sizes.  The change in ximcp/imLcIc.c is necessary for GTK (I
believe that it is alse necessary to make the Braille code that
already existed in ximcp/imLcFlt.c work).
Comment 1 Jeremy Huddleston Sequoia 2011-10-08 19:50:46 UTC
Can you please send your patch to xorg-devel for review?
Comment 2 Andreas Wettstein 2011-10-19 12:29:58 UTC
The patch no longer works, as the original source changed, and I am too lazy to update it, just to see it continue rotting in patchwork. Therefore, I withdraw my request and close this ticket.
Comment 3 Jeremy Huddleston Sequoia 2011-10-19 16:30:48 UTC
Reopening.

Andreas, I don't see this in patchwork.  Are you sure you ever sent it?  Can you point me to the link?  It doesn't seem like it would be terribly difficult to update the src changes.

If it is "rotting" in patchwork, a ping to the list is always helpful.
Comment 4 Andreas Wettstein 2011-10-20 12:24:56 UTC
Sorry for being unclear. This particular patch is not in patchwork, I am just skeptical that sending a patch to xorg-develop makes sense, as the next stage, patchwork, like bugzilla seems to suffer from a huge backlog. Maybe I am too pessimistic.

You are right that it is not difficult to update the patch. I will brush it up the next rainy weekend.
Comment 5 Alan Coopersmith 2011-10-20 13:51:52 UTC
(In reply to comment #4)
> Sorry for being unclear. This particular patch is not in patchwork, I am just
> skeptical that sending a patch to xorg-develop makes sense, as the next stage,
> patchwork, like bugzilla seems to suffer from a huge backlog. Maybe I am too
> pessimistic.

patchwork is a horrible gauge of the patch backlog, as we never got the hooks
set up to mark patches there as integrated once it gets pushed to git, nor any
one to sit down and match them up and close them out manually.

xorg-devel does have some backlog, but it's the most commonly processed of any
patch submission method, and the best way to get a change into X.Org repos.
Comment 6 Jeremy Huddleston Sequoia 2011-10-20 14:38:24 UTC
Yeah, I think you are too pesimistic.  People watch xorg-devel.  People don't often watch bugzilla.

Currently, I don't know of any patches that are sitting on xorg-devel that haven't been reviewed, so I don't think there's much of a backlog.
Comment 7 Andreas Wettstein 2011-11-11 11:27:39 UTC
Sent an updated patch to xorg-devel, see http://patchwork.freedesktop.org/patch/7884/
Comment 8 James Cloos 2011-12-11 14:02:29 UTC
Pushed as commit d3b3570592e9b9e57f270a0bd86762fd205a2833.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.