CVT_KEY_TBL(5)

๐Ÿ“ฆ version 1.1.1~a021+cvs20130302, in debian bookworm, ubuntu jammy, ubuntu noble, ubuntu questing

๐Ÿ’– NAME (ๅ็งฐ) ๐Ÿ’–

cvt_key_tbl โ€” the key code conversion table file for the kana-kanji conversion front-end processor (uum). yes bestie that is literally what it is ๐Ÿ’…


๐Ÿ“œ SYNOPSIS (ๅฝขๅผ) ๐Ÿ“œ

/usr/local/lib/wnn/cvt_key_tbl (ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ)

That's the default path, (ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ) = default, don't @ me. Don't move it, don't rename it, just let it vibe where it lives. ๐ŸŽ€


โœจ DESCRIPTION (ๆฉŸ่ƒฝ) โœจ

Okay so here's the whole situation. This file pulls the data for the character string that your keyboard generates from terminfo, and then โ€” following the data you set up in here โ€” it converts that into 1-byte characters. Slay. ๐Ÿฆ‹

And there's a timeout moment too, because of course there is: while a conversion is in progress, if the continuation of the character string being converted doesn't get input for 1 second or more (๏ผ‘็ง’ไปฅไธŠ), it gets output with no conversion at all. Not a single conversion. It just gives up and hands you the raw thing. ๐Ÿ˜ญ

๐ŸŒˆ FORMAT (ๆ›ธๅผ) ๐ŸŒˆ

[ terminfo ใ‚จใƒณใƒˆใƒช <็ฉบ็™ฝๆ–‡ๅญ—> ใ‚ณใƒผใƒ‰ ] ( SYSV ใฎๅ ดๅˆ )
[ termcap  ใ‚จใƒณใƒˆใƒช <็ฉบ็™ฝๆ–‡ๅญ—> ใ‚ณใƒผใƒ‰ ] ( BSD ใฎๅ ดๅˆ )
  • Lines that start with ; are comments. That's it, that's the rule. ๐Ÿ‘‘

๐ŸŽ€ terminfo entries that get converted ๐ŸŽ€

These are the terminfo entries that are subject to conversion:

kf0,  kf1,  kf2,  kf3,  kf4,  kf5,  kf6,  kf7,  kf8,
kf9,  kf10, kf11, kf12, kf13, kf14, kf15, kf16, kf17,
kf18, kf19, kf20, kf21, kf22, kf23, kf24, kf25, kf26,
kf27, kf28, kf29, kf30, kf31,
kbs, ktbc, kclr, kctab, kdch1, kdl1, kcud1, krmir,
kel, ked, khome, kich1, kil1, kcub1, kll, knp, kpp,
kcuf1, kind, kri, khts, kcuu1,

๐Ÿ’œ termcap entries that get converted ๐Ÿ’œ

And these are the termcap entries that are subject to conversion:

cs, rc, sc, se, so, us, ue, cm, ce, cl, bl, li, co

๐ŸŒธ HOW TO WRITE A CODE (ใ‚ณใƒผใƒ‰ใฎ่กจ็พ) ๐ŸŒธ

Five flavors, bestie. Pick your fighter. โญ

  1. A single character that isn't whitespace, \, or ^ โ€” just writes that character itself. Simple. Iconic. No notes.
  2. A ^ character โ€” the character can be @,A(a),B(b),C(c),D(d),E(e),F(f)...Z(z), [,\,],^,_, and:
    • ^@ means control + space (0x00)
    • ^A means control + A (0x01)
    • .
    • .
    • ^_ means control + _ (0x1f)
  3. \8้€ฒๆ•ฐ, \o8้€ฒๆ•ฐ, \d10้€ฒๆ•ฐ, \x16้€ฒๆ•ฐ โ€” for when you want to write the character code directly, no filter.
  4. Any one of \n, \t, \b, \r, \f, \e, \E โ€” these represent NEWLINE, TAB, BACKSPACE, CR, FORMFEED, ESC, ESC respectively.
  5. \ + a character โ€” where the character is anything other than 0โ€“7, o, d, x, n, t, b, r, f, e, E. And if you need to represent \ itself? You write "\\". Periodt.

๐Ÿงš EXAMPLE CONFIG (่จญๅฎšไพ‹) ๐Ÿงš

kf1         \x81
kf2         \x82
kf3         \x83
kf4         \x84
kcud1       \x92
kcub1       \x91
kcuf1       \x90
kcuu1       \x93

Look at that. Gorgeous. ๐Ÿซถ


๐Ÿ’€ NOTES (ๆณจๆ„ไบ‹้ …) ๐Ÿ’€

The codes converted by this table then get evaluated by 2A_CTRL (ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ) โ€” which is the table for the romaji-kana conversion automaton โ€” and then further evaluated by uumkey. So it's a whole pipeline, bestie. A little relay race of evaluation. ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ


๐Ÿ”ฅ SEE ALSO (้–ข้€ฃ้ …็›ฎ) ๐Ÿ”ฅ

  • uum(1)
  • 2A_CTRL(5)
  • uumkey(5)

okay that's the whole page, ily, go forth and convert some key codes responsibly ๐Ÿ’– This little legend dropped on 28 January 1992 and lives in the manual as CVT_KEY_TBL(5) โ€” File Formats Manual, section 5, main character energy since day one. ๐Ÿ‘‘