foot/url-mode.h
Daniel Eklöf 1e63dddb89
input: don’t allow non-significant modifiers when matching untranslated symbols
When matching “untranslated” bindings (by matching the base symbol of
the key, e.g. ctrl+shift+2 in US layout), require that no
non-significant modifiers are active.

This fixes an issue where AltGr was “ignored”, and would cause certain
combinations to match a key binding.

Example: ctrl+altgr+0, on many European layouts matched against the
default ctrl+0 (reset the font size), instead of emitting ^]

To make this work, we now need to filter out “locked”
modifiers (e.g. NumLock and CapsLock). Otherwise having e.g. NumLock
active would prevent *all* untranslated matching to fail.

Closes #983
2022-03-20 13:29:29 +01:00

26 lines
785 B
C

#pragma once
#include <stdbool.h>
#include <xkbcommon/xkbcommon.h>
#include <tllist.h>
#include "config.h"
#include "terminal.h"
static inline bool urls_mode_is_active(const struct terminal *term)
{
return tll_length(term->urls) > 0;
}
void urls_collect(
const struct terminal *term, enum url_action action, url_list_t *urls);
void urls_assign_key_combos(const struct config *conf, url_list_t *urls);
void urls_render(struct terminal *term);
void urls_reset(struct terminal *term);
void urls_input(struct seat *seat, struct terminal *term, uint32_t key,
xkb_keysym_t sym, xkb_mod_mask_t mods, xkb_mod_mask_t consumed,
xkb_mod_mask_t locked,
const xkb_keysym_t *raw_syms, size_t raw_count,
uint32_t serial);