Edit

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

Branch :

  • Browse

    Commit

  • Author : Pierre Le Marre
    Date : 2024-10-14 16:05:35
    Hash : 31a841ae
    Message : state: support querying whether virtual modifiers are active Previously it was not possible to query the status of virtual modifiers with the following functions: - `xkb_state_mod_index_is_active` - `xkb_state_mod_indices_are_active` - `xkb_state_mod_name_is_active` - `xkb_state_mod_names_are_active` 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.