Lenient dead keys

Simos Xenitellis simos.lists at googlemail.com
Mon Jan 2 08:46:22 PST 2012


On Mon, Jan 2, 2012 at 2:32 PM, Andre Majorel <aym-11x at teaser.fr> wrote:

> On 2012-01-02 13:09 +0200, Simos Xenitellis wrote:
> > On Mon, Jan 2, 2012 at 10:57 AM, Andre Majorel <aym-11x at teaser.fr>
> wrote:
> >
> > > Is there is a way to have a dead key output itself and the next
> > > key if there is no valid combination ?
> > >
> > > E.G. with [^] mapped to dead_circumflex, have [^][a] output "â"
> > > but [^][b] output "^b" instead of nothing.
> > >
> > >
> > I think this would require to change the source code and recompile.
> > You would either do this at the Xorg level (recompile Xorg) or the GTK+
> > level (assuming you use the GNOME desktop environment, which replicates
> the
> > Xorg functionality; recompile gtk+).
> > For GNOME, you would need to make changes around
> > http://git.gnome.org/browse/gtk+/tree/gtk/gtkimcontextsimple.c#n711
>
> Thank you. No KnomeCE or QTK here, just FVWM and a bunch of
> Xterms.
>
> > There might be an easier workaround if you can give a description of what
> > you are trying to achieve.
> > For example, if you want to write a language that has a ^ over b, then
> you
> > can use combining diacritics
> > and write b?? (b + 0x302).
>
> LC_CTYPE=en_US (ISO 8859-1).
>        Driver          "evdev"
>        Option          "XkbModel"      "pc105"
>        Option          "XkbLayout"     "fr"
>
> I type mainly code and French or English prose. The fr keyboard
> layout comes with dead_circumflex, which is good because French
> uses â, ê, î, ô, û and their upper case counterparts. But it
> means one extra keystroke to go to column 1 in vi, negate a
> character class, anchor a regexp, etc.
>
> Since even in uxterm, [^][b] is a no-op, it's not clear what the
> advantage of requiring an extra keystroke is.
>
>
What I understand is that, even though you can have a dedicated physical
key that outputs ^,
you would like the ability to get dead_circumflex + [character] to print
'^[character]',
for those characters that do not take a precomposed circumflex.

In any case, since you use plain xterms, you can create compose sequences
that you add in your ~/.XCompose
that cover those combinations that dead_circumflex is not supposed to work
with.
For example, for 'b', you would add the line

<dead_circumflex> <b> : "^b"
<dead_circumflex> <B> : "^B"

These two rules say that when you press the keys before the ':', you get
the string after the ':' (the string in quotes).

Simos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20120102/7267ad83/attachment.html>


More information about the xorg mailing list