Using input methods
CIN-file input methods are usable in X11 and in my user-space virtual terminals. One of the commonly-collected ones, greek.cin
, has the mu character. One simply enters m
(lower case) and it is the only conversion.
One can modify greek.cin
to add micro, providing a second conversion, although visually it will be quite confusing, making it hard to select the correct one during conversion selection, if they both map from m
. A better conversion would map micro
to U+00B5:
micro μ
Using the ISO 9995 common secondary group
Your X11 keyboard map or your virtual terminal might not implement this, but if it does there is a standard country-independent key sequence (of two key chords) for the mu character defined by ISO/IEC 9995: ⇨ Group 2 Select B07
- ⇨ Group 2 Select is conventionally the chord ⇧ Level 2 Shift+⇮ Level 3 Shift because the USB HID specification and others lack a code for a proper ⇨ Group 2 Select key and such a key does not exist on most keyboards.
- ⇮ Level 3 Shift is usually engraved ⌥ Option or ⇮ AltGr on 105/106/107/109-key keyboards or ⎇ Alt on 104-key keyboards.
- B07 is the standard ISO/IEC 9995 notation for a physical position on row "B" and column "07", and the key there is usually engraved M.
Where implemented, this so-called common secondary group of ISO/IEC 9995 is not supposed to vary by the selected country's layout, and is always available.
However, there is no common secondary group sequence for the micro prefix character.
Using whatever chord is defined in your keyboard layout
The specifics of keyboard layouts are beyond the scope of this answer, and there are plenty of answers here dealing with them.
Précis:
There is a keyboard layout for X11 applications, there is a possibly related keyboard layout for kernel virtual terminals (if your operating system has such), and there is are keyboard layouts for user-space virtual terminals (if you are using such). Layouts generally provide such characters as a chord with ⇧ Level 2 Shift or ⇮ Level 3 Shift in conjunction with a main keypad key.
Some X11 keyboard maps furthermore define (as an optional addendum) a compose key which begins key sequences (of multiple key chords) that map to such characters. In the conventional X11 composition set, as documented by David Monniaux years ago, the mu character is the sequence Compose M U or the sequence Compose / U. Note that it is conflated with the micro prefix character.
Consult your VT and X11 keyboard maps for information about what chord is mapped, if any. Check your configuration for whether you have enabled the compose key option in X11.
Examples:
The ch
, de
, it
, nl
, and no
virtual terminal keyboard maps in FreeBSD provide the mu character as the chord ⇮ Level 3 Shift+B07 (M):
% sed -n -e '2,5p;/0xb5/p' /usr/share/vt/keymaps/de.kbd /usr/share/vt/keymaps [pts/4.10009.1]
# alt
# scan cntrl alt alt cntrl lock
# code base shift cntrl shift alt shift cntrl shift state
# ------------------------------------------------------------------
050 'm' 'M' cr cr 0xb5 0xb5 cr cr C
%
But other maps either do not have it or define a different chord. In the fr
keyboard map it is ⇧ Level 2 Shift+C12 (EUROPE1):
% sed -n -e '2,5p;/0xb5/p' /usr/share/vt/keymaps/fr.kbd /usr/share/vt/keymaps [pts/4.10011.1]
# alt
# scan cntrl alt alt cntrl lock
# code base shift cntrl shift alt shift cntrl shift state
# ------------------------------------------------------------------
043 '*' 0xb5 nop nop '#' '~' nop nop O
%
And it is not mapped in the uk
keyboard map at all. Nor do any of them have the micro prefix character.
Other methods
Other methods are specific to application input handling libraries or to particular terminal emulators, whereas input methods and X11/VT keyboard maps are not application-specific.
Some terminal emulators provide other ways of entering characters, by their Unicode code points. Readline can of course be configured to map input sequences to this character, as also can ZLE. And you have already mentioned VIM in the question.
Further reading
μs
. – JdeBP Dec 11 '18 at 13:46M-x set-input-method RET greek
andC-x RET C-\ greek
will set emacs to a greek keyboard where the usual place form
is the greek letterμ
(and alpha isa
beta isb
, etc.). – Dec 11 '18 at 13:50