How to type the # sign with a UK keyboard

MacOS X systems, as delivered in (at least) Astrophysics, have both UK keyboards and the British default keymappings. This Article is intended for those (like the author) who need to type "#include <stdio.h>" more often than "£1023.79".

This article has been adapted from "On Currency Symbols and Musical Notation" and "The Hash key in Aquamacs" from the old AstroWiki. My thanks to Ryan Houghton for contributing the latter.

Standard (British) keyboard mappings

Amongst other things, the standard keystroke mapping with a UK keyboard includes:

# Alt-3
£ Shift-3

This is tedious for those of us who use "#" on a rather more regular basis; it also doesn't work by default in AquaMacs.

The "#" key in Aquamacs

To enable Alt-3 as described above, go to "Options" -> "Option Key", and select "Meta & British". Please note that this may well have to be modified if you do the changing of keyboard mappings I describe next; also that GNU-EMACS appears to not require this.

Changing the Mappings

  • Go to "System Preferences" -> International" -> Input menu".
  • Scroll down the list, and click in the tickbox for US. The box "Show input menu in menu bar" should select itself.
  • Close Preferences.
  • Click on the Union Flag in the menu bar, near the clock.
  • In the pulldown menu, select US: the flag changes to the Stars and Stripes.


# Shift-3
£ Alt-3

If you wish to swap them back, click on the Stars and Stripes in the menu bar, and select British. If you need or desire to log onto multiple MacOS X systems, whether simultaneously or in turn, you'll probably find yourself repeating the above sequence on each, as the selection of multiple keymappings is one of those settings that doesn't follow one around between systems.

Please note: Terminal (and most other Aqua programs) will pick up keyboard-mapping changes with immediate effect; but X11 (alias XQuartz) only picks up this setting whenever it starts. Users of X programs will need to exit any and all said programs, and to restart X, for such changes to take effect in their programs.

Other symbols

Here is a slightly more complete table, which may be of interest to those using other currency symbols (or perhaps documenting trademark disputes).

# Alt-3 Shift-3
£ Shift-3 Alt-3
Cent Alt-4 Alt-4
Euro Alt-2 Shift-Alt-2
(tm) Shift-Alt-2 Alt-2

Please note that other systems (including Linux, if sufficiently well-trained) tend to put the Euro symbol on Right-Alt-4, and non-Apple keyboards are often enscribed accordingly.

BEWARE: Blindly typing Pretzel-Anything (using the key labelled "Cmd") often triggers toolbar-related meta-actions, whose consequences may be neither obvious nor benign. If you wish to research other nonstandard character keystrokes (eg to help document them here), or to discover what said meta-actions may be .... well, that's what the Web's for.

Categories: Apple | Astrophysics | HOWTO | Mac | OS X