Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Compose support #36

Merged
merged 3 commits into from
Feb 14, 2022
Merged

Add Compose support #36

merged 3 commits into from
Feb 14, 2022

Commits on Feb 14, 2022

  1. uxkb: add Compose (dead-key) support

    The code is partially based on and partially inspired by Ran Benita's
    code at bluetech@89aeb0f.
    
    The main difference is that Compose support is enabled by default,
    instead of requiring an extra command-line option.
    
    Dead keys are special keys which have no immediate effect when pressed,
    but instead they modify the result of subsequent keys. For example,
    pressing the <`> key (the dead key) and then <u> may produce the symbol
    ú. Such sequences can be more elaborate and consist of several keysyms.
    
    The compose mechanism has two main pieces of configuration:
    
    1. The Compose file, which defines the compose sequences. It is picked
       by the user's locale. See the Compose(5) man page; most of it is
       supported. These files are currently a part of libX11, but some users
       write their own. For example:
       /usr/share/X11/locale/en_US.UTF-8/Compose
    
    2. The user's XKB keymap, which defines which keys are dead keys (that
       is, produce keysyms of the form dead_*, which are normally used in
       Compose sequences) and which key is the Compose key (which starts
       many Compose sequences). For example, the us 'intl' variant.
    
    This feature (and more) is usually provided by an input method. But we
    use the lightweight support provided by xkbcommon.
    viccie30 committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    d26eb8d View commit details
    Browse the repository at this point in the history
  2. Add --xkb-compose-file option

    Analogously to --xkb-keymap this allows a user to directly specify an
    Xkb compose file. This overrides the automatic creation of a compose
    table from the current locale.
    viccie30 committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    1a36e1d View commit details
    Browse the repository at this point in the history
  3. Wire up Compose support in libuterm

    Feed all key events into the Compose state and use the resulting
    keysyms.
    viccie30 committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    2620882 View commit details
    Browse the repository at this point in the history