The best way to do it is in the keyboard configuration.
I don't know if you can set a custom shortcut to print the character in your jabber client, but then it would be just for that application. As for Awesome : it's a window manager, so it's not its job.
How to input it (or any unicode character) in some (GTK at least) applications :
Ctrl+Shift+U then 2E2E (the hexadecimal code).
How to configure the keyboad to get it elsewhere too :
xmodmap
is one way, but it's being deprecated in favor of Xkb even if Xkb configuration can look more complex. But you asked for arcane incantations :D
setxkbmap -print
prints the keymap in use. You can send that into a file to use it as base for your new keymap. (Skip to exemple below for the quick version of "how").
xkbcomp
is an utility that can be used to compile and send a keymap to the X server.
xkbcomp $DISPLAY keymap.dump
will dump the current configuration in the file keymap.dump
. It's quite long as it is the same as previously, but with the values obtained from combining the include
d elements. It can be useful to look up the names that are given to the keys. We need the name to assign another symbol to a key. You could also modify and use it directly, but you can also use the includes and just redefine what you want. The include
are files in /usr/share/X11/xkb/
, in directories corresponding to the sections.
The keymap file has multiple sections :
xkb_keycodes
: the part that maps keyboard X keycodes to a key name used in other sections. You can get the X keycode with xev
and find the associated name in this part.
xkb_types
: the part that describe types and which level correspond to which keyboard modifiers (Shift, Control, Alt, any combination of those, etc ..)
xkb_compatibility
: For "applications that aren't Xkb aware", from what I've read .. I'm not sure what goes here.
xkb_symbols
: the part that maps the key names to keysyms, and the one where we'll rewrite one of the definitions to add that unicode character. You can see the current definition of the key you want to use.
xkb_geometry
: the physical keyboard shape .. not sure what uses that.
If you look at key definitions in the dumped keymap, you'll see they have an associated type. The type of the key determine which modifiers are available and corresponding to which level. The combination of key and level correspond to a keysym. The type is one defined in the xkb_types
section.
If you don't specify another type when redefining the key, it will be the one defined in the included xkb_symbols
map.
If I take for example my I key, there are four levels, corresponding to : just the key, key + Shift, key + AltGr, key + Shift+AltGr.
For the group, if you aren't using more than one layout (in your keyboard configuration), you probably have just one, and don't need to specify it. (You can use multiple groups to switch between key definitions associated with that group).
Here is an example of modified keymap file :
xkb_keymap {
xkb_keycodes { include "evdev+aliases(azerty)"};
xkb_types { include "complete"};
xkb_compatibility {include "complete"};
xkb_symbols {
include "pc+fr+inet(evdev)"
key <AD08> {[ i, I, U2E2E, idotless]};
key <AD09> {[ o, O, oslash, U262F]};
};
xkb_geometry { include "pc(pc104)"};
};
With this keymap AltGr+I gives ⸮ and Shift+AltGr+O
gives ☯.
To set the keymap :
xkbcomp mykeymap.xkb $DISPLAY
The Archlinux wiki have more details, and some other links at the end.