summaryrefslogtreecommitdiff
path: root/rules
AgeCommit message (Collapse)AuthorFilesLines
2024-11-04Improve one-handed layouts descriptiontwo1-6/+6
Currently layouts designed to be used with only one hand have the English descriptions: “left handed” and “right handed”. This is ambiguous, as it highlights *handedness* rather than one-hand typing. Translations in some languages may thus convey only the former understanding, which is incorrect. Clarify that these layouts are for typing with only *one* hand. Closes #483 Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/737>
2024-10-04symbols/de: Add German (Noted) layoutBenjamin Drung1-0/+6
Add the newest layout of the German Neo keyboard layout family. Noted is a layout designed to make typing as comfortable and efficient as possible in both German and English. It was developed with the help of a layout optimizer, which is based on the metrics and concepts of ArneBab's optimizer and adapts and extends them. I switched from Neo 2 via Mine to Noted and I like to see this variant to be available out of the box in Debian/Ubuntu. Sources: * https://neo-layout.org/Layouts/noted/ * https://dariogoetz.github.io/noted-layout/
2024-09-21Update base.extras.xml, ruDenis Kaliberov1-0/+43
2024-09-05options: Added caps:returnPierre Le Marre1-0/+6
Added `caps:return` to make the `Caps Lock` key an additional `Return` key.
2024-08-27Fix NEC Japanese layout having two groupsPierre Le Marre3-3/+4
According to our doc and practices, symbols should be defined only for the first group. There are still a few layouts defining simultaneously two groups. One of them is `nec_vndr/jp`, which has also a dedicated rule. This commit fixes only this layout in preparation of a refactor for `inet` rules. - Split `nec_vndr/jp(pc98)` into two sections: `pc98` and `jp`, and make the latter the default section. - Fix the rules to ensure using this layout with the model `pc98` will load *explicitly* 2 layouts, as this is the case for other models. - Make the rules match `jp` layout, not `nec_vndr/jp`. No other rule used the vendor path to match a layout. The remaining layouts with 2 groups should also be fixed someday.
2024-08-26options: Added altwin:swap_ralt_rwinPierre Le Marre1-0/+6
This option swaps right `Alt` with right `Win`. Symbols are already there, so this commit just adds the corresponding rules via the registry. Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/731>
2024-08-23rules: Fix merging explicit and implicit merge modesPierre Le Marre1-3/+30
Since c4f76b584fe10bc2037966a70efad9bc5b682a4a we merge rule sets with and without explicit merge modes (i.e. *explicit* merge mode are section starting with either `+` or `|`). This is wrong, as these are not supposed to be matched at in the same rule set. Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/729>
2024-08-23rules: Fix duplicates created by the merge scriptPierre Le Marre1-4/+7
The previous update c4f76b584fe10bc2037966a70efad9bc5b682a4a removed the initialization of a dictionary in the `merge` function, leading to duplicates, namely the files *not* starting with a rule header. While we introduced `defaultdict` previously to avoid initializing lists manually, we still need to initialize the `dict` in order to keep it in sync with `section_names`. Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/729>
2024-08-23symbols/ru: Add Diktor extra layoutHloja Niželjska1-0/+10
Diktor is an ergonomic alternative to the JCUKEN layout (see: `ru(winkeys)`), adapting Dvorak design principles for Russian. Although it is popular, there is no track of the original author. The original implementation targeted Windows. The closest to an “official” web page is: https://olegp.name/software/diktor-keyboard-layout/.
2024-08-21rules: Fix layout compat rulesPierre Le Marre4-135/+195
Layout compatibility rules are broken in configurations with 2 or more layouts, e.g.: - Works: - config: `--layout fi --variant basic` - symbols: `pc+fi(classic)+inet(evdev)`. `fi(basic)` is correctly remapped to `fi(classic)`. - Does not work: - config `--layout fi,us --variant basic,` - symbols: `pc+fi(basic)+us:2+inet(evdev)`. `fi(basic)` is not remapped and leads to an include error. - Does not work: - config `--layout us,fi --variant ,basic` - symbols: `pc+us:fi(basic):2+fi(classic):2+inet(evdev)`. `fi(basic)` is not remapped and leads to an include error. I initially thought merging the following rules sets to fix it: 1. `model layout[n] = symbols` 2. `model layout[n] variant[n] = symbols` but it does not work: `*` wildcard does *not* match empty values. There is another issue: using a variant will check and match *both* rules sets. In the first rule set, compat rules are only for deleted symbols files (e.g. `dev`). But when the symbols file exists, we end up with an invalid include statement (see `fi(basic)` examples above). This is because the first rules set has a catch-all rule that will always match, while we want it to match only in the second rules set. Unfortunately such rules cannot be expressed in rules files. So the solution is to append generated compatibility sections in the corresponding symbols files and remove the corresponding current rules. Section name clashes are checked and will raise an error. E.g.: currently we append the following to `symbols/de`: partial xkb_symbols "lld" { include "it(lldde)" }; If we already had a section named lld, this would produce the following error: Cannot add compatibility section in symbols/de: "lld" already exists Also: - Move symbols handling in meson into the symbols subfolder. - Sort compat layout rules. - We ensure that rules with variant take priority over rules without one. Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/728>
2024-08-19rules: Improve merge scriptPierre Le Marre1-26/+45
- Merge section with same header, independently of the whitespaces. - Improve Python (typing) Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/728>
2024-08-19Add option to define F13-F24twistedturtle1-0/+12
2024-07-30Add option `caps:ctrl_shifted_capslock`Han-Miru Kim1-0/+6
Make `Caps Lock` an additional `Ctrl` and `Shift + Caps Lock` the regular `Caps Lock`. Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/673>
2024-07-30Add option lv3:caps_switch_capslock_with_ctrlHelfried Wiesinger1-0/+6
Use Caps Lock key as additional 3rd lever chooser, Ctrl + Caps Lock for original Caps Lock behaviour. The 2023 DIN standard for German keyboards recommends it as an option: - https://de.wikipedia.org/wiki/E1_(Tastaturbelegung)#Feststelltaste/Umschaltsperre - https://en.wikipedia.org/wiki/Caps_Lock#Abolition Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/687>
2024-07-19rules: Fix compat mappingsPierre Le Marre2-14/+24
Previously the compatibility rules where incorrect: - Lines with a comment starting by “//” where parsed incorrectly, because comments where in fact not supported. - `variantsMapping.lst` was added to rules without variant. This resulted in incorrect rules with MLVO = (model, layout), e.g. the beautiful following rules: ``` ! model layout = symbols * mao(nz(mao)) = pc+//(Delete) * ben(basic) = pc+in(ben) ``` Fixed the issue and ensure to raise an error if expectation on layout variant is broken.
2024-06-21Add caps:digits_row_independent_lock optionAlexandre Petit6-65/+76
`Shift + Caps` locks the digits on the digits row, `Caps Lock` alone behaves as usual (Azerty layouts). The `Shift + Caps Lock` combination inverts the first two levels only. Originally designed for layouts with digits on the second level of the digits row (e.g. Azerty layouts). This allows users to have direct access to digits while keeping usual capitalization via `Caps Lock`. Also add the `FOUR_LEVEL_LOCKABLE_LEVEL2` key type, a variant of `FOUR_LEVEL_MIXED_KEYPAD` that uses `LevelFive` instead of `NumLock`, to avoid interaction with the keypad. Originally created to lock the digits on layouts with digits on the second level of the digits row (e.g. Azerty layouts).
2024-06-13Require Python >=3.9 + optional strenum fallbackPierre Le Marre2-6/+17
Fallback with package `strenum` is required for Python < 3.11. Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/702>
2024-06-11rules: Check required Python versionPierre Le Marre1-0/+9
2024-06-10geometry: Revert dropping abnt2, jp106, kr106Pierre Le Marre2-1/+22
This partially reverts commits: - 91da938a16b4dc29df62fa3794d2d046daa2edbe - f67ca9fbb974c57cdef9d2c9f422d618e1c4de4c
2024-05-30Added Ergo‑L layout and variantNuclear Squid1-0/+12
Ergo‑L is an ergonomic keyboard layout meant to optimize the typing experience in French, English, and programming. Accents, diacritics and fancy typographic symbols are typed using a custom dead key, but it is fully implemented in the keymap itself as an `ISO_Level5_Latch.` Below is a more detailed presentation of the layout (in French): https://ergol.org/presentation/ This commit adds Ergo‑L `fr(ergol)`, along with an angle-mod variant `fr(ergol_iso)` made for ISO keyboards.
2024-05-30rules: minor improvement to generation scriptPierre Le Marre1-14/+16
2024-05-29Rules: fix generation script by not hard-coding rules exceptionsWismill2-115/+91
2024-05-29Add option scrolllock:mod3Peter Hutterer1-0/+6
This maps Scroll_Lock to Mod3, effectively enabling this virtual modifier.
2024-05-24rules: use symlinks to resolve mismatches between option names and filesPeter Hutterer1-2/+10
Use in-repository-only symlinks between symbols files that help us to resolve option mismatches, e.g. where we need to map caps:foo to capslock(foo). This effectively reverts symbols: symlink the special rules prefixes to our symbols files
2024-05-24rules: generate the option->{symbols,compat,types} mappings from our XML filesPeter Hutterer6-222/+323
The vast majority of options are a straightforward foo:bar = +foo(bar) mapping. Instead of maintaining those mappings by hand let's generate the rules file from the files we definitely maintain by hand: the base.xml (and base.extras.xml) files. This also makes it clearer which ones are exceptions and need to be filled in through other means (or ignored because the option does not affect any symbols). The resulting rules file is identical to the previous hand-generated one but it is alphabetically sorted and uses different whitespacing. For merge.py to work we need to also fix the whitespaces in rules/compat/0041-option_symbols.part, otherwise the duplicate header detection won't work.
2024-05-24rules: rename the .part files to be more explicitPeter Hutterer35-31/+31
This makes it immediately readable what maps to what over e.g. ml4_s.part.
2024-05-24compat: add some files to remove special casing in the rulesPeter Hutterer1-6/+6
2024-05-24symbols: add grab and srvrkeys with a single sectionPeter Hutterer1-2/+2
This avoids having to special-case grab:debug and srvrkeys:none in the rules files.
2024-05-24symbols: make a few sections independent of custom rulesPeter Hutterer1-3/+3
These used to have a special entry in the rules file - it's easier if we just make a section for them and have the rules-file entry map 1:1. For ctrl:grouptoggle_capscontrol see commit 6bba53fd
2024-04-19Added Old Hungarian layouts for users in SKKovács halomházi Viktor1-0/+14
On branch ohu_sk Changes to be committed: modified: rules/base.extras.xml modified: symbols/hu
2024-03-18Correcting "la" to "kab"ButterflyOfFire1-0/+1
2024-02-20Purge the old macs from our rulesPeter Hutterer8-41/+0
See the previous commits, none of these machines need the latest xkeyboard-config.
2024-02-20Purge the macbook 78/79 from our rulesPeter Hutterer3-16/+0
Best I can tell these are macbooks released from 2006 to 2012 or something. Doesn't matter too much anyway since the only effect of these rules was a different geometry file. Since geometry is not supported at all in libxkbcommon we won't lose much by dropping these special cases.
2024-02-20Purge the Intel Classmate from our rulesPeter Hutterer3-11/+0
Released in 2008 we expect few of these devices still exist and those that do probably don't need the latest xkeyboard-config release.
2024-02-20Purge a few old Nokia devices from our rules filesPeter Hutterer9-18/+0
The Nokia RX-51 (N900) came out in 2009. 15 years later we can purge this rule, the number of devices that still exist and need latest xkeyboard-config is too small to worry about. The Nokia RX-44 (N810) an SU-8W were released 2007.
2024-02-19Add caps:digits_row option for Azerty layoutsPierre Le Marre6-0/+11
The Azerty keyboards used in France and Belgium have the digits on the shift level instead of on the base level of the top row. In Windows the corresponding layouts have the curious characteristic that CapsLock locks also the digits, meaning that some users have acquired the habit of engaging CapsLock when they need to type some digits. Fix this by adding a new option `caps:digits_row` that applies only to the `$azerty` layouts group (currently `fr` and `be`). This option changes the key type of the digits keys to `FOUR_LEVEL_SEMIALPHABETIC`. There are two drawbacks with this solution: - It is not possible to type the uppercase À, È, É and Ç. Without the option, one gets those by the internal transformation rules, done either by the X server or xkbcommon. - It changes the behavior of the US variants from `fr`. But we do not expect anyone to use at the same time e.g. `fr` and `fr(us-alt)` with the new option `caps:number_row`. Instead we expect e.g. either one uses `fr(us-alt)` alone or `fr,us`. In the former case the option is not needed, while in the later case the option works correctly.
2024-02-15rules: add a few existing bindings to the base.xml filesPeter Hutterer1-0/+42
We have the rules in place for this, let's expose those. Fixes #445
2024-02-15rules: remove {lshift|rshift}_both_capslock{_cancel}Peter Hutterer1-6/+0
These were added as rules entries in ac8fa2656 but no-one noticed for 13 years that they had no corresponding base.xml entry. Let's remove them because they look suspiciously like "added because we can" rather than "added because there's a need for it". Google cannot find a single reference to it that isn't this repo or a mirror of it. Fixes #445
2024-02-15rules: remove lv5:lsgt_switch_lock_cancel and friendsPeter Hutterer2-42/+0
These have been commented out for over 12 years because they're apparently broken, see 569dd72bd4b and https://bugs.freedesktop.org/show_bug.cgi?id=41621 Let's remove those, we can reinstate those if there are users that can make these rules work. Fixes #445
2024-02-15Improve description of caps:ctrl_modifierLuis Javier Merino Morán1-1/+1
The purpose of this option is to have Caps Lock behave as a Control modifier, but still be able to distinguish it from the Control_L and Control_R keys in things like games and emulators. People tend to get confused when in some programs Caps Lock with this option doesn't behave exactly like Control. ctrl:nocaps is probably the option they really want. Fixes #443
2024-02-14Add option `eurosign:E`Pierre Le Marre2-1/+8
2024-01-07rules: fix iso639 codes after removalsPeter Hutterer1-2/+3
https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3_Retirements.tab ais Nataoran Amis S Split by part going to Amis [ami] and creating Sakizaya [szy] with the remaining part 2019-01-25 uun Kulon-Pazeh S Split into Kulon [uon] and Pazeh [pzh] 2022-01-20 See also the pycountry commit https://github.com/pycountry/pycountry/commit/a2341a11df5b5fddb26519e9b9cbe1befdee74a9 Fixes #430
2023-12-26basic "Old Hungarian" layout deprecatedKovács halomházi Viktor1-7/+0
On branch master Your branch is up to date with 'origin/master'. Changes to be committed: modified: rules/base.extras.xml modified: symbols/hu
2023-12-20CI: drop black, use ruff-format insteadPeter Hutterer1-3/+15
black is getting increasingly more difficult to use in the CI across distribution versions (thanks to Python's messy packaging) so let's replace it with ruff format which produces largely the same results.
2023-11-20meson: use builtin install_symlinkwael1-4/+10
use the builtin `install_symlink` target provided by meson instead of providing on external `ln` and `sh`.
2023-10-28delete the Greek `extended` variant, as it does not extend `basic` at allBenno Schulenberg2-6/+1
Until commit 9350c7347a from two years ago, the `extended` variant contained *fewer* symbols than the `basic` variant, and did not contain any symbols that `basic` did not have. The extra symbols that it did have over the `simple` variant were all present in the same locations in the `basic` variant. So at that point the `extended` variant was fully redundant. The mentioned commit 9350c7347a did not "perfect" the `extended` layout but merely added some symbols in ill-considered places. Such adjustments are stuff for the `custom` layout instead. This addresses and closes issue #412. Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-10-22symbols/it: delete the mistaken `intl` layoutBenno Schulenberg1-16/+0
The layout is not international at all, and cannot be used to type just German or French or Slovak either. It looks more like a first draft of the `scn` layout. The original contributor, David Paleino, agrees with its removal. This addresses and closes issue #406. Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-08-30symbols/my: harmonize the specification of the Zawgyi encodingBenno Schulenberg1-7/+4
Zawgyi [1] is a font for the Burmese language where the characters are encoded in a way that is incompatible with Unicode, so "Zawgyi" is not part of the name of the language. Also, the addition "Tai" for a specific version of the font is unneeded. [1] https://en.wikipedia.org/wiki/Zawgyi_font Furthermore, drop the `eng` marker for two layouts as no English can be typed with them. Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-08-27Change identifier for the SI-1452-2 layout variantShai Berger1-1/+1
In some circumstances the identifier of the variant is presented, rather than the name. The identifier "two" is not descriptive enough. Thanks @benno for suggesting the name "si2".
2023-08-25rules/base.xml: normalize the indentation of some fifty deviant linesBenno Schulenberg1-56/+56