{
    "mode": "man",
    "parameter": "XCompose",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/XCompose/5/json",
    "generated": "2026-10-07T14:52:39Z",
    "sections": {
        "NAME": {
            "content": "Compose - X client mappings for multi-key input sequences\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The X library, libX11, provides a simple input method for characters beyond those represented\non typical keyboards using sequences of key strokes that are combined to enter a single char‐\nacter.\n\nThe compose file is searched for in  the following order:\n\n-      If the environment variable $XCOMPOSEFILE is set, its value is used as the name of the\nCompose file.\n\n-      If  the  user's  home  directory has a file named .XCompose, it is used as the Compose\nfile.\n\n-      The system provided compose file is used by mapping the locale to a compose file  from\nthe list in /usr/share/X11/locale/compose.dir.\n\nCompose  files  can use an \"include\" instruction.  This allows local modifications to be made\nto existing compose files without including all of the content directly.   For  example,  the\nsystem's iso8859-1 compose file can be included with a line like this:\ninclude \"%S/iso8859-1/Compose\"\n\nThere are several substitutions that can be made in the file name of the include instruction:\n\n%H  expands to the user's home directory (the $HOME environment variable)\n\n%L  expands  to  the  name  of  the  locale  specific Compose file (i.e., \"/usr/share/X11/lo‐\ncale/<localename>/Compose\")\n\n%S  expands to the name of the system directory for Compose files (i.e.,  \"/usr/share/X11/lo‐\ncale\")\n\nFor example, you can include in your compose file the default Compose file by using:\ninclude \"%L\"\nand then rewrite only the few rules that you need to change.  New compose rules can be added,\nand previous ones replaced.\n",
            "subsections": []
        },
        "FILE FORMAT": {
            "content": "Compose files are plain text files, with a separate line for each compose sequence.  Comments\nbegin  with # characters.  Each compose sequence specifies one or more events and a resulting\ninput sequence, with an optional comment at the end of the line:\nEVENT [EVENT...] : RESULT [# COMMENT]\n\nEach event consists of a specified input keysym, and optional modifier states:\n[([!] ([~] MODIFIER)...) | None] <keysym>\n\nIf the modifier list is preceded by \"!\" it must match exactly.  MODIFIER may be one of  Ctrl,\nLock, Caps, Shift, Alt or Meta.  Each modifier may be preceded by a \"~\" character to indicate\nthat the modifier must not be present.  If \"None\" is specified, no modifier may be present.\n\nThe  result specifies a string, keysym, or both, that the X client receives as input when the\nsequence of events is input:\n\"STRING\" | keysym | \"STRING\" keysym\n\nKeysyms are specified without the XK prefix.\n\nStrings may be direct text encoded in the locale for which the compose file is to be used, or\nan escaped octal or hexadecimal character code.  Octal codes  are  specified  as  \"\\123\"  and\nhexadecimal  codes  as  \"\\x3a\".  It is not necessary to specify in the right part of a rule a\nlocale encoded string in addition to the keysym name.  If the string is omitted, Xlib figures\nit out from the keysym according to the current locale.  I.e., if a rule looks like:\n<deadgrave> <A> : \"\\300\" Agrave\nthe result of the composition is always the letter with the \"\\300\" code.  But if the rule is:\n<deadgrave> <A> : Agrave\nthe result depends on how Agrave is mapped in the current locale.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "XCOMPOSEFILE\nFile to use for compose sequences.\n\nXCOMPOSECACHE\nDirectory to use for caching compiled compose files.\n",
            "subsections": []
        },
        "FILES": {
            "content": "$HOME/.XCompose\nUser default compose file if XCOMPOSEFILE is not set.\n\n/usr/share/X11/locale/compose.dir\nFile listing the compose file path to use for each locale.\n\n/usr/share/X11/locale/<localemapping>/Compose\nSystem default compose file for the locale, mapped via compose.dir.\n\n/var/cache/libx11/compose/\nSystem-wide cache directory for compiled compose files.\n\n$HOME/.compose-cache/\nPer-user cache directory for compiled compose files.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "XLookupString(3), XmbLookupString(3),  XwcLookupString(3),  Xutf8LookupString(3),  mkcompose‐\ncache(1), locale(7).\nXlib - C Language X Interface\n\nX Version 11                                libX11 1.8.7                                  Compose(5)",
            "subsections": []
        }
    },
    "summary": "Compose - X client mappings for multi-key input sequences",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "XLookupString",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/XLookupString/3/json"
        },
        {
            "name": "XmbLookupString",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/XmbLookupString/3/json"
        },
        {
            "name": "XwcLookupString",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/XwcLookupString/3/json"
        },
        {
            "name": "Xutf8LookupString",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/Xutf8LookupString/3/json"
        },
        {
            "name": "cache",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/cache/1/json"
        },
        {
            "name": "locale",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/locale/7/json"
        }
    ]
}