On Tue, 31 Jul 2001, Manish Jethani wrote:
I would like to know how I can type special characters, like the copyright and trademark symbols, on the terminal. There must be a set of key combinations documented somewhere. I believe these characters fall within the ASCII range.
Please don't give emacs-specific solutions. I don't use emacs.
No. These characters don't fall within ASCII range. In fact copyright symbol has Unicode value U+00A9 and TradeMark symbol has Unicode value U+2122. Not all fonts contains these characters. So first of all make sure that your font contains these characters.
If you want non-X solution then you can define a keyboard map and load it using 'loadkeys' utility. In your keyboard map define a compose key as follows : alt keycode 100 = Compose
You can see keycode of a particualr key by using 'showkey' utility. Here we are using Alt and AltGr key combination (Left and Right Alt keys together) as combining key.
Then you can define your compose defination as compose 'c', 'o' to copyright
Instead of creating new keyboard map, you can use an existing keyboard map by sending output of 'dumpkeys' to some file and then append the above two lines to that file.
e.g., dumpkeys > mykeyboard.map
Now load the keyboard map using loadkeys mykeyboard.map
Finally to type copyright symbol, press compose key (Alt AltGr combination in this case), followed by 'c' and then 'o'.
For more information see man keymaps man showkey man dumpkeys man loadkeys
In X You can see all glyphs in your font by running xfd -fn "<your XLFD font name>"
XLFD (X Logical Font Description) font name is that which you can see by running 'xlsfonts'.
If you are using Unicode font then you can easily bind this Unicode value to some key and then use that keyboard map to type that particular character.
If you are not using Unicode font then you must know which character code is mapped to that glyph code and then bind that character code value to some key code.
Apart from this there is a concept of combining characters. You can use xkb utility to load a keyboard map in which you have predefined combining characters and a combining key. Load that particular keyboard map. XIM (X Input Method) will take care of these combining characters.
- Keyur.