What would a keyboard optimized for Luxembourgish look like? Now with a real keyboard! | R bloggers

What would a keyboard optimized for Luxembourgish look like? Now with a real keyboard! | R bloggers

9 minutes, 9 seconds Read

An optimized layout for a multilingual country

5 years ago I discussed what features a keyboard optimized for Luxembourg should have. I’m talking about Luxembourg, the country, and not Luxembourgish, the language, because in Luxembourg no one types only Luxembourgish. The most common language is probably French, with English coming in second. German comes in third, followed by Luxembourgish (some people might argue that German, in their own experience, is more broadly characterized than French, but I highly doubt this). Whatever the actual ranking, an optimized keyboard for Luxembourg should be one in which typing these 4 languages ​​is comfortable. That blog post from 5 years ago went into more detail about this (letter frequency and so on), but until today I left it on the back burner.

Now in LLMs it was trivial to keep working on this, implement an effort model and use an optimization algorithm to minimize the effort. Today I can present the layout I obtained:


(there is an error in the layout shown here, there are two “G”s; the one to the right of E should not be there, and should instead be a “,”. This is an error in the function that creates the heatmap, not in the layout itself.)

⚠️ This is a work in progress! The layout, the name, and even the methodology are all open to debate. I’m sharing this early because I’d like to hear from the community, especially those who type in multiple languages ​​every day. Your feedback will shape the final version.

Let me also clarify what my goal is with this: do I actually want to propose a layout that will be adopted nationally and become a standard? Well, maybe. But I’m certainly not going to do it alone. So if you’re interested, we can work together and write a layout that can actually be used by different operating systems and pitch it to decision makers.

France shows the way

In 2019, France officially adopted two new keyboard standards:

  1. A revised AZERTY which solves many problems while maintaining familiarity
  2. BEPO — a completely redesigned layout, optimized for French

I’ve been using BÉPO for years and I can honestly say it’s a game changer. Typing feels more natural, there are fewer finger movements and the learning curve, while steep at first, pays off considerably.

But the thing is: BÉPO was designed for French first and foremost. Luxembourg is unique because we need something that works for French And German And Luxembourgish And English.

The QWERTZ-LUX approach

So I started wondering: what would an optimized keyboard layout for Luxembourg look like? You can read about my findings herebut really, any optimized layout for any of these four languages ​​would actually work quite well; this is because 3 of these 4 languages ​​are Germanic languages, but also that the top 10 most used characters for these 4 languages ​​are essentially the same.

So I had three options:

  1. Just suggest that we also adopt BÉPO
  2. Create a fully optimized layout using these 4 languages ​​to set up the optimization problem
  3. Keep QWERTZ as a basis for familiarity and move only a minimal number of characters to improve comfort.

I chose a middle path, inspired by that of Carpalx partial optimization philosophy. Martin Krzywinski has shown that you don’t need to remap the entire keyboard to reap the most benefits. Only 5 strategic key changes can be achieved 70% of the effort reduction of a fully optimized layout, while the learning curve remains manageable.

QWERTZ-LUX (final name pending) follows this principle. It is essentially a spin-off of BÉPO’s structure, but with changes that:

  • Preserve familiar elements for QWERTZ users (Ctrl+Z, Ctrl+X, Ctrl+C, Ctrl+V keyboard shortcuts)
  • Optimize the letter format for our multilingual corpus
  • Provide direct access to accented characters (é, à, ü, ö, ç, ä) without dead keys

The home row had to change substantially, because the QWERTZ home row is simply too inefficient. But I tried to minimize disruption elsewhere, based on the partial optimization insight that the first few key changes matter most. Setting up the optimization problem with these constraints resulted in a keyboard layout that remains familiar, but at the same time is much more efficient.

The Corpus: what typifies Luxembourg?

To fairly assess keyboard layouts, we need text that represents what people actually type in Luxembourg. I created a balanced multilingual corpus with:

  • 30% French — Administrative and business language
  • 30% English — International communications
  • 20% German — Media and education
  • 20% Luxembourgish — Daily life and national identity

Again, your mileage may vary. When I first started working in Luxembourg, I only used English and French. Now I also use Luxembourgish more often, and I know people who only write French. Anyway, a national keyboard layout should be comfortable for all these languages.

What actually matters are the top letters in all languages E, N, S, T, R, I, Athe letters you want on your home row.

The effort model explained

Before we compare layouts, let’s first understand how we measure “typing effort.” I wrote an R package called lbkeyboard that implements a model inspired by Carpalxthe groundbreaking keyboard layout optimization tool created by Martin Krzywinski.

Carpalx vs lb keyboard

Unit of analysisTriads (3-key sequences)Bigrams + individual keys
Basic effortFinger travel distancePosition based (row + column)
SanctionsHand, row, finger chargesSame finger, same hand, row change
Battle pathComplex path finesSimplified via bigram weights
Layer supportNot built-inShift, AltGr, lethal penalties

Carpalx uses triads and an advanced stroke path model. I simplify this to bigrams (two-key sequences) for faster calculations while retaining key ergonomic insights.

Our model components

1. Basic effort (weight: 3.0)

Each key has an inherent effort based on position. The keys on the home row (where the fingers rest) have the least effort; reaching to the top row or to the bottom row costs more. The strength of the fingers is also important: index fingers are stronger than little fingers.

Example: Typing “e” on QWERTZ (top row, middle finger reach) costs more than typing “j” (home row, index finger) – even though we use “e” 100x more often!

2. Bigram punishment with the same finger (weight: 3.0)

Using the same finger twice in a row is slow and uncomfortable. The model penalizes these sequences heavily.

Example: Typing “the” on QWERTZ uses the same finger (middle finger, D → E). This will be punished. On BÉPO these letters are on different hands, so no penalty.

3. Self-punishment (weight: 0.5)

Consecutive keys on the same hand are a little more difficult than alternating hands, because one hand has to do all the work.

4. Row change penalty (weight: 0.5)

Jumping between rows (e.g. top → bottom) requires more movement of the fingers than staying on the same row.

5. Low penalties

Characters that require modifier keys (Shift, AltGr, dead keys) require extra effort: – Shift: +5% effort – AltGr: +20% effort – Dead key (e.g. 6 + o = pho): +40% effort (TWO HEY STROKES!)

Bringing it together

The formula for total effort is:

Total = Σ (base × frequency) + Σ (same_finger_penalty) + Σ (same_hand_penalty)
        + Σ (row_change_penalty) + Σ (layer_penalties)

Numerical example: Consider typing “the” (one of the most common English trigrams):

QWERTZT(top), H(home), E(top)No2Moderate
BEPOT(home), H(bottom), E(home)No1Low

BÉPO places two letters on the home row and two characters are typed with the index finger (T and E), so typing is very comfortable.

A concrete example: the Pangram

Let’s calculate the actual effort scores for “the quick brown fox jumps over the lazy dog” (a pangram using every letter of the alphabet):

# Load layouts
data("ch_qwertz")
data("afnor_bepo")
qwertz_lux <- create_qwertz_lux_keyboard()

# Effort weights (same as used throughout)
effort_weights <- list(
  base = 3.0,
  same_finger = 3.0,
  same_hand = 0.5,
  row_change = 0.5,
  trigram = 0.3
)

pangram <- "the quick brown fox jumps over the lazy dog"

# Calculate effort for each layout
pangram_qwertz <- calculate_layout_effort(ch_qwertz, pangram, 
                                          keys_to_evaluate = letters,
                                          effort_weights = effort_weights)
pangram_bepo <- calculate_layout_effort(afnor_bepo, pangram,
                                        keys_to_evaluate = letters,
                                        effort_weights = effort_weights)
pangram_lux <- calculate_layout_effort(qwertz_lux$base, pangram,
                                       keys_to_evaluate = letters,
                                       effort_weights = effort_weights)

data.frame(
  Layout = c("QWERTZ", "BÉPO", "QWERTZ-LUX"),
  Effort = round(c(pangram_qwertz, pangram_bepo, pangram_lux), 2),
  `vs QWERTZ` = paste0(round((1 - c(pangram_qwertz, pangram_bepo, pangram_lux) / 
                               pangram_qwertz) * 100, 1), "%"),
  check.names = FALSE
)
#>       Layout Effort vs QWERTZ
#> 1     QWERTZ 338.69        0%
#> 2       BÉPO 268.79     20.6%
#> 3 QWERTZ-LUX 303.08     10.5%

Even for this short 35-letter sentence, the optimized layouts require measurably less effort.

How much better is it?

Using this effort model (with the weights shown above), you can see how the layouts compare:

LayoutEffort scoreHand balance (L/R%)Relative (%)Enhancement vs. QWERTZ
BEPO 633624.943.6/56.4100.042.1%
QWERTZ LUX 642547.952.1/47.9101.441.3%
QWERTZ (Swiss)1094468.259/41172.70%

Visualizing the difference: heat maps

Heat maps show where your fingers spend time. Brighter colors = more keystrokes. Ideally, you want the brightness to be concentrated on the home row.




Notice how BÉPO and QWERTZ-LUX concentrate activity on the home row, while QWERTZ distributes effort across all rows.

Main features

Optimized home rowHigh frequency letters (E, T, N, R, I, S) at your fingertips
Direct accentsé, à, ü, ö, ç, ä accessible without dead key combinations
ZXCV preservedFrequently used keyboard shortcuts (Ctrl+Z/X/C/V) remain in familiar positions
BÉPO compatibleThe same modification layer philosophy as BÉPO

What’s next?

That’s why I’d like to know what others think. Is this something you would like to explore further? The next step would be to write one layout.ini file for Portable keyboard layout for Windows, and write layout files for Linux and macOS, and let real people test it in real settings. We can see if it feels good and what else can be optimized.

But is there any chance that such a layout will ever be adopted? After all, there are obstacles:

  • People just don’t care and will never switch
  • Even if people care, Luxembourg is too small a market and keyboards will never come with a Luxembourg specific layout

In my opinion, rolling out such a keyboard would require a phased and gradual approach:

  • Let children learn to type at school with the optimized layout
  • Distribute keyboard layout stickers, which are cheap

After a few years the transition would be complete, so I think it is feasible, but only if there is a community around this layout. And who knows, this layout could technically be adopted in Switzerland and other German-speaking countries (perhaps as a variant without direct access to French-accented letters).

About the name

The current working name “QWERTZ-LUX” is descriptive but not definitive. The first letters of the layout are QWFOGthat doesn’t exactly roll off the tongue like ‘QWERTY’ or ‘BÉPO’. Here are some alternatives I am considering:

QWERTZ LUXCurrent name; descriptive (QWERTZ variant for Luxembourg)
LETZAbbreviation for Luxembourgish (Luxembourgish); catchy and culturally meaningful
LUXURYLuxembourg optimized
TRIGLOTReflects the trilingual focus (French, German, Luxembourgish)

What do you think? I am sincerely open to suggestions: a good name helps with adoption!

Oh, and Happy New Year I guess.


#keyboard #optimized #Luxembourgish #real #keyboard #bloggers

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *