Edit

kc3-lang/libxkbcommon/changes/api/+query-virtual-modifiers-state.bugfix.md

Branch :

  • Show log

    Commit

  • Author : Pierre Le Marre
    Date : 2024-10-14 16:05:52
    Hash : 5fbc0ec7
    Message : state: Support querying whether virtual mods are consumed Previously it was not possible to query the status of virtual modifiers with the following functions: - `xkb_state_mod_index_is_consumed` - `xkb_state_mod_index_is_consumed2` Note that it may *overmatch* if some modifier mappings overlap. For example, the default “us” PC layout maps both “Alt” and “Meta” to the real modifier “Mod1”; thus “Mod1”, “Alt” and “Meta” modifiers will return the same result with these functions.

  • changes/api/+query-virtual-modifiers-state.bugfix.md
  • The following functions now allow to query also *virtual* modifiers, so they work
    with *any* modifiers (real *and* virtual):
    - `xkb_state_mod_index_is_active`
    - `xkb_state_mod_indices_are_active`
    - `xkb_state_mod_name_is_active`
    - `xkb_state_mod_names_are_active`
    - `xkb_state_mod_index_is_consumed`
    - `xkb_state_mod_index_is_consumed2`
    - `xkb_state_mod_mask_remove_consumed`
    
    Warning: they may overmatch in case there are overlappings virtual-to-real
    modifiers mappings.