Discussion:
What is the recommended way to setup the compose key ?
(too old to reply)
Francis Moreau
2017-11-28 08:35:51 UTC
Permalink
Raw Message
Hello,

I'm trying to figure out how I can configure a compose key for the consoles.

I looked at man localectl and vconsole.conf but haven't found an answer.

Could anybody give me some hints ?

Thanks.
--
Francis
Mantas Mikulėnas
2017-11-28 08:46:43 UTC
Permalink
Raw Message
On Tue, Nov 28, 2017 at 10:35 AM, Francis Moreau <***@gmail.com>
wrote:

> Hello,
>
> I'm trying to figure out how I can configure a compose key for the
> consoles.
>
> I looked at man localectl and vconsole.conf but haven't found an answer.
>

You'd need to edit the actual keyboard layout in /usr/share/kbd/keymaps.
See i386/include/compose.inc and i386/qwerty/{cz,lv}.map.gz for examples.

--
Mantas Mikulėnas <***@gmail.com>
Francis Moreau
2017-11-28 08:54:34 UTC
Permalink
Raw Message
On Tue, Nov 28, 2017 at 9:46 AM, Mantas Mikulėnas <***@gmail.com> wrote:
> On Tue, Nov 28, 2017 at 10:35 AM, Francis Moreau <***@gmail.com>
> wrote:
>>
>> Hello,
>>
>> I'm trying to figure out how I can configure a compose key for the
>> consoles.
>>
>> I looked at man localectl and vconsole.conf but haven't found an answer.
>
>
> You'd need to edit the actual keyboard layout in /usr/share/kbd/keymaps. See
> i386/include/compose.inc and i386/qwerty/{cz,lv}.map.gz for examples.

Do you mean I need to edit my preferred map in /usr/share to include
compose.inc ?

If so I don't think I'm supposed to change any files in /usr/share/kbd...

Wouldn't it be simpler to add the compose key in vconsole.conf so it's
loaded automatically ?

--
Francis
Mantas Mikulėnas
2017-11-28 08:57:15 UTC
Permalink
Raw Message
On Tue, Nov 28, 2017 at 10:54 AM, Francis Moreau <***@gmail.com>
wrote:

> On Tue, Nov 28, 2017 at 9:46 AM, Mantas Mikulėnas <***@gmail.com>
> wrote:
> > On Tue, Nov 28, 2017 at 10:35 AM, Francis Moreau <***@gmail.com
> >
> > wrote:
> >>
> >> Hello,
> >>
> >> I'm trying to figure out how I can configure a compose key for the
> >> consoles.
> >>
> >> I looked at man localectl and vconsole.conf but haven't found an answer.
> >
> >
> > You'd need to edit the actual keyboard layout in /usr/share/kbd/keymaps.
> See
> > i386/include/compose.inc and i386/qwerty/{cz,lv}.map.gz for examples.
>
> Do you mean I need to edit my preferred map in /usr/share to include
> compose.inc ?
>

You will need more than that – grep the other examples for 'compose'.


> If so I don't think I'm supposed to change any files in /usr/share/kbd...
>

Probably not, but that's the only location keymaps are loaded from (whether
you use systemd or regular loadkeys).


> Wouldn't it be simpler to add the compose key in vconsole.conf so it's
> loaded automatically ?
>

And where would it get the actual compose definitions from? They have to be
defined in the keymap itself.

--
Mantas Mikulėnas <***@gmail.com>
Francis Moreau
2017-11-28 09:22:43 UTC
Permalink
Raw Message
On Tue, Nov 28, 2017 at 9:57 AM, Mantas Mikulėnas <***@gmail.com> wrote:

>
> And where would it get the actual compose definitions from? They have to be
> defined in the keymap itself.
>

on my distro (opensuse Tumbleweed) compose tables and the definition
of the compose key can be found here:

$ ls /usr/share/kbd/keymaps/legacy/include/
compose.8859_7 compose.latin compose.latin1.cedilla
compose.latin4 compose.winkeys
compose.8859_8 compose.latin1 compose.latin2
compose.shiftctrl disable.capslock
compose.ctrlperiod compose.latin1.add compose.latin3
compose.utf8 vim-compose.latin1

So one can configure the compose key by running "loadkeys
compose.shiftctrl" for example and the same can be done to pick up a
compose table.

It doesn't seem a bad idea to extend /etc/vconsole.conf so it's done
automatically at boot.
--
Francis
Loading...