You are not logged in.

#1 2022-10-26 01:00:20

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 6,859

How to support Welsh in the console?

I'm not sure this is the right sub-forum, so my apologies if not. (I reread the sticky and I'm still not certain.)

I would like to support Welsh in TTYs (it works fine in terminal emulators). I've tried to figure this out before, but I've got a bit further this time. So I know I can use PrtSc as a compose key and the eurlatgr font gets me accented characters. showconsolefont includes the characters I need, once I've switched to eurlatgr, but I don't know how to actually input them. I assume I need to specify a mapping, but I can't figure out which, if any, of the available mappings might do the trick. I tried guessing and read several files, but didn't find a solution.

Obviously, there's no mapping for Welsh per se, so I'm presumably looking for something more generic. Some accented characters are relatively common in European languages, but I specifically need all capital and lowercase vowels, including w and y, with circumflexes (ŴŵŶŷ). I can get other vowels to work with circumflexes in the console, but not these.

Right now I just have

KEYMAP=us

in /etc/vconsole.conf.

If possible, I'd prefer not to change things on TTY1 because that seems the cautious approach, so, ideally, I'd like to affect VTs 2 through 6, say. (X is on VT7.)

localectl

 
   System Locale: LANG=cy_GB.UTF-8
                  LANGUAGE=cy_GB:cy:en_GB:en
                  LC_COLLATE=C
       VC Keymap: us
      X11 Layout: us
       X11 Model: pc105+inet
     X11 Variant: euro
     X11 Options: terminate:ctrl_alt_bksp+eurosign:5+compose:caps+shift:both_capslock_cancel

I think I need to change VC Keymap, but how can I find out what to change it to? Or if there is no suitable keymap? And am I right that that's the missing bit?

Before anybody asks, Welsh has seven vowels: a, e, i, o, u, w, y. It uses some other accents, but the circumflex is the only one ever used on w and y which is, of course, where the trouble starts.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2022-10-26 06:48:00

seth
Member
Registered: 2012-09-03
Posts: 33,685

Re: How to support Welsh in the console?

You need (well, "want", I guess) a suitable keymap w/ deadkeys, specifically dead_circumflex - but it primarily needs to match your physical keyboard.
The flawed us-altgr-intl.map in https://bbs.archlinux.org/viewtopic.php?id=271983 has those, you'll have to see whether it fits your physical layout (probably us-qwerty) and mend it according to https://bbs.archlinux.org/viewtopic.php … 9#p2012639

nb. that loading the keymap (loadkeys or vconsole.conf) will affect all TTYs, you'd have to hook into the VT switch and "loadkeys" the relevant map.
X11 isn't gonna be affected by any of this, but manipulating the keymap can break the ctrl+alt+Fx switch, so don't experiment at a moment when you're not comfortable presseing the HW power button for a reboot and DO NOT EDIT vconsole.conf before you interactively checked the behavior.

(sleep 5m; loadkeys us) &

might be a good idea to automatically kick you back into a proper keymap

Offline

#3 2022-10-30 01:41:30

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 6,859

Re: How to support Welsh in the console?

When you said to add lines for at least ctrl-c and ctrl-d, why those in particular? Do I need to add them for all the other letters, too? Is there anything special about c and d or do I need to add all ctrl+<letter> combinations I use in bash/vim etc.?

I'm a bit surprised this is so awkward to do. I realise Welsh is unusual, but there must be plenty of people trying to type other languages on US keyboards.

EDIT: I tried this with the added lines for ctrl-c and d. I messed up the sleep 5 && loadkeys us because it timed out before I loaded the experimental map. However, I could still switch VTs etc. It changed the behaviour e.g. the compose key no longer worked, but AltGr+6 followed by a got â. However, AltGr+6 followed by y produced only ^y. I'm not sure that keymap does any more to define the characters I need than the original one? Or am I just inputting it wrong?

EDIT 2:

zgrep ycircumflex /usr/share/kbd/keymaps/i386/include/*

produces nothing (whereas looking for acircumflex does) and there's nothing to change that in the experimental keymap, right?

zgrep ycircumflex /usr/share/kbd/keymaps/*/*/*

produces no results either.

And the combinations for compose aren't defined, as far as I can tell in any of the lists in /usr/share/kbd/keymaps/include/compose.latin*, but I admit I'm confused about what is defined where and how it is supposed to fit together.

Last edited by cfr (2022-10-30 03:00:30)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#4 2022-10-30 07:03:30

seth
Member
Registered: 2012-09-03
Posts: 33,685

Re: How to support Welsh in the console?

ctrl+c is prominently SIGINT, ctrl+d EOF, then there're ctrl+s & ctrl+q for flow control and ctrl+z to background a process.
If you want this functionality, you'll have to define it, because the present non-trivial definitions don't automatically do so.

8859-14_to_uni.trans:0xfe	U+0177	# LATIN SMALL LETTER Y WITH CIRCUMFLEX

shows up in /usr/share/kbd/consoletrans/8859-14_to_uni and lookythere: https://en.wikipedia.org/wiki/ISO/IEC_8859-14

Language(s)    Irish, Manx, Scottish Gaelic, Welsh, Cornish, Breton, English

Below

…
include "linux-with-alt-and-altgr"
include "compose.latin1"
strings as usual

try to add

compose as usual for "iso-8859-14"

no idea whether that will interfere w/ include "compose.latin1" (I'm basically learning that right now myself ;-)

Offline

Board footer

Powered by FluxBB