<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Eloy Cuadra skreiv 28.07.2024 23:08:<br>
</div>
<blockquote type="cite" cite="mid:3637662.dWV9SEqChM@orion.home"><span
style="white-space: pre-wrap">
</span>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Some keyboard layouts have the character easily accessible. For example,
the ‘nodeadkeys’ variant of the Spanish layout has it on ‘AltGr + -’
(‘AltGr’ is the *right* ‘Alt’ key). To test it, you can load the
keyboard layout like this (or use the keyboard layout options in system
settings):
setxkbmap -layout es -variant nodeadkeys
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Although the Spanish keyboard layout without dead keys inserts the ellipsis
character when pressing the key combination 'AltGr + -', this is not the ideal
solution, since the dead keys would stop working with this layout (i.e., we
would have the same problem when entering accented vowels, which are widely
used in Spanish). In other words, this keyboard layout solves one problem to
create another that did not previously exist.</pre>
</blockquote>
<p>Yes, I agree that this isn’t an ideal solution. It would probably
be best to submit an update to the official X keyboard
configuration database (either for the Spanish keyboard layout in
particular or for the ‘latin’ keyboard layouts in general, which
are shared between many countries):</p>
<p><a class="moz-txt-link-freetext" href="https://www.freedesktop.org/wiki/Software/XKeyboardConfig/">https://www.freedesktop.org/wiki/Software/XKeyboardConfig/</a></p>
<p>Of course then it will take some time before the new keybindings
are available in distros. But once it’s done, they will be
available for everyone, forever.</p>
<p>We did this for the Norwegian keyboard layout in 2009:<br>
<a class="moz-txt-link-freetext" href="https://bugs.freedesktop.org/show_bug.cgi?id=23518">https://bugs.freedesktop.org/show_bug.cgi?id=23518</a><br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:3637662.dWV9SEqChM@orion.home"><span
style="white-space: pre-wrap"></span>
<blockquote type="cite"><span style="white-space: pre-wrap">
</span>
<pre class="moz-quote-pre" wrap="">I agree that this can be made simpler. On the other hand, I’m not sure
adding support for this in Lokalize is the best way forward. Easy access
to special characters is really the domain of the input method (e.g.,
ibus or fcitx5). And when using the correct input method, inserting
these characters will be easy in *all* applications, not just in Lokalize.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Many text editing programs have options of this type to change certain
character combinations to their Unicode equivalents. Lokalize is, after all, a
specialized text editor.</pre>
</blockquote>
<p>One option would be to implement a general autocorrect feature.
But this should preferably be implemented in the general
KTextEditor component, which is shared between several text
editors (Kate, KWrite, Lokalize, Kile, …).<br>
</p>
<p>BTW, I accidentally discovered that implementing an ‘insert
character’ feature in Lokalize was actually rejected already in
the original design document for Lokalize (then called KAider).
(There *was* such a feature in the earlier KBabel localisation
application.) See:<br>
<a class="moz-txt-link-freetext" href="https://techbase.kde.org/Projects/Summer_of_Code/2007/Projects/KAider#KBabel_features_NOT_to_be_implemented">https://techbase.kde.org/Projects/Summer_of_Code/2007/Projects/KAider#KBabel_features_NOT_to_be_implemented</a><br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:3637662.dWV9SEqChM@orion.home">
<pre class="moz-quote-pre" wrap="">The ellipsis case is just one example. The KDE HIG covers several other cases,
such as →, ÷, ×, —, etc. (some of them not used in Spanish or in other
languages).</pre>
</blockquote>
<p>Most of these are actually available in the default Spanish
keyboard layout:</p>
<p>→: AltGr + i<br>
÷: AltGr + Shift + .<br>
×: AltGr + Shift + ,</p>
<p>You can also enable the ‘Compose’ key (if it’s not enabled by
default). It can be set to a key like ‘AltGr’ or ‘Scroll Lock’,
and it works with *any* keyboard layout. Then you can press:</p>
<p>‘Compose [release the key] ..’ to insert a … (ellipsis character)<br>
‘Compose [release the key] <-’ to insert a ←<br>
‘Compose [release the key] +-’ to insert a ±<br>
‘Compose [release the key] 23’ to insert a ⅔<br>
‘Compose [release the key] /o’ to insert a ø<br>
etc.<br>
(You don’t *have* to release the key, but it’s usually easier to
do it.)<br>
</p>
<p>You can enable the ‘Compose’ key in the KDE System Settings:<br>
Keyboard → Keybindings → Position of Compose key</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Karl Ove Hufthammer</pre>
</body>
</html>