Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openSUSE upstreaming, part 2 #112

Closed
wants to merge 17 commits into from

Conversation

stanislav-brabec
Copy link

Here is a second set of openSUSE upstreaming effort.

With exception of 22b6de6 already discussed in legionus#111, all commits represent additions that come from the suse-add.tar.bz2. The tarball was carefully reviewed. I dropped files that are equal to the upstream, files that are worse or older than the upstream and files that have a near upstream replacement. The rest is set of additions that could still make sense.

Feel free to cherry pick.

stanislav-brabec and others added 17 commits April 8, 2024 20:05
The keymap contains characters >=U+F000. Such keymap does not load. As
nobody noticed it for years, the keymap is apparently not used.

Explanation from Alexey Gladkov:
The kbd value is unsigned short [1] and take a look how kernel gets
a type [2]. The last bytes are occupied by type.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/kd.h?id=06dd3dfeea60e2a6457a6aedf97afc8e6d2ba497#n103
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/keyboard.h?id=06dd3dfeea60e2a6457a6aedf97afc8e6d2ba497#n45

Signed-off-by: Stanislav Brabec <[email protected]>
Convert mac keycodes in mac keymaps to make possible to use them as i386
keymaps.

Co-authored-by: Olaf Hering <[email protected]>
Signed-off-by: Stanislav Brabec <[email protected]>
Add a script that converts all mac keymaps to i386.

Signed-off-by: Stanislav Brabec <[email protected]>
When you use this font is should display both the Turkish characters
scedilla, idotless, gbreve and the line graphics (which is broken with the
current iso09.16 font).

Signed-off-by: Stanislav Brabec <[email protected]>
Add a serif font suse12x22.

Signed-off-by: Stanislav Brabec <[email protected]>
ru1-utf.map made from original ru1.map by replacing ASCI keycodes with
their utf8 means.

Co-authored-by: Alexey Vovenko <[email protected]>
Signed-off-by: Stanislav Brabec <[email protected]>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=337238
Add Czech/English querty keyboard. Changed by pause.

Co-authored-by: Jan Kasprzak <[email protected]>
Signed-off-by: Stanislav Brabec <[email protected]>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=61829
Add Canadian keyboard for French and English CAN/CSA Z243.200-92

Signed-off-by: Stanislav Brabec <[email protected]>
Link: https://web.archive.org/web/20070318011711/http://externe.net/clavier-normalise/
Following de-latin1.map.

Signed-off-by: Stanislav Brabec <[email protected]>
I attach official Lithuanian azerty keyboard layout (with utf-8 support).
Detailed specification could be found at http://ims.mii.lt/klav/lithkeyb4.html

This layout isn't default (and not most popular) in Lithuania.

Co-authored-by: Gediminas Paulauskas <[email protected]>
Signed-off-by: Stanislav Brabec <[email protected]>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=569554
Add compose table compose.utf8 that uses symbolic names and thus
works regardless of encoding. Most useful for UTF-8.

Signed-off-by: Stanislav Brabec <[email protected]>
Include the mapping of the compose key in the COMPOSEMAP
variable and offer winkeys and shiftctrl.

The compose key will be mapped on the W*n menu key

Signed-off-by: Stanislav Brabec <[email protected]>
Add compose.latin1.cedilla which is a variant which maps accented
c to cedilla.

Those are not really correct but commonly used :-(

Signed-off-by: Stanislav Brabec <[email protected]>
Map the compose key to Shift-Ctrl and Ctrl-Shift.

Co-authored-by: Andries Brouwer <[email protected]>
Signed-off-by: Stanislav Brabec <[email protected]>
On request of Andries put Compose it on Ctrl-.
Added compose.ctrlperiod to achieve this.

Co-authored-by: Andries Brouwer <[email protected]>
Signed-off-by: Stanislav Brabec <[email protected]>
Add disable Caps Lock feature.
Make Caps-Lock a normal left shift key.
Ctrl-Caps Lock is still functional.

Signed-off-by: Stanislav Brabec <[email protected]>
@legionus
Copy link
Owner

I feel uncomfortable when unrelated changes are lumped together in one PR. There's no need to do that.

For example I agree with commit:

commit: Drop broken keymap de_alt_UTF-8.map

But you added scripts to contrib:

commit: contrib: Add sed script to convert mac keymaps to i386
commit: contrib: Add supplementary shell script to convert-kbd-mac.sh

but I don’t see you adding the conversion result with this script. A separate question is whether this should be done at all.

All other commits have very poor descriptions. They describe what is being done and not why it is being done. For example:

commit: Add Czech qwerty map

Add Czech/English querty keyboard. Changed by pause.

Changed by pause ? WAT ? And the link https://bugzilla.opensuse.org/show_bug.cgi?id=61829 and the link does not help at all because it is Bug Access Denied.

So far, this is more like an attempt to move legacy hacks from the vendor rpm package to the upstream with minimal effort. Sorry, but I will not accept changes that I do not understand why they are being made.

@stanislav-brabec
Copy link
Author

I feel uncomfortable when unrelated changes are lumped together in one PR. There's no need to do that.

Me too. What is the optimal solution? More pull requests from different branches?

In the last set of patches, I deleted disapproved commits and did force push.

But you added scripts to contrib:

commit: contrib: Add sed script to convert mac keymaps to i386 commit: contrib: Add supplementary shell script to convert-kbd-mac.sh

but I don’t see you adding the conversion result with this script. A separate question is whether this should be done at all.

I am not adding the result of the script, as it changes all mac keymaps in place. The installation on a standard PC installs Mac keymaps, but as Mac hardware uses a different scancodes (at least on a legacy hardware that was used for these keymaps), these keymaps are not useful for PC. The script attempts to create a nearest match of Mac keymaps on a PC hardware.

I don't know which scancodes uses the recent Mac hardware, so I did not add the result of the conversion and kept the original mac files.

All other commits have very poor descriptions. They describe what is being done and not why it is being done. For example:

commit: Add Czech qwerty map

Add Czech/English querty keyboard. Changed by pause.

Changed by pause ? WAT ? And the link https://bugzilla.opensuse.org/show_bug.cgi?id=61829 and the link does not help at all because it is Bug Access Denied.
This is a dual layout keymap. Layouts are switched by the Pause key.

I overseen that the bug is not public. Here is the original comment:

We need new map (querty) for console where czech layout will be the default and
second will be english same as has cz-us-qwertz.map. Because current cz-lat2 has
first english and second czech which is inconsistent to czech querty map in X11.

The english and czech layout is changed by pressing 'pause' key in console.

I prepared new map by modifying cz-lat2.

The author: @bruclik

So far, this is more like an attempt to move legacy hacks from the vendor rpm package to the upstream with minimal effort. Sorry, but I will not accept changes that I do not understand why they are being made.

I spent several weeks to decompose and analyze all the divergences of the package over the last 25 years. I dropped most of them, and created patches only from files that still look useful. I hope that we will get a consensus about usefulness of the particular commits, and keep only those that really make sense.

@legionus
Copy link
Owner

legionus commented Jun 6, 2024

I feel uncomfortable when unrelated changes are lumped together in one PR. There's no need to do that.

Me too. What is the optimal solution? More pull requests from different branches?

Create separate PRs for each feature you offer. With a clear description of the proposed changes and clear commit messages. And please, no PRs with "looks useful" changes. If you don’t know exactly why it needs to be upstreamed, then it’s better to leave it in your package.

@legionus
Copy link
Owner

legionus commented Jun 6, 2024

But you added scripts to contrib:
commit: contrib: Add sed script to convert mac keymaps to i386 commit: contrib: Add supplementary shell script to convert-kbd-mac.sh
but I don’t see you adding the conversion result with this script. A separate question is whether this should be done at all.

I am not adding the result of the script, as it changes all mac keymaps in place. The installation on a standard PC installs Mac keymaps, but as Mac hardware uses a different scancodes (at least on a legacy hardware that was used for these keymaps), these keymaps are not useful for PC. The script attempts to create a nearest match of Mac keymaps on a PC hardware.

I don't know which scancodes uses the recent Mac hardware, so I did not add the result of the conversion and kept the original mac files.

Then let's keep these scripts in your rpm package. I don’t want to have contrib scripts that are unclear what they do and are used by whom.

@legionus
Copy link
Owner

legionus commented Jun 6, 2024

I overseen that the bug is not public. Here is the original comment:

We need new map (querty) for console where czech layout will be the default and second will be english same as has cz-us-qwertz.map. Because current cz-lat2 has first english and second czech which is inconsistent to czech querty map in X11.

Sorry, but the "not like X11" argument is a bad argument. Keymaps for the kernel and X11 are completely different keymaps and they have completely different restrictions. I don't think it's a good idea to add keymaps with all language combinations. The keymaps directory will turn into hell.

I know that debian converts the entire xkb database into kbd keymaps to comply with x11, but it keeps it for itself and does not try to upstream it.

If you want a similar solution, then I suggest testing the patch that adds xkb to kbd.

@legionus
Copy link
Owner

legionus commented Jun 7, 2024

I'm closing this big PR in favor of new PRs.

@legionus legionus closed this Jun 7, 2024
@stanislav-brabec
Copy link
Author

stanislav-brabec commented Jun 7, 2024

I overseen that the bug is not public. Here is the original comment:
We need new map (querty) for console where czech layout will be the default and second will be english same as has cz-us-qwertz.map. Because current cz-lat2 has first english and second czech which is inconsistent to czech querty map in X11.

Sorry, but the "not like X11" argument is a bad argument. Keymaps for the kernel and X11 are completely different keymaps and they have completely different restrictions. I don't think it's a good idea to add keymaps with all language combinations. The keymaps directory will turn into hell.

That is not "all language combinations". Some languages have a keymap that combines the national keyboard with another (mostly English one) with a switch hotkey. The national part cannot type latin characters or numbers, the English part fulfills the task.

Czech keymaps is a problematic area. Czech language has many accented letters. There is an official Czech keymap. But it is widely disliked by programmers, as it does not have a numeric row. It reserves upper row to accented characters. (And as the standard comes from the pre-computer era, it does not support even basic programmer characters.) That is why there are so many Czech keymaps:

  • Czech keymaps based on the official standard. Uncomfortable to type numbers. Special symbols are all accessible. Its layout (not covered by the standard) can follow Windows or Mac layout (or use a compromise layout designed by me 30 years ago).
  • Czech keymaps combining English and official Czech keymaps. English for programming, Czech for typing Czech texts. Comfortable to type both numbers and Czech texts, but non-standard and needs a switch hotkey. To make things worse, English uses qwerty, official Czech qwertz. As nobody wants to change meaning of z/y key by the hotkey, all those have two variants: qwertz and qwerty.
  • Czech keymaps mapping accented characters to AltGr combination of letters. Comfortable for programmers. Uncomfortable to type Czech texts. Does not need a switch hotkey. And non-standard.

I know that debian converts the entire xkb database into kbd keymaps to comply with x11, but it keeps it for itself and does not try to upstream it.

If you want a similar solution, then I suggest testing the patch that adds xkb to kbd.

SUSE does the same nowadays. We use a converter tool based on Fedora. However some languages use the upper mentioned multi-keymap layout in X11 (with a switch hotkey), and those keymaps cannot be converted yet. (For example Russian, Greek.) That is why we use the dedicated kbd keymaps for those languages.

@dmage
Copy link
Contributor

dmage commented Jun 9, 2024

@stanislav-brabec if that tool doesn't support multi-language keymaps, you should give @legionus's patch a try - https://github.com/legionus/kbd/tree/xkbcommon-v1. It adds --xkb-model, --xkb-layout, etc to loadkeys.

Regarding new keymaps, the project has accepted too many keymaps, making it impossible to maintain. It should be more restrictive. I believe it would be fair to say that new layouts should only use Unicode. Additionally, they should either reflect a physical keyboard (ideally, new keymaps should be submitted with a keyboard photo so we can later verify their correctness) or mimic another operating system (Windows, macOS). Custom keymaps that people created for their own convenience probably shouldn't belong to the project that is installed on every Linux machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants