AZERTY amélioré: computational design on a national scale Anna Feit, Mathieu Nancel, Maximilian John, Andreas Karrenbauer, Daryl Weir, Antti Oulasvirta

To cite this version:

Anna Feit, Mathieu Nancel, Maximilian John, Andreas Karrenbauer, Daryl Weir, et al.. AZERTY amélioré: computational design on a national scale. Communications of the ACM, Association for Computing Machinery, 2021, 64 (2), pp.48-58. ￿10.1145/3382035￿. ￿hal-03136124￿

HAL Id: hal-03136124 https://hal.inria.fr/hal-03136124 Submitted on 9 Feb 2021

HAL is a multi-disciplinary open access ’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés non, lished or not. The documents may come from émanant des établissements ’enseignement et de teaching and research institutions in or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. contributed articles

DOI:10.1145/3382035 A new French keyboard standard is the first designed with the help of computational methods.

BY ANNA MARIA FEIT, MATHIEU NANCEL, MAXIMILIAN JOHN, ANDREAS KARRENBAUER, DARYL WEIR, AND ANTTI OULASVIRTA AZERTY amélioré: Computational Design on a National Scale

IN 2015, FRANCE’ Ministry of Culture wrote to the are unsupported. Similar-looking char- 4 acters can be used in place of some French Parliament criticizing the lack of standards missing ones, as with “ for “, or ae for æ. for a . It pointed out that , Users often rely on software-driven au- the traditional layout, lacks special characters needed tocompletion or autocorrection for these. Also, they insert rarely used char- for “proper” French and that many variants exist. acters via Alt codes, from menus, or by The national organization for standardization, AFNOR, copy-pasting from elsewhere. The min- 5 istry was concerned that this hinders was tasked with producing a standard. We joined this proper use of the language. For exam- project in 2016 as experts in text entry and optimization. ple, some French people were taught, THE uses accents (for example, incorrectly, that accents for capital let- ters (for example, É, À) are optional, a é, à, î), ligatures (œ and æ), and specific apostrophes belief sometimes justified by reference and quotation marks (for example,’ « » “ ”). Some are to their absence from azerty. This article reports experiences and awkward to reach or even unavailable with azerty insights from a national-scale effort at (Figure 1), and many characters used in French dialects redesigning and standardizing the spe-

48 COMMUNICATIONS OF THE ACM | FEBRUARY 2021 | VOL. 64 | NO. 2 cial- layout of azerty with socio-technical endeavors. The goals the aid of combinatorial optimization. and decisions evolved considerably key insights Coming from computer science, our throughout the three-year project. ˽ France is the first country in the world starting point was the known formula- Many stakeholders were involved, with to adopt a keyboard standard informed tion of keyboard design as a classical various fields of expertise, and the by computational methods, improving 2 19,20 the performance, ergonomics, and optimization problem, although no public was consulted. A key take- intuitiveness of the keyboard while computationally designed keyboard away from this case is that algorithmic enabling input of many more characters.

thus far has been adopted as a nation- methods must operate in an interac- ˽ We describe a human-centric approach wide standard. The specific design task tive, iterative, and participatory man- developed jointly with stakeholders is shown in Figure 2. Going beyond ner, aiding in defining, exploring, de- to utilize computational methods in prior work, our goal was not only to en- ciding, and finalizing the design in a the decision process not only to solve a well-defined problem but also to sure high typing performance but also multi-stakeholder project. understand the design requirements, to consider ergonomics and learnabil- In this article, we discuss how inter- to inform subjective views, or to ity factors. active tools were used to find a jointly communicate the outcomes. However, the typical “one-shot” agreed definition of what makes a good ˽ To be more broadly useful, research view of optimization, in which a user keyboard layout: familiarity versus user must develop computational methods that can be used in a participatory and defines a problem and selects a solver, performance, expanded character sets inclusive fashion respecting the different

ILLUSTRATION BY MATT HERRING MATT BY ILLUSTRATION offers poor support for such complex versus discoverability, and support for needs and roles of stakeholders.

FEBRUARY 2021 | VOL. 64 | NO. 2 | COMMUNICATIONS OF THE ACM 49 contributed articles

everyday language versus programming sential not only to solve a well-stated algorithmic tools, revealing important or regional dialects. Interactive tools are design problem but also to understand opportunities for research to better also needed to elicit subjective prefer- it and to communicate and appreciate support participatory use. ences11 and to help stakeholders under- its final outcomes. They are needed to stand the consequences of their choices. elicit and inform subjective views, and Goals for Revising azerty Although only time will tell whether to resolve conflicts and support con- The AFNOR committee concerned the new layout is adopted, one can sensus by presenting the best compro- with the development of a standard for draw several lessons from this case. mises achievable. This yields a vastly the French keyboard was composed of Com­putational methods become - different picture of optimization and Ministry of Culture representatives

Figure 1. The old AZERTY layout. Try typing « À l’évidence, l’œnologie est plus qu’un ‘hobby’. » (“Evidently, wine-making is more than a ‘hobby’.”) Hint: the underlined characters are not present, such as nonbreaking spaces and curved apostrophes.

ERTI

D

Figure 2. The computational goal was to assign the special characters to the available keyslots such that the keyboard is easy to use and typing French is fast and ergonomic. The process saw the set of characters change frequently; in (a), the set in the final layout is shown (the last 24 characters displayed were not part of the optimization problem but added later).

@# à§é ´ è ` ê&()[]‘’_—«“‹»”›’ " ° ˆ¨æÆ£ €®{ ™ −-+ ±† √ ‡ ßß$ / | ∞ /\÷ * ½×<>≤≥ =©çÇ.?

¿,!¡:... · ; ˙˘ ,˝ ˚-¯ˇ· ˜ ˛¸ ¼≠− ÀÈÊ ¯ ‚ ÉZZ

(a) Example set of special characters (107). In red are marks; entered via dead keys; see pane d.

1234567890

TAB A ZERTYUIOP ENTER

CAPS QSDFGHJKLM LOCK

SHIFT WX CVBN SHIFT

CTRL WIN ALT ALT GR WIN -CLICK CTRL SPACEBAR

() The set of keyslots (129), with green for free keyslots and blue for modifier keys to access each of the four slots per key. hift A hift = ≠ + = à ` a ; one At (d) work as dead keys: visible output is produced (c) Each key offers four keyslots accessible via modifier keys. upon subsequent input of a .

50 COMMUNICATIONS OF THE ACM | FEBRUARY 2021 | VOL. 64 | NO. 2 contributed articles and experts in ergonomics, typogra- intermediate solutions, priorities up- phy, human-computer­ interaction, lin- dates, public requests, and so on. We guistics, and keyboard manufacturing. detail these changes in the later text. A typical standardization process in- volves meetings to iterate over each as- Keyboard Design as pect of the standard and its wording. Despite having an Optimization Problem Final drafts are opened to public com- to add many new The arrangement of characters in a ment on which the committee then it- layout is a very challenging computa- erates if need be. At the start of the characters, we tional problem. Formally, one must as- project, we took these meetings as an strove to keep sign characters to the keyboard keys opportunity to understand the require- and to keyslots accessible via modifier ments of the design problem from a the layout usable, keys. Each assignment involves three human-centered perspective. We then challenging considerations. We here formulated them in a way that enabled ergonomic, and discuss the computational problem modeling and solving the problem us- easy to use. before opening up approaches to mak- ing optimization. ing them useful in a multi-stakeholder Our task was to develop an improved design project. layout for all so-called “special charac- Firstly, what is a “good” placement? ters”, that is, every character that is not Ergonomics and motor performance a nonaccented letter of the Latin alpha- should be central goals. More common bet (“AZERTYUIOP…”), a digit, or the characters should be assigned to keys space . The list of special characters that minimize risks of health issues to be made accessible was greatly aug- such as repetitive strain injury and mented compared to the traditional that are quickly accessed. However, azerty layout, to facilitate the typing of people differ in how they type.7 There all characters used in the French lan- is no standard model that can be used guage and its dialects,a modern com- as an objective function. Also, time puter use (especially programming and spent visually seeking a character social media), and scientific and math- should be minimized through, for ex- ematical characters (for example, Greek ample, placing characters where peo- letters), alongside major currency sym- ple assume they are,14 and grouping bols and all characters in Europe’s characters that are considered similar. other Latin-alphabet languages. Secondly, which level of language to Despite having to add many new char- favor is tricky to know in advance and, acters, we strove to keep the layout as we learned, a politically loaded ques- usable, ergonomic, and easy to learn. tion. To decide where to put #, we must There were several challenging re- weigh the importance of programming quirements (Figure 2). The physical or social-media-type language in which layout follows the alphanumeric sec- that character might be common, tion of the ISO/IEC 9995-112 standard. against “proper” literary French in Each key can hold up to four charac- which it is rare. Decisions on character ters, using combinations of the Shift positions mean trading off many such and AltGr modifiers (Figure 2c). For factors for a large range of users and nonaccented letters, digits, and the typing tasks. space, the layout had to remain as in Finally, there is a very large num- traditional azerty, leaving 129 keyslots ber of possible designs, up to 10213 dis- (see Figure 2b). The only characters tinct combinations for assigning that could be added or moved were the characters to keyslots in our case. Text special characters described in Figure input is a sequential process wherein 2a; their number, up to 122, varied entering a character depends on the throughout the project as new sugges- previously typed one. Therefore, find- tions were made and discussed. Com- ing the best layout for typing is an bining diacritical characters, like ac- instance of the quadratic assignment cents, are entered via “dead keys,” as problem (QAP).2,6,16 These are not only explained in Figure 2d. hard to solve in theory (NP-hard to Note that the requirements and con­ approximate within any constant fac- straints of this project evolved dramat- tor22); there still exist unsolved ically as it progressed, depending on instances of QAPs, published as benchmarks decades ago, with only a https://bit.ly/32ZGnQh 30 items,3 a far cry from 129.

FEBRUARY 2021 | VOL. 64 | NO. 2 | COMMUNICATIONS OF THE ACM 51 contributed articles

An optimization model for typing The challenge for us was to trans- special characters. Sources include the special characters. The design problem late goals such as “facilitate typing French Wikipedia, official policy docu- was formulated as an integer program and learning” into quantifiable objec- ments, and professionally transcribed (IP), which lets us use effective solvers tive functions. We ended up defin- radio shows. Informal text (for exam- that provide intermediate solutions ing four objective criteria, which ple, in social-media or personal com- with bounds on their distance from were combined in a weighted sum to munication) has lower standards of or- optimality. We use binary decision vari- yield a single objective function:6,19 thographic, grammar, and typographic

ables xik to capture whether character i Performance (minimizing movement correctness. The material includes an- is assigned to keyslot k or not. The crite- time), Ergonomics (minimizing risks of onymized email and popular accounts’ ria, and corresponding IP constraints, strain), Intuitiveness (grouping similar Facebook posts and Tweets. The Pro- are formulated in Table 1. Every fea- characters together), and Familiarity gramming corpora comprise content sible binary solution corresponds to a (minimizing differences from azerty). representative of common program- keyboard layout. An objective func- Table 1 presents our formulation of the ming and description languages: Py- tion measures the goodness of each integer program and articulates the thon, C++, Java, JavaScript, HTML, and layout according to each of the crite- intuition behind each criterion. CSS, with comments removed. Several ria. The parameters, constraints, and The criteria here rely on input data of our Formal-and Popular-class cor- objectives of the integer program that reflect the real-world typing of pora were provided by the ELDA.8,b Fre- reflect the standardization commit- tens of millions of French users. quencies were computed by corpus, tee’s goals: facilitate typing of correct Therefore, we gathered large text cor- then averaged per character and class, French, enable the input of certain pora, with varied topics and writing and finally assigned weights subject to characters not supported by the cur- styles, and weighted them in accor- committee discussion (Formal: 0.7, In- rent keyboard, and minimize learning dance with the committee’s requests. time by guaranteeing an intuitive to We focused on three typical uses. For- b The Evaluations and Language resources Dis- use keyboard that is sufficiently similar mal text is well-written, curated text tribution Agency; see http://www.elra.info/en/ to the previous azerty. with correct French and proper use of about/elda/.

Table 1. The integer programming formulation of the keyboard design problem. The objective function is a weighted sum over four nor- malized criteria. Only basic assignment constraints are shown. Throughout the project, additional constraints were added or removed for 6 particular instances. For the instance that led to the standardized layout ( = 85, = 129), the following weights were chosen: wP = 0.3,

wE = 0.25, wI = 0.35, wF = 0.1.

Performance (P): Guarantees that frequent special characters can be quickly entered in combination with the fixed letters. It is quantified by computing the average time to type a special character

before or after any of the regular letters (Tck, Tkc), weighted by the special-character–reg-

ular-letter pair (pci, pic). The corresponding data were gathered in a crowdsourcing-based study. Ergonomics (): Penalizes keyslots that require extreme movements putting strain on tendons and joints, which are empirically associated with repetitive strain injuries24: extreme outward or

inward movements of the wrist (Wk ∈ {0, 1}), extreme extension of fingers ( k ∈ {0, 1}), and

use of one or two modifier keys M( i ∈ {0, 1, 2}). The score is weighted by the frequency (pi) of the character assigned to the keyslot. Intuitiveness (I):

Minimizes the distance between similar special characters (Dkl) and between special 17 characters and similar letters (Dkc), to facilitate discovery and learning. This similarity can

be syntactic or semantic and is captured by the scores sij, sic. All characters are considered equally important for grouping. Familiarity (F): Places frequent characters near the position familiar from traditional azerty, to facilitate 14 visual search with the new layout. DkA (i) quantifies the distance between the keyslotk assigned to the character i and its azerty position, weighted by that character’s frequency

(pi). subject to

∀i ∈ {1, ... N} Ensures each character is assigned to one keyslot.

∀k ∈ {1, ... M} Ensures no keyslot is assigned to multiple characters.

xik ∈ {0, 1} ∀i ∈ {1, ... N}, k ∈ {1, ... M}

52 COMMUNICATIONS OF THE ACM | FEBRUARY 2021 | VOL. 64 | NO. 2 contributed articles

formal: 0.15, Programming: 0.15). Ta- Table 2. The highest-frequency special ­characters, by category of French text. ble 2 shows the most common charac- ters in each category. Formal Informal Programming For estimating key-selection times, Char. Freq. (%) Char. Freq. (%) Char. Freq. (%) we gathered an extensive dataset of é 1.883 # 1.139 . 1.584 key-to-key typing durations to capture , 0.896 é 1.074 - 1.315 how people type in terms of the Per­ . 0.796 / 0.895 ( 1.310 formance objective. In particular, we ’ 0.765 . 0.805 ) 1.309 were interested­ in how soon a special à 0.332 ! 0.712 ; 1.158 character keyslot (in green in Figure 2) - 0.262 @ 0.648 = 1.035 could be accessed before or after a reg- è 0.241 : 0.497 _ 1.002 ular letter. In a crowdsourcing-based ) 0.156 ' 0.457 , 0.926 study, we asked about 900 participants ( 0.141 , 0.447 : 0.922 to type word-like sequences of nonac- : 0.135 à 0.269 " 0.918 cented letters that each had one spe- ' 0.118 - 0.209 > 0.527 cial character slot in the middle,6,19 for ê 0.098 " 0.185 / 0.459 example, “buve Alt+Shift+2 ihup.” / 0.078 è 0.155 < 0.445 We gathered time data for all combina- ! 0.075 ’ 0.129 { 0.444 tions of letters and special character ; 0.058 ê 0.099 } 0.443 slots (7560 distinct key pairs). " 0.047 _ 0.079 ' 0.292 For the Intuitiveness objective, we » 0.041 ; 0.075 [ 0.186 defined a similarity score between char- ç 0.041 & 0.068 ] 0.186 acters as a scalar in the range [0, 1], « 0.041 ) 0.063 % 0.150 0.040 « 0.059 + 0.144 depending on visual resemblance (for ? example, R and ®, _ and -), semantic proximity (for example, × and *, or ÷ and Interesting differences are visible. For instance, the mostly Internet-related characters # and @ appear in the table only for the Informal class. The common accented letters é, à, è, and ê are less frequent in Informal text than in the /), inclusion of other letters (for example, Formal corpora, although retaining the same relative order. Interestingly, / is present in all three columns, because ç and c, œ and ), frequent association in of its wide range of uses. practice (for example, n and ∼, e and ´), or use-based criteria such as lowercase/ iteratively “on the fly” as they become only five days computation time. Note uppercase and opening/closing character relevant. The idea is as follows: we that, thanks to the sparsity, the formu- pairs. These weights, and the similarities start with the easy-to-solve linear part lations used in every iteration stay rel- to consider and give priority, were dis- of the objective and ignore any qua- atively small, enabling us to solve cussed at length with the committee and dratic terms at first. Iteratively, we larger problem instances with less frequently updated throughout the proj- generate the RLT1 relaxation of those time and memory than the traditional ect, especially after the public comment. quadratic terms aijk ⋅ xikxj where at complete RLT1 relaxation.

Solving the QAP. Branch-and- least one of the variables xik and xj is bound1 is a standard approach to solve set to 1 in the previous optimal solu- Introducing Optimization Tools integer optimization problems. It tion and where aijk has a substantial in the Standardization Process relies on relaxations that can be solved contribution to the objective value; in The optimization approach described efficiently (for example, by linearizing particular, we do not generate any yijk permits a principled approach to solv- the quadratic terms and dropping the where aijk = 0. We thereby take advan- ing the keyboard layout problem. integrality constraints). In the power- tage of the sparsity of the quadratic However, we quickly learned that a ful RLT1 approach,10 every quadratic objective function, which allows us to one-shot approach to optimization is term of the form xik ⋅ xk is replaced with introduce only a few additional vari- not actionable in a complex, multi- a new linear variable yijk. Although this ables in every iteration. After enhanc- stakeholder design project. The prob- linearization produces very good lower ing our model with these variables, we lem definition and expectations from bounds, it introduces O(n4) additional reoptimize until the addition of fur- stakeholders­ were ill-defined in the variables, leading to a vast increase in ther terms does not significantly beginning and constantly evolving: defi- problem size. We observed, however, increase the objective value and the nitions, parameters, and objectives that, although we have 100+ characters desired optimality gap is reached. changed, and decisions often hinged on to place, our quadratic form is very This algorithm provides a hierarchy of subjective opinions, public feedback, or sparse. Our approach exploits this lower bounds with every iteration pro- cultural norms, making them hard to sparsity, leading to a framework that ducing a bound that is at least as good express mathematically. We therefore synthesizes the concepts and benefits as the one from the previous iteration. ended up developing several approaches of powerful (but complex) linearization For the problem instance that led to that helped integrate computational and column-generation technique.13 the final standardized layout, we could methods into the operational of In our adaptation, only a subset of thus demonstrate that a very small the standardization committee. variables is part of the initial instance, gap (<2%) exists between the com- When we first joined the project, the and further variables are generated puted and the optimal solution after committee was debating each

FEBRUARY 2021 | VOL. 64 | NO. 2 | COMMUNICATIONS OF THE ACM 53 contributed articles

character in hand-crafted layouts with the objective functions described designed by individual members, with above, we found that typing special rationales such as characters was 47% slower, 48% less ergonomic, and 17% less similar to the • “ê is frequent, so I gave it direct traditional azerty than was our final access because it’s faster.” The challenge for optimized solution, which formed the • “The (« ») are impor- us was to translate basis for the new layout. tant, so they should be easy to Over the course of the project, there find.” goals such as were two cycles of optimizations and • “@ looks like a, so I’ve put them “facilitate typing adjustments, separated by public con- close together.” sultation (see Figure 3). Before that, over • “We should leave ç and ù where and learning” nine months, we defined and iterated they are; otherwise, they will be the optimization model with the com- hard to find.” into quantifiable mittee, formulating objective functions objective functions. that matched members’ intuitions and Many of these rationales were based expectations (Table 1) and collected the on intuition, even when the objective text corpora. As we collected the input measurement (of frequency, speed, data, more subjective choices, such as and so on) was possible. Our first chal- character similarity, were discussed lenge in defining the optimization with the committee members and con- problem was to turn these rationales tinuously adjusted over the course of into well-defined quantified objectives. the project. The first optimization phase These hand-crafted proposals were entailed a five-month back-and-forth typically good in one sense (for exam- process between optimization and com- ple, aiming for speed) but compromis- mittee discussions. The optimizer com- ing other objectives. They often puted solutions to numerous instances generated ideas following a greedy of the design problem, which we pre- approach: starting with what seemed sented to the committee, explaining important and then having to make do how inputs and constraints affected with the remaining free slots and char- aspects of the designs. Members then acters. The outcome of such a process suggested particular parameter settings depends greatly on the choice order, or adding or removing constraints (for and on the subjective weights given to example, keeping capital and lowercase each rationale, which could vary hugely letters on the same key, changing the between characters and stakeholders. character sets, or weighting specific text Our first task was to explain how a corpora differently). We then optimized combinatorial approach can assist with new layouts for these new parameters. such complex, multi-criterion problems. After several such iterations, the com- In contrast to ad-hoc designs, formulat- mittee agreed on the layout and param- ing the problem in quantifiable objective eter set it deemed best with regard to metrics allows algorithms to consider all the optimization objectives. objectives at once and explore all possi- Then, in the first adjustments phase, ble solutions. It also enables stakehold- we used the optimizer to evaluate man- ers to assign understandable weights to ual changes proposed by the experts. It the task’s many parameters, permitting was argued that these adjustments cap- exact control of their priorities. Also, the ture exceptions to the objectives, such objective metrics scan be evaluated sepa- as individuals’ expectations and prefer- rately for assessing effects of manual ences, cultural norms, or character- changes; room is left for design deci- specific political decisions that sions based on subjective criteria that frequently changed with every iteration cannot be formalized. and could not be formally modeled. For We built an evaluation tool that rep- example, the traditional position for licated the objective criteria calcula- the underscore was preferred for some tions used by the optimizer and used it solutions, thanks in part to nomencla- to quickly compare competing layouts ture: it is colloquially called the “8’s for different objectives. This allowed dash” (tiret du 8), for its location on the us to illustrate how easily character-by- 8 key in azerty. The aforementioned character layout design can lead to evaluation tool helped us assess the suboptimal results. For example, eval- consequences of these character moves uating one of the handmade layouts or swaps on the four objective criteria.

54 COMMUNICATIONS OF THE ACM | FEBRUARY 2021 | VOL. 64 | NO. 2 contributed articles

Figure 3. Project timeline: computational methods were involved in all phases but the public comment and were governed by interactions with stakeholders and various computational methods developed by the researchers.

1

OMMENT C

DJUSTMENTSUBLIC SET-UP & DATA GATHERING OPTIMIZATION 1OA P PTIMIZATION 2 ADJUSTMENTS 2

March December May June July March July 11 12 03 07 09 01 01

The committee hence could make bet- Consensual trends in the com- keyboard and diagrams the interac- ter-informed decisions about trade-offs ments directly led to updates of the tions we developed. Our optimization between adjustments. This led to the optimization model, its inputs, or tools proposed solutions and could first release candidate. parameters: characters were added or be used to evaluate suggestions, In June 2017, this layout was pre- removed from the initial set; some which enabled an efficient explora- sented to the public, which had 1 associations were added to the tion of the very large design space. On month, per AFNOR’s standard proce- Intuitiveness criterion and the weights the other side, the experts steered the dure, to respond to the proposed stan- of the criteria and corpora were definition of objectives, set weights, dard and offer comments and sugges- updated. Hard constraints were added and adjusted the input data. They tions. An unprecedented number of to the optimizer, such as having open- used the optimized designs to explore responses (over 3,700) were submit- ing and closing character pairs (for the solution space and tweaked the ted, including numerous suggestions. example, [] {} “” «») placed on consecu- computed layouts to consider tacit Feedback was strongly divided on tive keys on the same row and with the criteria too, such as political objec- some matters, such as how strongly same modifiers. Finally, the positions tives and cultural norms. The evalua- computer-programming-related char- of @ and # were fixed to more accessi- tion tool could be used to study the acters should be favored, or where ac- ble slots already used in alternative consequences of conflicting views, for centuated characters should be azerty layouts. example, by quickly checking what placed. The committee compiled the The second cycle then began, con- happens to objective scores when a feedback into themes and tried to sisting of a (seven-month) optimization character is moved. Simultaneously, identify consensual topics. In some and (four-month) adjustment phase, both sides were informed by com- cases, there were opposing sides with similar to the ones described above. ments from the public, whose expec- no clear majority. For example, some Figure 4 summarizes our approach tations and wishes led the experts to people insisted that all pre-marked to integrate computational methods question their assumptions and crite- characters (for example, é à ç) be re- into the standardization of the French ria and were directly implemented as moved from the layout to make other characters more accessible, because Figure 4. Diagram of our participatory optimization process wherein experts on a standardization­ committee define objectives and inputs to an optimizer, which, in turn,supplies ­ ­concrete the former could be entered using layouts, accompanied with feedback on quality (performance and ­intuitiveness, among others). combining accents, whereas others ar- The process was informed by feedback from the public. gued for having even more pre-accen- tuated letters accessible directly. Con- sensus itself could also be difficult to assess: a subset of people argued that digits should be accessible without the Shift modifier, but it was not clear ayouts whether all of the remaining com- ptimization esign eplorations pert menters were positive, neutral, or even tools committee ew standard gave any thought to keeping them esign evaluations “shifted.” In such cases, the committee hanges to design referred to the Ministry of Culture’s problem redefinitions stated objectives as well as to the ex- orpora perts’ opinions on the available op- eedback ublic tions: digits in our text corpora are much less frequent than some of the most used accentuated characters, and the change from the traditional azer- ty was deemed too large.

FEBRUARY 2021 | VOL. 64 | NO. 2 | COMMUNICATIONS OF THE ACM 55 contributed articles

c Figure 5. Comparison of the azerty and the new standardized layout. The characters included in azerty. It allows accessing all characters the design problem are in boldface and color. Marked in red are dead keys, which require pressing used in French without relying on software- a subsequent key before a symbol is produced (diacritical marks and mode keys for accessing side corrections. Frequently used French non-French-language Latin characters, Greek letters, and currency symbols). characters are accessible without any modi- fier (é, à, «, », and so on), or intuitively posi- tioned where users can expect them (for

example, œ on the o key). All accented ° + capital letters (À and É, among others) can E 2 & é ~''è# ' { ( [ - ¦ _ \ ç ^ à @ ) ] = } be entered directly or using a . ERTI £ D The main layout offers almost 60 charac- € $ ters not available in azerty for entering DK% µ C ù* symbols used in math, linguistics, eco-

> C? . / § nomics, programming, and other fields. < ,;:! Some programming characters, which

often have alternative uses, were given more prominent slots; for instance, / became accessible without modifiers

T ERT and \ is on the same key but in a shifted slot. According to the metrics described above, the performance and ergonom- ics of typing the special characters

˘ already present in traditional azerty # À ÉÈ Ê ˝ ˝ —‹› '' ˚ ¨ + E - are improved by 18.4% and 8.4%, respec- @ ˘ à § éè´ ´ ê& (][ ) ‘’_ « “ » ” ' ° ˆˇ tively, even though the new layout had to Æ E R T T IÙ Œ‰– – ±‡ D · æ £ € ® {}ú · œ % - – + † accommodate 60 additional characters. ß DK\ √ C - The keyboard offers three additional ∞

θ ß $ μ Eu ⁄ / ÷ * layers accessed via special mode keys.

> ≥ CÇ ¸ ?…! = =/ ! ~ ? , < ≤ ©ç¸ - . ,:. ; ~ These are dedicated to European char- acters not used in French (via the Eu key from Alt+ in Figure 5b), currency sym- bols (via � with Alt+F), and Greek letters

T (via Alt+’s µ), more than 80 additional characters in all. Their placement was beyond the scope of the optimization process, being near-nonexistent in our changes in the weight and constraint enables accessing a larger set of char- text corpora. definitions within the optimization acters. Despite the problem’s compu- Its many changes notwithstanding, model. tational complexity, we were able to the layout maintains similarity to the In summary, customized tools propose a solution for which we could traditional azerty, making the transi- applying an established optimization computationally verify that it is within tion for users simple. Of the 45 special approach allowed fast iteration and 1.98% of the best achievable design characters previously available, 8 re- explainable results, and provided with regard to the overall objective tained their original location and 12 monitoring tools that enabled stake- function and the final choice of param- moved by less than three keys. In par- holders to test and assess the effects eters presented in Table 1. This means ticular, frequently used characters of their ideas for every measurable that it is either optimal or, if subopti- were kept near their original position. objective goal, yielding transparent mal, at most 1.98% worse than an For instance, the most common spe- results. We arrived at the final layout unknown optimal design.13 This solu- cial character (é) is not in the fastest by combining objective and subjective tion was taken as a design basis, to spot to access on average (B07 in our criteria weighted and refined through which the committee added 24 further, study) but stayed at E02 for similarity several iterations with computational rarer characters. Manual changes were although maintaining good perfor- tools. This involved hard facts when- made to accommodate these and mance. Many characters ever possible and factoring in numer- locally optimize the layout’s intuitive- (slots B7–B10) were moved slightly by ous opinions not only from diverse ness. All decisions were informed by the optimizer to better reflect charac- experts but also from the public, the our evaluation tool, allowing the com- ter and character-pair frequencies primary target of the new standard. mittee to finely control the conse- (see Table 2) although remaining in quences of each manual change to the the expected area of the keyboard. The New French initial four objectives. Comparing the final design to azer- Keyboard Standard The new layout enables direct input of The outcome, shown in Figure 5b, more than 190 special characters, a signifi- c Not including accented characters that can be makes it easier to type French and cant increase from the 47 of the current created using dead keys, such as ∧ + I = Î.

56 COMMUNICATIONS OF THE ACM | FEBRUARY 2021 | VOL. 64 | NO. 2 contributed articles ty based on our objective functions, lic acceptance, we published an inter- ing uses of language, from program- we can see that all larger moves of active visualization of the keyboard ming to social media, they have evolved characters had a clear justification, online,d in which people can explore to incrementally via adding characters to be it better performance, ergonomics, discover the new layout and learn the unused keyboard slots. The absence of discoverability, or consistency. Most reasoning behind it. It received more appropriate layout standards negatively noteworthy was bringing paired charac- than 74,800 page views in the week affects the preservation and evolution ters such as parentheses and brackets following the official release event on of these languages. Indeed, it is star- closer together, a direct result of the April 2, 2019, and counted more than tling that some of the world’s most spo- public consultation. 122,000 views 5 months after the ken languages21 lack any government- Finally, substantial effort was standard was published. For people approved keyboard standard: Punjabi devoted to forming semantic regions interested in finer details, we also (10th), Telegu (15th), and Marathi (19th). for characters, such as mathematical published an open-access document Similarly, virtual (software) key- characters (C11–D12 and B12), com- in French and English explaining the boards mostly follow agreed-on stan- mon currency symbols (C02–D03), or essence of our method in layman’s dards for alphanumeric characters, quotation marks (E07–E11). Many of terms.8,19 This details the impact of but special characters can be company- these groupings emerged during the the various corpora and weights in- specific and vary greatly. Computation- optimization process, thanks to the volved in the calculations and in the al design methods could play a role in Intuitiveness objective. Others resulted committee’s later deliberations. helping regulators improve quality and from manual changes when the com- respond more swiftly to changes in mittee decided to prioritize semantic Learnings and Outlook computing and language, even “shak- grouping over performance or ergonom The design of keyboards is a matter of ing up” a design if needed. The optimi- ics (for example, following a calculator economic, societal, and even medical zation methods and tools proposed metaphor for mathematical charac- interest. However, as most complex ar- here can be applied to other languages ters). The Intuitiveness score improved tifacts involving software do, they and input methods (for example, more than fourfold (434.4%) relative to evolve by stacking layers on layers. Most touchscreens) with adaptations to the the traditional azerty. keyboard layouts were designed de- input data and corresponding weights. Communication and adoption. We cades ago or more. To respond to chang- For keyboards and beyond, we be- cannot predict the success of the new standard, nor how quickly users will Table 3. Opportunities for improving the use of computational methods in large-scale design projects, identified on the basis of our experience in using combinatorial optimization adapt it. Being voluntary, its publica- for designing the French keyboard standard. tion does not bind users nor manufac- turers. We can, however, report first indicators of interest, as well as the Facilitating participatory optimization French Ministry of Culture’s plans to To support multistakeholder design projects, computational methods should be promote the new layout. interactive, iterative, and participatory. Therefore we need tools that allow: At least two manufacturers started (1) Fast (re)definition of the problem: producing physical keyboards engraved In an iterative design process, the problem definition is constantly evolving. To speed according to the new standard, of which up computation in cases of only slight changes in definition or instances, standard solvers already one was marketed by the end of should find a way to reuse information about previously explored solutions, as with the pruning decisions in a branch-and-bound tree, and adapt them to the modified constraints 2019. We were also informed that Mi- and objectives. crosoft will integrate an official driver to Windows 10. Importantly, as an attempt (2) Online exploration of the design space: Manual exploration is essential for stakeholders’ understanding of the design problem to promote the use of the new layout, and speculation such as “what if we group all math characters on the right side of the the French Ministry of Culture reported keyboard?” General-purpose solvers lack interfaces for manually exploring the design that they will replace the entire “fleet” of space.9, 15 A two-way interface is needed that lets stakeholders change solutions or its employees’ keyboards. We also re- propose new ones and enables the optimization process to communicate the outcome from the assessment in human-readable format. ceived numerous emails from individu- als motivated to write their own key- (3) Learning and visualizing hidden “subjective” criteria: board drivers and key-stickers, so they Our stakeholders made manual adjustments to a proposed solution, applying tacit criteria such as assumptions about users’ habits, cultural specificities, subjective and others could use the layout before it preferences, and political agendas. Optimizers should offer interfaces for making such is effectively commercialized. Only few local changes. From the interactions, a “subjective function” could be learned that can be months after the release of the stan- shown and used as an additional objective in optimization of future solutions. dard, several drivers were available for (4) Justifications for design choices: Mac OSX, Windows 10, and ; some When presented with a solution, the committee and the public often asked of them listed on our webpage.d These questions of the form “why is this character placed here?” and wanted to understand measures indicate the will and poten- how a change in the objective weight or parameters would affect the optimal solution. Developing effective visualizations that show how changes to optimization parameters tial for nationwide adoption. impact the design and vice versa could aid users in navigating the design space and To inform users and encourage pub- make the optimization more predictable. d See http://norme-azerty.fr/

FEBRUARY 2021 | VOL. 64 | NO. 2 | COMMUNICATIONS OF THE ACM 57 contributed articles

lieve that much of the potential of task instances in different ways and for Standardization, Geneva, , October 2009. 13. John, M., Karrenbauer, A. Dynamic sparsification for computational methods remains un- leave some variables open? Can we vi- quadratic assignment problems. In Mathematical exploited. The power of algorithms sualize the search landscape meaning- Optimization Theory and Operations Research. M. Khachay, . Kochetov, P. Pardalos, eds. Springer lies in their problem-solving capabili- fully, or learn “subjective functions” International Publishing, Cham, 2019, 232–246. ty. They can explore design spaces and from interactions? Can we use fast ap- ISBN 978-3-030-22629-9. 14. Jokinen, .P.P., Sarcar, S., Oulasvirta, A., Silpasuwanchai, obtain suggestions that would be hard proximations in lieu of full-fledged C., Wang, ., Ren, X. Modelling learning of new keyboard to find by intuition or trial-and-error. solvers in interactive design sessions? layouts. In Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems (CHI ‘17, 2017), This element is often missing from We believe that when designed from a ACM Press, New York, New York, USA, 4203–4215. ISBN present-day mainstream interaction participatory perspective, algorithms 9781450346559. doi: 10.1145/3025453.3025580. http://dl.acm.org/citation.cfm?doid=3025453.3025580. design, which leaves the generation of could more directly support not only 15. Kapoor, A., Lee, B., Tan, D., Horvitz, E. Interactive optimization for steering machine classification. In new designs to humans. problem-solving but also considering Proceedings of the SIGCHI Conference on Human However, the case of the French key- multiple perspectives, making refine- Factors in Computing Systems (CHI ‘10, 2010), ACM, New York, , USA, 1343–1352. ISBN 978-1-60558- board has revealed important chal- ments, and learning about a problem. 929-9. doi: 10.1145/1753326.1753529. http://doi.acm. lenges in integrating computational The code and data presented in this org/10.1145/1753326.1753529. 16. Karrenbauer, A., Oulasvirta, A. Improvements to methods into large-scale multi-stake- article are documented and open- keyboard optimization with integer programming. holder design projects. Starting from a sourced,e alongside instructions for In Proceedings of the 27th Annual ACM Symposium on User Interface Software and Technology (UIST ‘14, well-defined optimization problem, optimizing a layout for any language. 2014), ACM, New York, NY, USA, 621–626. ISBN our approach evolved toward some- 978-1-4503-3069-5. doi: 10.1145/2642918.2647382. e See http://norme-azerty.fr. http://doi.acm.org/10.1145/2642918.2647382. thing one could call participatory opti- 17. Lee, P.U-J., Zhai, S. Top-down learning strategies: can mization. This is inspired by participa- they facilitate stylus keyboard learning? Int. J. Human-Computer Stud. 60, 5-6 (May 2004), tory design, which originated with References 585–598. ISSN 1071-5819. doi: 10.1016/J. 1. Bertsimas, D., Tsitsiklis, J. Introduction to Linear IJHCS.2003.10.009. http://www.sciencedirect.com/ labor unions and was developed as a st Optimization, 1 edn. Athena Scientific, Belmont, MA, science/article/pii/S1071581903001794. co-design method aimed at democrat- USA, 1997. ISBN 1886529191. 18. Meignan, D., Knust, S., Frayret, J-M., Pesant, G., Gaud, N. 2. Burkard, R.E., Offermann, D.M.J. Entwurf von ic inclusion of stakeholders.23 Equal A review and taxonomy of interactive optimization Schreibmaschinentastaturen mittels quadratischer methods in operations research. ACM Trans. Interact. representation and resolving conflicts Zuordnungsprobleme. Zeitschrift für Opt. Res. 21, 4 Intell. Syst., 5(3):17:1–17:43, September 2015. ISSN (1977), B121–B132. 2160-6455. doi: 10.1145/2808234. URL http://doi. were two key aims. For such optimiza- 3. Burkard, R.E., Karisch, S.E., Rendl, F. Qaplib - a acm.org/10.1145/2808234. tion, the stakeholders must be brought quadratic assignment problemlibrary. J. Global 19. NF Z 71-300. User interfaces - French keyboard Optim. 10, 4 (June 1997), 391–403. ISSN layouts for office. Standard, AFNOR, 03, 2019a. together at a level where they can in- 0925-5001. doi: 10.1023/A:1008293323270. http:// 20. NF Z 71-300. Interfaces utilisateurs – Dispositions de form and influence each other interac- dx.doi.org/10.1023/A:1008293323270. clavier bureautique français. Standard, AFNOR, 03, 2019b. 4. DGLFLF. Rapport au Parlement sur l’emploi de la langue 21. Parkvall, M. Världens 100 största språk 2007. tively and iteratively, engaging directly française. Government Report, 2015. http://www.culture. Nationalencyklopedin, 2007. http://www.ne.se/. with the optimizer and model to arrive gouv.fr/Thematiques/Langue-francaise-et-langues- 22. Queyranne, M. Performance ratio of polynomial de-France/La-DGLFLF/Nos-priorites/Rapport-au- heuristics for triangle inequality quadratic assignment at a good solution collaboratively. Parlement-sur-l-emploi-de-la-langue-francaise-2015. problems. Oper. Res. Lett. 4, 5 (1986), 231–234. ISSN There is growing interest in optimi- From the Délégation générale à la langue française et 0167-6377. doi: 10.1016/0167-6377(86)90007-6. aux langues de France of the Ministère de la Culture http://www.sciencedirect.com/science/article/ zation research employing methods et de la Communication. In French. pii/0167637786900076. 5. DGLFLF. Vers une norme française pour les claviers that actively include the user in the 23. Simonsen, J., Robertson, T. Routledge International informatiques. Government Publication, 2016. http:// Handbook of Participatory Design. Routledge, New process. However, the notion of par- www.culture.gouv.fr/Thematiques/Langue-francaise- York, NY, USA, 2012. et-langues-de-France/Politiques-de-la-langue/ ticipatory optimization goes beyond 24. Yassi, A. Repetitive strain injuries. The Lancet 349, Langues-et-numerique/Les-technologies-de-la- 9056 (March 1997), 943–947. doi: 10.1016/ previous efforts to simply open up the langue-et-la-normalisation/Vers-une-norme- S0140-6736(96)07221-2. http://www.sciencedirect. francaise-pour-les-claviers-informatiques. From the search- and model-building process com/science/article/pii/S0140673696072212. Délégation générale à la langue française et aux Manuscript submitted to ACM for input by the end-user.18 It focuses langues de France of the Ministère de la Culture et de la Communication. In French. particularly on including stakehold- 6. Feit, A.M. Assignment problems for optimizing text Anna Maria Feit (feit@.uni-saarland.de) is a professor ers at every step in the process, for input. PhD thesis, Aalto University, 2018. http://urn.fi/ at Saarland University, Germany. This work was done URN:ISBN:978-952-60-8016-1. while a researcher at Aalto University and Zurich, which state-of-the-art optimization 7. Feit, A.M., Weir, D., Oulasvirta, A. How we type: Switzerland. methods provide limited support. The Movement strategies and performance in everyday typing. In Proceedings of the 2016 CHI Conference Mathieu Nancel is a research scientist in the Loki case of the French keyboard reveals 4 on Human Factors in Computing Systems (CHI ‘16, research group at Inria Lille–Nord Europe; Lille, France. 2016). ACM, New York, NY, USA, 4262–4273. ISBN avenues for future work as especially 978-1-4503-3362-7. doi: 10.1145/2858036.2858233. Maximilian John is a researcher at Max Planck Institute important to address for enabling ac- http://doi.acm.org/10.1145/2858036.2858233. for Informatics, Saarbrücken, Germany. 8. Feit, A.M., Nancel, M., Weir, D., Bailly, G., John, M., tive participation of stakeholders and Karrenbauer, A., Oulasvirta, A. Élaboration de la Andreas Karrenbauer is a senior researcher at Max optimizer in an iterative human-cen- disposition AZERTY modernisée. Technical report, Inria, Planck Institute for Informatics. Saarbrücken, Germany Lille, France 2018. https://hal.inria.fr/hal-01826476. Daryl Weir is a researcher at Aalto University. Espoo, Finland. tered design process supported by 9. Fisher, M.L., Rosenwein, M.B. An interactive computational methods (see Table 3). optimization system for bulk-cargo ship scheduling. Antti Oulasvirta is an associate professor at Aalto Nav. Res. Logist. 36, 1 (1989), 27–42. University, Espoo, Finland. We envision such demonstrations 10. Frieze, A.M., Yadegar, J. On the quadratic assignment as ours encouraging establishment of problem. Discrete Appl. Math. 5, 1 (1983), 89–98. ISSN 0166-218X. doi: http://dx.doi.org/10.1016/ © 2021 ACM 0001-0782/21/2 $15.00 new, human-centered objectives in al- 0166-218X(83)90018-5. http://www.sciencedirect. gorithm research. Considering interac- com/science/article/pii/0166218X83900185. 11. Gajos, K., Weld, D.S. Preference elicitation for interface tive and participatory properties of al- optimization. In Proceedings of the 18th annual ACM symposium on User interface software and technology gorithms also opens new questions (2005), ACM, New York, NY, USA, 173–182. Watch the authors discuss and paths to new, societally important 12. ISO/IEC 9995-1. ISO/IEC 9995-1:2009 Information this work in the exclusive technology – Keyboard layouts for text and office Communications video. uses. How well can we stop, refine, and systems – Part 1: General principles governing https://cacm.acm.org/videos/ resume an algorithm? Can we define keyboard layouts. Standard, International Organization azerty-ameliore

58 COMMUNICATIONS OF THE ACM | FEBRUARY 2021 | VOL. 64 | NO. 2