Re: How to insert symbols into emails

2024-01-30 Thread David Wright
On Wed 31 Jan 2024 at 02:46:22 (+), fxkl4...@protonmail.com wrote:
> On Tue, 30 Jan 2024, Franco Martelli wrote:
> > On 30/01/24 at 01:14, fxkl4...@protonmail.com wrote:
> >> so i defined my compose key
> >> in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
> >>   
> >> how do i type this
> >
> > I dunno if it's possible to type it using the COMPOSE key, however as
> > workaround you can install "gucharmap" if your desktop is GTK based or
> > "kcharselect" if your desktop is KDE, then search the character by name
> > (I-BEAM) then copy into the clipboard, finally create your own custom
> > ~/.XCompose and define your key sequence to associate i.e. 
> >   : "⌶" as explained in the Debian wiki:
> >
> > https://wiki.debian.org/XCompose
> 
> thanks
> that helps
> in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
>: "⌶"U2336 # ⊥ ⊤ APL FUNCTIONAL SYMBOL I-BEAM
> i can directly enter the symbol above using the U2336 value without a compose 
> key
> ctrl + shift + u and type 2336 and enter

I wasn't sure from you previous post why you wanted to type this
character. Is it something you often use, or was it just a random
example of an Compose definition involving codepoints rather than
more familiar letters and symbols?

I would assume that someone who was going to use a Compose sequence
to type the I-beam would already have their keyboard set up to make
APL symbols available with a shift level. AIUI they would likely
use the layout similar to the IBM 2741. On that keyboard, you could
therefore type Compose and shifted B and N; see:

  https://en.wikipedia.org/wiki/File:APL-keybd2.svg

For typing raw codepoints, your method will work in graphical
applications like FireFox and, presumably, Desktop environments
generally. In emacs, where I compose my emails, the sequence
is a little different:
  Esc x i n s Tab c Tab Return 2 3 3 6 Return
which stands for Meta-X insert-char (using Tab completion) followed
by the codepoint. Or one can type:
  Ctrl-X 8 Return 2 3 3 6 Return
or even:
  Ctrl-X 8 Return A P L Tab I - Tab
which uses Tab completion to type APL FUNCTIONAL SYMBOL I-BEAM,
the Sunday name of the symbol.

People who use vi may have different keystorkes. Horses for courses.

Cheers,
David.



Re: How to insert symbols into emails

2024-01-30 Thread Max Nikulin

On 30/01/2024 07:14, fxkl4...@protonmail.com wrote:

so i defined my compose key
in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
  
how do i type this


The 22a5 key presents in some apl and de layouts

grep -ri 22a5 /usr/share/X11/xkb/

You can either add another layout or to define custom compose sequence.



Re: How to insert symbols into emails

2024-01-30 Thread fxkl47BF
On Tue, 30 Jan 2024, Franco Martelli wrote:

> On 30/01/24 at 01:14, fxkl4...@protonmail.com wrote:
>> so i defined my compose key
>> in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
>>   
>> how do i type this
>>
>
> I dunno if it's possible to type it using the COMPOSE key, however as
> workaround you can install "gucharmap" if your desktop is GTK based or
> "kcharselect" if your desktop is KDE, then search the character by name
> (I-BEAM) then copy into the clipboard, finally create your own custom
> ~/.XCompose and define your key sequence to associate i.e. 
>   : "⌶" as explained in the Debian wiki:
>
> https://wiki.debian.org/XCompose

thanks
that helps
in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
   : "⌶"U2336 # ⊥ ⊤ APL FUNCTIONAL SYMBOL I-BEAM
i can directly enter the symbol above using the U2336 value without a compose 
key
ctrl + shift + u and type 2336 and enter



Re: How to insert symbols into emails

2024-01-30 Thread Max Nikulin

On 31/01/2024 03:36, Franco Martelli wrote:


It happens something strange, when I type "crocodile" into the search 
bar of "kcharselect" I get an empty square visualized, if I click to 
"Copy to clipboard" button and then paste to Thunderbird I can see the 
crocodile but not in "kcharselect" … does it depend on installed fonts? 
Any hints?


Certainly applications should have fallbacks to emoji fonts (depends on 
font rendering libraries) and you need to have fonts installed. Mozilla 
brings its own font. Do you have e.g. fonts-noto-color-emoji (dependency 
of fonts-recommended)?


Concerning the issue with Compose keys, it is a rather low level 
feature, so it should work for applications with proper support of 
Unicode. I have no issue with xterm. Diagnostics:


setxkbmap -print

and "xev"



Re: How to insert symbols into emails

2024-01-30 Thread Franco Martelli

On 29/01/24 at 23:31, Charles Curley wrote:

On Mon, 29 Jan 2024 22:02:20 +0100
Franco Martelli  wrote:


I read that for custom sequence I've to create a ~/.XCompose file,
but where can I find the character to map i.e. Greek letters: "α" "β"
"γ" ?


Try the gucharmap package. You look a character up by name, and copy it
into place. E.g. crocodile, .


It happens something strange, when I type "crocodile" into the search 
bar of "kcharselect" I get an empty square visualized, if I click to 
"Copy to clipboard" button and then paste to Thunderbird I can see the 
crocodile but not in "kcharselect" … does it depend on installed fonts? 
Any hints?


Thanks again, kind regards.

--
Franco Martelli



Re: How to insert symbols into emails

2024-01-30 Thread Franco Martelli

On 30/01/24 at 01:14, fxkl4...@protonmail.com wrote:

so i defined my compose key
in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
  
how do i type this



I dunno if it's possible to type it using the COMPOSE key, however as 
workaround you can install "gucharmap" if your desktop is GTK based or 
"kcharselect" if your desktop is KDE, then search the character by name 
(I-BEAM) then copy into the clipboard, finally create your own custom 
~/.XCompose and define your key sequence to associate i.e.  
  : "⌶" as explained in the Debian wiki:


https://wiki.debian.org/XCompose

Cheers,
--
Franco Martelli



Re: How to insert symbols into emails

2024-01-30 Thread Greg Wooledge
On Tue, Jan 30, 2024 at 11:00:47AM -0800, Van Snyder wrote:
> I configured several different Compose keys, for example Right-Alt, one
> at a time, using the KDE settings -> input devices -> keyboard ->
> advanced widget.
> 
> If I use them in XTerm, for example Compose-'-e to try to produce é, it
> locks up.

I don't use any desktop environment, just fvwm.  Compose ' e and
Compose e ' both work for me in xterm.

I don't have multiple Compose keys, though, nor do I understand how KDE's
method differs from xmodmap (which is what I use).



Re: How to insert symbols into emails

2024-01-30 Thread Van Snyder
On Tue, 2024-01-30 at 10:21 +0700, Max Nikulin wrote:
> > > > Those symbols are very nice, which tool have you used to insert
> > > > them?
> > > 
> > > Easy. I configured my CAPSLOCK key (which is useless IMO) to bemy
> > > X compose key. So entering COMPOSE-4-5 does ⅘, and COMPOSE-<-
> > > 3does ♥. You can even define your own compose seqs, like I did
> > > with♀ (COMPOSE-o-+) and others.
> > 
> > This is documented at  by the
> > way.

I configured several different Compose keys, for example Right-Alt, one
at a time, using the KDE settings -> input devices -> keyboard ->
advanced widget.

If I use them in XTerm, for example Compose-'-e to try to produce é, it
locks up. If I use them in nedit, I get a two-character sequence. If I
use them in Evolution or Firefox, it works fine.
It also works in Konsole, but my fingers know XTerm and so does my
.Xdefaults.

Does this only work in programs that work in UTF-8 instead of ASCII?




Re: How to insert symbols into emails

2024-01-30 Thread Franco Martelli

On 29/01/24 at 23:31, Charles Curley wrote:

On Mon, 29 Jan 2024 22:02:20 +0100
Franco Martelli  wrote:


I read that for custom sequence I've to create a ~/.XCompose file,
but where can I find the character to map i.e. Greek letters: "α" "β"
"γ" ?


Try the gucharmap package. You look a character up by name, and copy it
into place. E.g. crocodile, .


Thanks, as I'm on KDE desktop I've installed "kcharselect" it does the 
same thing. It was a bit hard to find it, first I've looked for "Similar 
packages" section in the "gucharmap" web page ¹  but I didn't find 
nothing related to QT applications then I performed an "apt search kde 
char" and I found it.


There is a thing that it hurts me a little, if you look at the section 
"Similar package" in the "kcharselect" web page ²  you'll find 
"gucharmap" but this is *not* true vice-versa.


Which guys takes care of section "Similar packages" into packages web 
pages? I think "kcharselect" must be added to "Similar packages" section 
of "gucharmap"!


Cheers,

¹ https://packages.debian.org/bookworm/gucharmap
² https://packages.debian.org/bookworm/kcharselect
--
Franco Martelli



Re: How to insert symbols into emails

2024-01-29 Thread Max Nikulin

On 29/01/2024 22:32, Greg Wooledge wrote:

On Mon, Jan 29, 2024 at 03:54:44PM +0100, to...@tuxteam.de wrote:

On Mon, Jan 29, 2024 at 03:29:57PM +0100, Franco Martelli wrote:

Those symbols are very nice, which tool have you used to insert them?


Easy. I configured my CAPSLOCK key (which is useless IMO) to be
my X compose key. So entering COMPOSE-4-5 does ⅘, and COMPOSE-<-3
does ♥. You can even define your own compose seqs, like I did with
♀ (COMPOSE-o-+) and others.


This is documented at  by the way.


In addition to what this page say, system-wide Compose key may be set 
among other keyboard configuration options


 dpkg-reconfigure keyboard-configuration

that adds to the XKBOPTIONS variable inside /etc/default/keyboard 
something like "compose:ralt". Desktop environments may save keyboard 
properties during first login and may ignore later adjustment of system 
configuration.


I have heard that xmodmap is obsolete and replaced by setxkbmap and 
xkbcomp. I am unsure concerning Wayland sessions. In addition, setxkbmap 
called directly would not work in GNOME, it is necessary to configure 
keyboard layouts and programmable switching between them requires D-Bus 
calls.


I use Compose key (and user-specific keyboard layout settings are 
disabled in KDE), however there are some alternatives.


- Gtk and Qt application may allow to input characters by Unicode code 
points: [Ctrl+Shift+u] and hex code.

- KDE has emoji selector [Win+.]

A few years ago I spent some time experimenting if I can use GNOME with 
keyboard layout switched directly by xkb. It is intentionally broken and 
some xkb features (e.g. layout switching by CapsLock/Shift+CapsLock). 
Hard-coded machinery causes e.g. temporary focus lost.


In addition, Input Method layer is mandatory, it is ibus by default. It 
may be another way to input various characters. There are e.g. emoji and 
LaTeX input methods. The latter allows to type characters using LaTeX 
commands. For me it was no go because I have not found a way to force US 
keyboard layout when such input method is selected. They are useless for 
non-lating layouts, so such configuration is rather inconvenient.


There was another feature: [Ctrl+Shift+e] emoji picker, likely provided 
by ibus (or maybe by GNOME).


gsettings get org.freedesktop.ibus.panel.emoji unicode-hotkey
gsettings get org.freedesktop.ibus.panel.emoji hotkey

(related gsettings commands are "describe" and "list-recursively").



Re: How to insert symbols into emails

2024-01-29 Thread fxkl47BF
so i defined my compose key
in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
  
how do i type this



Re: How to insert symbols into emails

2024-01-29 Thread Charles Curley
On Mon, 29 Jan 2024 22:02:20 +0100
Franco Martelli  wrote:

> I read that for custom sequence I've to create a ~/.XCompose file,
> but where can I find the character to map i.e. Greek letters: "α" "β"
> "γ" ?

Try the gucharmap package. You look a character up by name, and copy it
into place. E.g. crocodile, .


> 
> In "/usr/share/X11/locale/en_US.UTF-8/Compose" file the ALPHA char is 
> defined as:
> 
>  : "α"   U03B1 # GREEK SMALL 
> LETTER ALPHA
> 
> What stands for  ? 

Look at the Wikipedia entry for dead key.

> Could I have an example of custom 
> ~/.XCompose file for this letter, please?

https://wiki.debian.org/XCompose

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: How to insert symbols into emails

2024-01-29 Thread Greg Wooledge
On Mon, Jan 29, 2024 at 10:02:20PM +0100, Franco Martelli wrote:
> I read that for custom sequence I've to create a ~/.XCompose file, but where
> can I find the character to map i.e. Greek letters: "α" "β" "γ" ?

It's a bit of a chicken-and-egg problem, admittedly.  What I did was find
a web page that had these characters on it, and then copy/pasted them.

> In "/usr/share/X11/locale/en_US.UTF-8/Compose" file the ALPHA char is
> defined as:
> 
>  : "α"   U03B1 # GREEK SMALL LETTER
> ALPHA
> 
> What stands for  ?

That's a new one to me.  Presumably there must exist some keyboard,
somewhere, which has such a key.

If that's the route you want to take, and if you don't have this key,
then you'll use xmodmap to remap something to become dead_greek.  One of
the Alt or Super keys, for example.


seems to have some partial answers you can use as a starting point.

I simply went with this instead:

   : "α"
   : "β"
   : "γ"
   : "δ"

and so on.



Re: How to insert symbols into emails

2024-01-29 Thread Franco Martelli

On 29/01/24 at 16:32, Greg Wooledge wrote:

On Mon, Jan 29, 2024 at 03:54:44PM +0100, to...@tuxteam.de wrote:

On Mon, Jan 29, 2024 at 03:29:57PM +0100, Franco Martelli wrote:

Those symbols are very nice, which tool have you used to insert them?


Easy. I configured my CAPSLOCK key (which is useless IMO) to be
my X compose key. So entering COMPOSE-4-5 does ⅘, and COMPOSE-<-3
does ♥. You can even define your own compose seqs, like I did with
♀ (COMPOSE-o-+) and others.


This is documented at  by the way.



Thanks Greg, that was what I'm looking for. I chose the right Alt key as 
"compose" key, in KDE it was very simple it's a checkbox to enable in 
systemsettings, as explained in the link that you provided.
I read that for custom sequence I've to create a ~/.XCompose file, but 
where can I find the character to map i.e. Greek letters: "α" "β" "γ" ?


In "/usr/share/X11/locale/en_US.UTF-8/Compose" file the ALPHA char is 
defined as:


 : "α"   U03B1 # GREEK SMALL 
LETTER ALPHA


What stands for  ? Could I have an example of custom 
~/.XCompose file for this letter, please?


Thanks in advance, best regards.
--
Franco Martelli



Re: How to insert symbols into emails (was: Re: Monospace fonts, Re: Changing The PSI Definition)

2024-01-29 Thread Bret Busby

On 29/1/24 22:54, to...@tuxteam.de wrote:

On Mon, Jan 29, 2024 at 03:29:57PM +0100, Franco Martelli wrote:

On 26/01/24 at 20:50, David Wright wrote:

I'll give a shout-out for Hack,¹ which I can't fault for use in
xterms. Comparingxterm -geometry 80x25+0+0 -fa hack -fs 16
with   xterm -geometry 80x25+0+0 -fa inconsolata -fs 18
(to make the sizes roughly the same), I find the inconsolata
stroke width on the basic Roman alphabet is a little spindly.

Other criticisms are that the stroke widths (and even the size)
later in the table (eg 0x256–1312) are thicker or larger, and
many single-width characters are slightly oversize and get
truncated at the top & right (eg Ŵ at 0x372, Lj 456). Mixing
fractions is ugly, too: ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞. The ‘’ quotes
are pretty, though.


Those symbols are very nice, which tool have you used to insert them? I'm
using Thunderbird for my emails but I've to enable "Compose message in HTML"
to have a small subset of symbols, for me isn't enough. I'm using KDE
desktop.


Easy. I configured my CAPSLOCK key (which is useless IMO) 


With the CAPSLOCK key, I simply get a special switchblade style knife 
that I use as a letter opener, and use the point to remove that 
particular key, as I have found the key to be harmful.



Bret Busby
Armadale
Western Australia
(UTC+0800)
.



Re: How to insert symbols into emails

2024-01-29 Thread davenull

Hello,

On 2024-01-29 15:29, Franco Martelli wrote:

On 26/01/24 at 20:50, David Wright wrote:

I'll give a shout-out for Hack,¹ which I can't fault for use in
xterms. Comparingxterm -geometry 80x25+0+0 -fa hack -fs 16
with   xterm -geometry 80x25+0+0 -fa inconsolata -fs 18
(to make the sizes roughly the same), I find the inconsolata
stroke width on the basic Roman alphabet is a little spindly.

Other criticisms are that the stroke widths (and even the size)
later in the table (eg 0x256–1312) are thicker or larger, and
many single-width characters are slightly oversize and get
truncated at the top & right (eg Ŵ at 0x372, Lj 456). Mixing
fractions is ugly, too: ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞. The ‘’ quotes
are pretty, though.


Those symbols are very nice, which tool have you used to insert them?
I'm using Thunderbird for my emails but I've to enable "Compose
message in HTML" to have a small subset of symbols, for me isn't
enough. I'm using KDE desktop.

Thanks in advance, best regards.


You shouldn't need HTML email to have fractions, they are part of 
Unicode.

You don't need any specific tool to insert them either.

But you do need to enable/define Compose key, if it's not enabled in 
your system already


You get those by Compose key + 1 + 2 should produce ½. Compose key + 1 + 
3 gives you ⅓, Compose key + 2 + 5 outputs ⅖… and so on, works for ⅚, ⅞… 
as well. Basically for whatever fraction that is part of Unicode.


And since it's Unicode, it also works outside of email/web/HTML. 
Plaintext file included.




Re: How to insert symbols into emails (was: Re: Monospace fonts, Re: Changing The PSI Definition)

2024-01-29 Thread Greg Wooledge
On Mon, Jan 29, 2024 at 03:54:44PM +0100, to...@tuxteam.de wrote:
> On Mon, Jan 29, 2024 at 03:29:57PM +0100, Franco Martelli wrote:
> > Those symbols are very nice, which tool have you used to insert them?
> 
> Easy. I configured my CAPSLOCK key (which is useless IMO) to be
> my X compose key. So entering COMPOSE-4-5 does ⅘, and COMPOSE-<-3
> does ♥. You can even define your own compose seqs, like I did with
> ♀ (COMPOSE-o-+) and others.

This is documented at  by the way.



Re: How to insert symbols into emails (was: Re: Monospace fonts, Re: Changing The PSI Definition)

2024-01-29 Thread Michael Grant
On Mon, Jan 29, 2024 at 03:29:57PM +0100, Franco Martelli wrote:
> On 26/01/24 at 20:50, David Wright wrote: > I'll give a shout-out for Hack,¹
> which I can't fault for use in > xterms. Comparing xterm -geometry 80x25+0+0
> -fa hack -fs 16 > with xterm -geometry 80x25+0 Sangu verification:
> ⓘ No issues found, please report it if otherwise
> Request analyst action Verified by Sangu
> On 26/01/24 at 20:50, David Wright wrote:
> > I'll give a shout-out for Hack,¹ which I can't fault for use in
> > xterms. Comparingxterm -geometry 80x25+0+0 -fa hack -fs 16
> > with   xterm -geometry 80x25+0+0 -fa inconsolata -fs 18
> > (to make the sizes roughly the same), I find the inconsolata
> > stroke width on the basic Roman alphabet is a little spindly.
> >
> > Other criticisms are that the stroke widths (and even the size)
> > later in the table (eg 0x256–1312) are thicker or larger, and
> > many single-width characters are slightly oversize and get
> > truncated at the top & right (eg Ŵ at 0x372, Lj 456). Mixing
> > fractions is ugly, too: ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞. The ‘’ quotes
> > are pretty, though.
> 
> Those symbols are very nice, which tool have you used to insert them?
> I'm using Thunderbird for my emails but I've to enable "Compose message
> in HTML" to have a small subset of symbols, for me isn't enough. I'm
> using KDE desktop.
> 
> Thanks in advance, best regards.

I bet this has come up before.  I'll tell you what I did to solve
this.

For the most part, I use Debian on servers and I access them through a
windows desktop, so for me, the solution starts on Windows.  There's
different keyboards you can configure on windows but none of them get
you at arbitrary unicode characters.  What I did do was use a program
named kbdedit which allowed me to craft a key mapping for my keyboard
so I could create the various keys I wanted to use, and for the
characters that I don't use regularrly, I just copypaste the code from
either a web page or from kbdedit into the window, be that putty or ms
word.

What I did was create a heavily compose-key key mapping.  I use the
right hand alt key as the compose key.  So for me ½ is simply alt-1
2.  The accented letters like é is just alt-e '.

Is there a way to create a similar keyboard mapping in X-windows on
debian based systems?

I've often wondered what a "full unicode keyboard" might look like.
Unfortunately composing only gets you so far.  There's definitely some
common characters you can do by composing 2 characters logically but
it's far far from complete.  I do wonder if someday we'll see larger
physical keyboards with some extra keys at the top to eventually
access all characters via some logical interface rather than having to
know their unicode code point.

Michael Grant


signature.asc
Description: PGP signature


Re: How to insert symbols into emails (was: Re: Monospace fonts, Re: Changing The PSI Definition)

2024-01-29 Thread tomas
On Mon, Jan 29, 2024 at 03:29:57PM +0100, Franco Martelli wrote:
> On 26/01/24 at 20:50, David Wright wrote:
> > I'll give a shout-out for Hack,¹ which I can't fault for use in
> > xterms. Comparingxterm -geometry 80x25+0+0 -fa hack -fs 16
> > with   xterm -geometry 80x25+0+0 -fa inconsolata -fs 18
> > (to make the sizes roughly the same), I find the inconsolata
> > stroke width on the basic Roman alphabet is a little spindly.
> > 
> > Other criticisms are that the stroke widths (and even the size)
> > later in the table (eg 0x256–1312) are thicker or larger, and
> > many single-width characters are slightly oversize and get
> > truncated at the top & right (eg Ŵ at 0x372, Lj 456). Mixing
> > fractions is ugly, too: ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞. The ‘’ quotes
> > are pretty, though.
> 
> Those symbols are very nice, which tool have you used to insert them? I'm
> using Thunderbird for my emails but I've to enable "Compose message in HTML"
> to have a small subset of symbols, for me isn't enough. I'm using KDE
> desktop.

Easy. I configured my CAPSLOCK key (which is useless IMO) to be
my X compose key. So entering COMPOSE-4-5 does ⅘, and COMPOSE-<-3
does ♥. You can even define your own compose seqs, like I did with
♀ (COMPOSE-o-+) and others.

The nice part is that it works for /all/ X11 applications, even
in a plain old xterm (I'm writing this mail in vim in an xterm).

Cheers
-- 
t


signature.asc
Description: PGP signature