<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/url-mode.h, branch 1.10.3</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.3</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.3'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-03-04T08:43:43Z</updated>
<entry>
<title>input: rewrite of how we match foot’s own key bindings</title>
<updated>2021-03-04T08:43:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-27T19:42:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5e64e06a550c2499a23f03749986791136cbbcb9'/>
<id>urn:sha1:5e64e06a550c2499a23f03749986791136cbbcb9</id>
<content type='text'>
Bindings are matched in one out of three ways:

* By translated (by XKB) symbols
* By untranslated symbols
* By raw key codes

A translated symbol is affected by pressed modifiers, some of which
can be “consumed”. Consumed modifiers to not partake in the comparison
with the binding’s modifiers. In this mode, ctrl+shift+2 maps to
ctrl+@ on a US layout.

Untranslated symbols, or un-shifted symbols refer to the “base” symbol
of the pressed key, i.e. it’s unaffected by modifiers. In this mode,
consumed modifiers *do* partake in the comparison with the binding’s
modifiers, and ctrl+shift+2 maps to ctrl+shift+2 on a US layout.

More examples: ctrl+shift+u maps to ctrl+U in the translated lookup,
while ctrl+shift+u maps to ctrl+shift+u in the untranslated lookup.

Finally, we also match raw key codes. This allows our bindings to work
using the same physical keys when the user switches between latin and
non-latin layouts.

This means key bindings in foot.ini *must* not include both +shift+
and a *shifted* key. I.e. ctrl+shift+U is not a valid combo as it
cannot be triggered. Unfortunately, this was how you were supposed to
write bindings up until now... so, we try to detect such bindings, log
a deprecation warning and then “fix” the binding for the user.

When specifying bindings in foot.ini, both ctrl+U and ctrl+shift+u are
valid, and will work. The latter is preferred though, since we cannot
detect the raw key code for the former variant. Personally, I also
prefer the latter one because it is more explicit; it’s more obvious
which keys are involved.

However, in some cases it makes more sense to use the other
variant. Typically for non-letter combos.
</content>
</entry>
<entry>
<title>url-mode: use ‘jump-label-letters’ as the alphabet for key sequences</title>
<updated>2021-02-13T10:43:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-13T10:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c7006661f5edc55cf235a647da67e0e26e7fe594'/>
<id>urn:sha1:c7006661f5edc55cf235a647da67e0e26e7fe594</id>
<content type='text'>
Instead of hard coding the alphabet to “sadfjklewcmpgh”, use the
letters from ‘jump-label-letters’.

Closes #355
</content>
</entry>
<entry>
<title>url-mode: urls_collect(): URL list pointer as an argument</title>
<updated>2021-02-07T15:33:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-06T19:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a988138492ba39d507f644bbb0b6d452a864ca79'/>
<id>urn:sha1:a988138492ba39d507f644bbb0b6d452a864ca79</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: underline URLs using the color from colors.urls</title>
<updated>2021-02-07T15:33:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-06T10:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2c10a147ea0e471f12facfa11913272d42163f76'/>
<id>urn:sha1:2c10a147ea0e471f12facfa11913272d42163f76</id>
<content type='text'>
This is implemented by allocating one of the (few!) remaining bits in
the cells’ attribute struct to indicate the cell should be “URL
highlighted”.

render_cell() looks at this bit and draws an underline using the color
from colors.urls (defaults to regular3 - i.e. yellow).

A new function, url_tag_cells(), iterates the currently detected URLs
and sets the new ‘url’ attribute flag on the affected cells.

Note: this is done in a separate function to keep urls_collect() free
from as many dependencies as possible.

urls_reset() is updated to *clear* the ‘url’ flag (and thus implicitly
also results in a grid refresh, _if_ there were any URLs).

We now exit URL mode on *any* client application input. This needs to
be so since we can’t know if the URLs we previously detected are still
valid.
</content>
</entry>
<entry>
<title>config: add show-urls-copy action</title>
<updated>2021-02-07T15:33:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-04T19:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=93181649b32249f572bc4c6892c99155186fc714'/>
<id>urn:sha1:93181649b32249f572bc4c6892c99155186fc714</id>
<content type='text'>
This works just like show-urls-launch, except that instead of opening
the URL (typically using xdg-open), it is placed in the clipboard when
activated.
</content>
</entry>
<entry>
<title>urls: initial support for detecting URLs and rendering jump-labels</title>
<updated>2021-02-07T15:33:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-31T10:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2cc84db97978388475504592c88911046bcd2eb6'/>
<id>urn:sha1:2cc84db97978388475504592c88911046bcd2eb6</id>
<content type='text'>
The jump labels work, but is currently hardcoded to use xdg-open
</content>
</entry>
</feed>
