clr-installer icon indicating copy to clipboard operation
clr-installer copied to clipboard

Improve handling of keymaps

Open Jacalz opened this issue 5 years ago • 9 comments

The current system for keymaps isn’t all that good and just shows the names of the files that carry the keymap. This is bad for the users as it can be confusing and especially in Swedish where half of the keymaps are named se and the other ones have sv. All keymaps for a given language could also be separated in to folders for that language. It would also be great to chnage the keymap for the live environment when we set it in the installer. Solus does all these things in their installer except for grouping per language.

Improvements in short:

  • Having user readable and easily understandable names (see picture below).
  • Grouping all keymaps for a given language in to their own folders.
  • Change the keymaps for the live session when we set them in installer.

swedish-languages

Jacalz avatar Jun 01 '19 15:06 Jacalz

@Jacalz Currently the installer gets the list of possible keyboard layouts from localectl list-keymaps. It looks like our keyboard definitions are coming from: https://github.com/legionus/kbd/releases which hasn't had a new release in a while.

I do see three Swedish keyboards listed:

localectl list-keymaps | grep -i sv
dvorak-sv-a1
dvorak-sv-a5
sv-latin1 

Were you expecting to see other options?

If the keymaps provided reasonable metadata we could use that to display with the keyboard map names, but this does not seem to be the case.

mdhorn avatar Jun 05 '19 23:06 mdhorn

Well, I didn’t see those when I checked in the installer, but I don’t think those are correct. The amount about Dvorak users in Sweden are close to none and I don’t know about that Latin one. I’m not sure if that’s the right one, but I’d it is I haven’t come across any other distros that call it sv-Latin. It’s usually called Sv-Se or as in the Solus installer they have a category named Swedish with all Swedish layout options.

Jacalz avatar Jun 06 '19 06:06 Jacalz

Will check the Latin file if it indeed is the right one and see if I can get you an image of the Solus installer on how they do things 🙂

Jacalz avatar Jun 06 '19 06:06 Jacalz

I checked online and the sv-Latin1 layout might be the right one, but it sure is a weird name and it can make some users uncertain. There are also a lot of files missing compared to Solus, but also note the better naming of the files: swedish-languages

This looks a lot better and it a lot easier for the users. I think it would be good if you could add missing languages and structure them so all Swedish layouts for example are under a folder named Swedish and so on for other language-keymaps. I also noticed that the Solus installer changed layout for the live session when you changed it in the installer, might be a good thing too.

From looking at the files for the Solus installer it looks like they get their files from xkb, gnome or something along those lines. Have a look at this link: https://github.com/getsolus/os-installer/blob/master/os_installer2/pages/keyboard.py

Jacalz avatar Jun 06 '19 07:06 Jacalz

After some closer inspection, it looks like you do have all the key maps but they have the names of the files and not the user forward names we se in Solus. If you search for sv you will find the ones you named but searching for se gives us all the other keymaps for the Solus picture.

So ultimately what we want to see is:

  • Having more user readable names like the picture above
  • Maybe grouping all key maps for a given language in to specific folders
  • Setting keymaps for the live entertainment when we change in the installer

Jacalz avatar Jun 06 '19 07:06 Jacalz

@Jacalz I'll keep this open as an enhancement request. We might be able the metadata from xbd or gnome for the graphical installer, but not for the text-based version.

Currently, we have a number of priority bugs to fix and then some key functionality to add, so this won't happen right away. See https://github.com/clearlinux/clr-installer/projects

But we are open source, and will always attempt prioritizing reviewing pull request submissions for open enhancements or bugs.

mdhorn avatar Jun 07 '19 19:06 mdhorn

Sounds wonderful. I was mostly referring to the GUI installer but it might be a good idea to incorporate some stuff in to the TUI too.

Jacalz avatar Jun 07 '19 19:06 Jacalz

I see parseable xbd metadata at /usr/share/X11/xkb/rules/base.xml

jwakre avatar Oct 15 '19 21:10 jwakre

Related to #276

mdhorn avatar Mar 10 '20 21:03 mdhorn