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

Enable out-of-range group action configuration using options API (take 3) #516

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 28, 2024

  1. keymap: Introduce keymap compile options API

    Added a new keymap compile options API:
    - `xkb_keymap_compile_options_new`
    - `xkb_keymap_compile_options_free`
    - `xkb_keymap_new_from_names2`
    - `xkb_keymap_new_from_file2`
    - `xkb_keymap_new_from_buffer2`
    
    This interface allows to configure keymap options that cannot be
    passed as flags.
    wismill committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    e15ad51 View commit details
    Browse the repository at this point in the history
  2. Enable out-of-range layout action configuration

    Enable the configuration of out-of-range layout handling using the new
    function `xkb_keymap_compile_options_set_layout_out_of_range_action` and
    the corresponding new enumeration `xkb_keymap_out_of_range_layout_action`:
    - `XKB_KEYMAP_WRAP_OUT_OF_RANGE_LAYOUT`: wrap into range using integer
      modulus (default, as before).
    - `XKB_KEYMAP_REDIRECT_OUT_OF_RANGE_LAYOUT`: redirect to a specific
      layout index.
    - `XKB_KEYMAP_CLAMP_OUT_OF_RANGE_LAYOUT`: clamp into range, i.e. invalid
      indexes are corrected to the closest valid bound (0 or highest layout
      index).
    
    When not specified, invalid groups are brought into range using integer
    modulus.
    wismill committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    0a0876f View commit details
    Browse the repository at this point in the history