# Special characters



## poorandunlucky (Nov 27, 2017)

How do you input special characters?  Like on Winderps I could do (Left)Alt+(NumPad)0133 to get a special character...

I'm using KDE4 if that's meaningful...


----------



## free-and-bsd (Nov 27, 2017)

Compose key.


----------



## Beastie (Nov 27, 2017)

It's actually much better than Windows since you don't have to memorize dozens of alt codes that have no intrinsic meaning.

https://forums.freebsd.org/threads/12769/#post-75163


----------



## poorandunlucky (Nov 30, 2017)

free-and-bsd, Beastie: I don't mean those, I mean extended ASCII set...  I'm fine switching between en-US and fr-CA keyboard maps...

Also, I don't know what the solution to typing extended ASCII characters is going to be, but I'd rather remember four digits than the meta-position of a virtual character on a physical keyboard (i.e.: having to press Meta + Ctrl + Shift + A at the same time like it's a piano or something), I really don't mind [Press Alt] N N N N [Release Alt]...

There has to be a way other than using the character map and copying to clipboard... that's annoying...  It's only for maybe five or so characters I regularly use...


----------



## rigoletto@ (Nov 30, 2017)

You can always map your own custom keys using x11/xmodmap if necessary.


----------



## fscorrea (Dec 1, 2017)

lebarondemerde said:


> You can always map your own custom keys using x11/xmodmap if necessary.


What may become, depending on the case, a living nightmare, as with `kbdcontrol` and Linux `loadkeys` outside Xorg.



poorandunlucky said:


> free-and-bsd, Beastie: I don't mean those, I mean extended ASCII set...  I'm fine switching between en-US and fr-CA keyboard maps...
> 
> Also, I don't know what the solution to typing extended ASCII characters is going to be, but I'd rather remember four digits than the meta-position of a virtual character on a physical keyboard (i.e.: having to press Meta + Ctrl + Shift + A at the same time like it's a piano or something), I really don't mind [Press Alt] N N N N [Release Alt]...
> 
> There has to be a way other than using the character map and copying to clipboard... that's annoying...  It's only for maybe five or so characters I regularly use...


As for you, provided your case is indeed of "only five or so characterers", I would suggest:


*On System Console (SC or - preferably - VT):* patch `kbdcontrol` and create a custom.kbd, more or less the way lebarondemerde suggested but using the proper tools (`xmodmap` is meant for use inside Xorg);
*On Xorg:* most DEs have an "user-friendly" tool for adding keyboard shortcuts. That could be used with, for example, x11/xdotool to simplify the task of echoing/printing/pasting a char. This would require, of course, your knowledge of a command-line to add as the shortcut with its proper arguments.

P.S.: I would be reading this just in case, unless you already know your ways around it.

EDIT: Sorry, I didn't realize you're using KDE4 (which happens to be my favorite).
Go straight to System Settings and tweak custom shortcuts *taking care not to mess with the globals!*. Or, try to tweak around with dbus commands (I've only did this last one in KDE5, exactly to compensate for something that lacked from Plasma 4, but perhaps it would help in solving your issue).


----------



## aragats (Dec 1, 2017)

I used to create my one layout by copying the most a appropriate one from /usr/local/share/X11/xkb/symbols and adding 3rd and/or 4th level for the needed keys.
Then you can activate it by calling `setxkbmap my_keys` in ~/.xinitrc or one of DE's startup scripts.


----------



## vermaden (Dec 1, 2017)

There is also great tool for X11 shortcuts - *xbindkeys* - its both in packages and Ports.


----------



## free-and-bsd (Dec 1, 2017)

aragats said:


> I used to create my one layout by copying the most a appropriate one from /usr/local/share/X11/xkb/symbols and adding 3rd and/or 4th level for the needed keys.
> Then you can activate it by calling `setxkbmap my_keys` in ~/.xinitrc or one of DE's startup scripts.


Interesting  Will have to play with it when I have the time... So far my needs are satisfied with fr(oss) map, but it's not what I NEED -- it's what THEY have to offer.


----------

