You are not logged in.

#1 2013-02-08 11:30:14

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

[Solved] Suggest a keyboard or something for entering special chars

Hello again! I can't find a convenient way to enter special characters into any text field I'm working with. Chars like "☂ ☔ ☁ ⚡ ⌁ ☇ ☈ ❄ ❅ ❆ ☃ ⋗ ⋘ ⋙ ⋚ ⋛ ⥱ ⥲ ⥳ ⥴ ⥵" (and typographical ones). Apparently there's no virtual keyboard with function to set keys to those chars instead of regular letters. So I need to copy and paste each character from HTML file when I need them. Does anyone of you paste these chars and found a better way?

Last edited by Mr. Alex (2013-02-09 18:07:46)

Offline

#2 2013-02-08 14:25:13

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,140

Re: [Solved] Suggest a keyboard or something for entering special chars

Mr. Alex wrote:

Hello again! I can't find a convenient way to enter special characters into any text field I'm working with. Chars like "☂ ☔ ☁ ⚡ ⌁ ☇ ☈ ❄ ❅ ❆ ☃ ⋗ ⋘ ⋙ ⋚ ⋛ ⥱ ⥲ ⥳ ⥴ ⥵" (and typographical ones). Apparently there's no virtual keyboard with function to set keys to those chars instead of regular letters. So I need to copy and paste each character from HTML file when I need them. Does anyone of you paste these chars and found a better way?

You might be interseted in the X input method, see https://help.ubuntu.com/community/ComposeKey . If you have no compose key, you can create it one. "setxkbmap -option compose:prsc" redefine the rarely used "Print screen" key as a compose key.

Offline

#3 2013-02-09 11:49:32

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: [Solved] Suggest a keyboard or something for entering special chars

I added "compose:ralt" to setxkbmap options, created "~/.XCompose" and saved

<Multi_key> <`> : "♫"

there.

Restarted Xorg.
Now, when I hit right Alt + "`" combo - nothing happens. But right Alt + "." + "." gives me ellipsis. Although I haven't specified it and as far as I understood, "~/.XCompose" substitutes compose file in /usr/share/X11 . What am I doing wrong? I only need what I specify in "~/.XCompose" and it doesn't even work yet.

Offline

#4 2013-02-09 16:06:10

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,140

Re: [Solved] Suggest a keyboard or something for entering special chars

Mr. Alex wrote:

What am I doing wrong?

Probably not reading the documentation in full details.
Content of .XCompose:

<Multi_key> <grave> : "♫"

To know that you must use grave, use xev.
To use in GTK application:

export  GTK_IM_MODULE="xim"

in ~/.profile (only tested with gtk2 apps, not sure about gtk3).

Last edited by olive (2013-02-09 16:07:36)

Offline

#5 2013-02-09 18:08:45

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: [Solved] Suggest a keyboard or something for entering special chars

Thanks. Looks like it works now. But

export GTK_IM_MODULE=xim

goes to /etc/profile.
Qt works here without any tinkerings but articles say that if Qt doesn’t work like GTK — add

export QT_IM_MODULE=xim

to /etc/profile.

Last edited by Mr. Alex (2013-02-09 22:23:34)

Offline

#6 2013-02-09 18:38:13

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: [Solved] Suggest a keyboard or something for entering special chars

Should “F12” and “Pause” keys work as compose keys if set in “setxkbmap”? Or it’s only for Ctrl and Alt?
I can’t get “Pause” key to work the way I make Alt to work as a compose key (using xev)...

UPDATE: looks like it’s not possible to use any key you want for “compose one”, only very restricted amount of them. Decided to go with right alt.

Last edited by Mr. Alex (2013-02-09 22:21:26)

Offline

#7 2013-02-09 23:02:22

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,140

Re: [Solved] Suggest a keyboard or something for entering special chars

Apparently, the key that can be set for compose, can be obtained by (again see the documentation):

cat /usr/share/X11/xkb/rules/base.lst | grep compose:

But I do not find a way to add an arbitrary key as the compose key (there should be some way, though...). The variable GTK_IM_MODULE should be put in the environment, /etc/profile put it system wide; normally ~/.profile just for you (but read man bash and it may also depends on your login manager).

Offline

Board footer

Powered by FluxBB