Skip to content

Add keyboard labels symbols#164

Open
zacharie-moughanim wants to merge 24 commits into
typst:mainfrom
zacharie-moughanim:main
Open

Add keyboard labels symbols#164
zacharie-moughanim wants to merge 24 commits into
typst:mainfrom
zacharie-moughanim:main

Conversation

@zacharie-moughanim
Copy link
Copy Markdown
Contributor

@zacharie-moughanim zacharie-moughanim commented May 10, 2026

This PR aims at naming symbols that are often used as keyboard labels.
This regroups within a submodule - as was suggested in this PR - symbols coming from across several unicode blocks : Arrows, Supplemental Arrows - B, Control Pictures, Miscellaneous Technical, Miscellaneous Symbols and Arrows, Miscellaneous Symbols and Pictographs.
There are probably some other I've missed, if you know some, I'll add them.
I've tried to add a large proportion of symbols that may be in the submodule in the end. Some I've considered and did not add, some I'm not convinced should stay but I put anyway to open the discussion. See this table to see all the symbols I considered.

Here are some remarks about the choices of names that I think needs to be discussed :

  • Some arrows (/, /, /, /, ...) both exists as simple arrows, and yet a very similar arrow exist with the main purpose of designating a keyboard label in the Unicode chart. I chose to put arrows resembling-but-whose-main-purpose-is-not-being-a-keyboard-label as alt. However this becomes weird for three tab symbols: //⭿; the third one is a vertical tab, and is rotation of the second one, being itself an arrow but not primarily a keyboard label, while the actual designated symbol for keyboard is and has no vertical counterpart. For now, tab.alt.v is set to the ⭿, so tab.v falls back to it.
  • I named four variants of capslock. Only one of them is not designated as capslock in the Unicode chart (), but I put it for its resemblance, and the fact that it's a combination of variation on other symbols designated as capslock.
  • I used the variant name struck for some capslock to designate a horizontal bar inside the stroked arrow e.g. / although it does not correspond to what is called struck for other arrows. I'm looking for a better name for this variant.
  • There are 3 symbols designating a removal of inputs : , , and , respectively named del, erase.r and erase.l. The first name is for consistence with the control pictures block (it's an alternate symbol for a symbol named del in the control submodule here), however there is also erase.l that I think is used to designate the same key (namely, the one deleting characters to the left of the cursor, so the naming feels weird here.
  • The symbol for the option key is also sometimes used for the alt key (description of the Unicode chart). There is another symbol for the alt key: and I don't know if it's a good idea to put the first one a second time in the module as an alternate symbol for the alt name (Unrelated but alt.alt would be a bit weird and I have no idea what the name could be otherwise).
  • Sometimes regrouped under "Keyboard symbols" on Unicode charts - along with symbols used as keyboard labels - are symbols representing a keyboard. I named them but I don't think they should be in this submodule (plus they are currently named keyboard.keyboard which, in my opinion, feels off like alt.alt).
  • I didn't put any simple arrows that could stand for the arrows at the bottom right of the keyboard because I did not find a unicode symbol mentioning these keys. I'm curious if you have any idea what arrow to pick here, or if we should pick one at all.
  • The arrow (from the Arrow block) is described as "may represent return or newline on keyboards" in the Unicode chart. Since there are other symbols for both these keys, I put it with both names return.alt and newline.alt.
  • I had difficulty drawing the line between what should and should not be in this submodule. Among symbols I'm not sure should be here, and are in the submodule right now are symbols to adjust sound. Some I think should stay like speakers symbols (used for increase/mute/... the sound on a keyboard). Nonetheless, I feel like some, like fast-forward, are more MP3's or DVD player's button labels rather than keyboard's. Among those I did not put are lock 🔒 and bell 🔔. (All considered symbols, present or not in the submodule, are in the table linked at the beginning of this message).
  • As was discussed in the PR about control pictures, I removed the spacebar for and moved this symbol in the submodule, whose full name is now keyboard.space. Plus, I think it should be noted that a similar symbol called SHOULDERED OPEN BOX (the previous one is OPEN BOX) exists, although I did not name it here since I don't know if it's used as a keyboard label, tell me if it is used as such.

@Enivex
Copy link
Copy Markdown
Collaborator

Enivex commented May 10, 2026

I'm really not a fan of adding generic symbols with such specific names. Only symbols clearly intended to represent keyboard keys should be introduced this way.

@zacharie-moughanim
Copy link
Copy Markdown
Contributor Author

You can see the table linked in the initial message to get all informations but quick recap :
Here are symbols not explicitly mentioned as key symbols :

  • ⌂ HOUSE in Miscellaneous technical > Miscellaneous technical which, as said in the document, I don't know if it's actually used as a keyboard label, but other key symbols are used to denote "HOME KEY", I put it to open the discussion but I'm not convinced it should stay.
  • ⌨ and derivatives which, even if it is in a group with key labels, represents a keyboard rather than being a key, so I don't think it belongs here.
  • User interface symbols : none of U+23E9 - U+23FA should in my opinion be there and only a few among U+1F500-U+1F5AE, mainly speakers and brightness frequently used as keyboard labels although it is more generally a UI symbol for brightness and sound management.
  • Power symbols U+23FB - U+23FE and U+2B58, same remark as for brightness and speakers.
  • Lastly, there are generic arrows (from Arrows and Supplement-B Arrows blocks) described as key labels, but I'm not convinced whether to keep them or not. For instance : ⭰, see the initial message for a thorough explanation.

Feel free to tell me what you think, which among those (maybe all of them or more) you wish to see removed from this PR.

Copy link
Copy Markdown
Collaborator

@MDLC01 MDLC01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I feel like a lot of symbols can be removed (for most of them, I left a comment asking for evidence of the symbols being used on actual contemporary people, i.e., being what users expect). Some can be added in a separate PR so that they can be discussed separately as a set.

To answer the various points you made in your OP:

  1. Let's think when we have a smaller set of symbols to consider.
  2. Addressed as a separate comment.
  3. I agree that we should not use .struck for that.
  4. Addressed as separate comments.
  5. Let's keep a single name for each symbol, especially when the alternate name would be as an .alt of a different symbol.
  6. I also agree they shouldn't be in this submodule.
  7. I don't think there is a point giving hyper-specific semantic names to symbols that already have descriptive names in Codex. Also, various arrows fit this semantic, so let's let the end user choose the ones they want instead of having opinionated ones.
  8. I don't like having different words for the same thing. I understand the problem: when multiple symbols have essentially the same semantic, there is a naming conflict. But I think the solution here is to simply choose one and give descriptive names to the others (in this case, ↵ currently does not have a semantic name but let's keep that for a separate PR adding more arrows1).
  9. Addressed as separate comments.
  10. Addressed as a separate comment.

I did not go into a lot of details when reviewing this PR as I first want to reduce its scope to make it more manageable. Feel free to point out any oversight.

Footnotes

  1. See also the huge Arrows section in the Symbol List for sym document.

Comment thread src/modules/sym.txt

// Characters commonly used as keyboards labels
keyboard {
linefeed ↴
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this symbol present on actual keyboards?

Comment thread src/modules/sym.txt
Comment on lines +1327 to +1328
home ↸
.alt ⭶
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that we have two subtly different symbols for the same thing. How did you choose which one to be the .alt variant? Also, why not simply ↖ as suggested by French Wikipédia?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained in the linked document, the default one is in a group called "Keyboard symbols and circle arrows" while the other is in a random group (here, "triangle-headed arrows"), but both mention the "home key" and are cross-referenced. So they clearly meant to describe the same key, but the first one is primarily meant to be a key label.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I think let's only keep U+21B8 and remove the .alt variant. The way I understand it, U+2B76, as a specifically triangle-headed arrow, is a more specific version of U+21B8, a generic arrow.

Comment thread src/modules/sym.txt
Comment on lines +1329 to +1330
.corner ⇱
.phone ⌂
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be many more variations (like ↖ which I noted previously).

In general, I feel like if a semantic name doesn't fit a single symbol (with perhaps a few variants, like phi and phi.alt), it would be better to simply abandon the semantic name and use descriptive names for all variants instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference is that ↖ is not described as "home" in the unicode chart. But if you want we can remove home altogether.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would be better indeed. If the need for a keyboard.home symbol arises in the future, we can always add it at that point.

Comment thread src/modules/sym.txt
Comment on lines +1331 to +1332
end ⇲
.alt ⭸
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the default for this one not the same as for home?

Comment thread src/modules/sym.txt
Comment on lines +1333 to +1343
tab ↹
.alt ⭾
.alt.v ⭿
.l ⇤
.l.alt ⭰
.r ⇥
.r.alt ⭲
.t ⤒
.t.alt ⭱
.b ⤓
.b.alt ⭳
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have evidence for any variant other than tab and tab.alt being used in practice?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My Apple keyboard has U+21E5 on it.

Comment thread src/modules/sym.txt
Comment on lines +1387 to +1390
newline
.alt ↵
.l ⮒
.r ⮓
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any contemporary keyboard that has a separate key for newline that is not just the Enter key?

Comment thread src/modules/sym.txt
Comment on lines +1391 to +1414
eject ⏏\vs{text}
// Music/Video player buttons
forward ⏵
.fast ⏩\vs{text}
backwards ⏴
.fast ⏪\vs{text}
nexttrack ⏭\vs{text}
prevtrack ⏮\vs{text}
playpausetoggle ⏯\vs{text}
alarm ⏰\vs{text}
stopwatch ⏱\vs{text}
timer ⏲\vs{text}
hourglass ⏳\vs{text}
increase ⏶
decrease ⏷
pause ⏸\vs{text}
.alt ⎉
stop ⏹\vs{text}
record ⏺\vs{text}
shuffle 🔀
repeat 🔁
.once 🔂
reload 🔃
.alt 🔄
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think let's exclude those from this PR. they can be added in a separate PR so that this one can focus on actual keyboard symbols.

Comment thread src/modules/sym.txt
Comment on lines +1415 to +1422
// Adjust sound and brightness
brightness
.decrease 🔅
.increase 🔆
speaker 🔈\vs{text}
.mute 🔇
.lower 🔉
.higher 🔊
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like those symbols can be interpreted in a more general way than just keyboard symbols. Let's add them in a separate PR.

Comment thread src/modules/sym.txt
Comment on lines +1423 to +1428
// Power symbols
power ⏻
.on ⏽
.off ⭘
.on.off ⏼
.sleep ⏾
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are redundant with sym.power.standby, sym.power.on, sym.power.off, sym.power.on.off and sym.power.sleep. also they are not keyboard symbols, so I don't think they belong here.

Comment thread src/modules/sym.txt
.discontinuous ⎂
emph ⎃
center ⎅
alt ⎇
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have evidence of contemporary keyboards that use this symbol?

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.

4 participants