Jon Atkinson

I'm a technologist, with a long and varied history in high-end technical delivery and infrastructure management. I'm particularly interested in managing software teams, rapid application development, and scalability challenges.

Using the hash key in Emacs with a UK keyboard

26th November 2008

I've been using Emacs recently, and it took me a while to figure out how to make option-3 produce a hash symbol like other Cocoa applications.

This assumes you're using mac-key-mode like this:

(add-to-list 'load-path "~/.emacs.d/mac-key-mode/")
(require 'mac-key-mode)
(mac-key-mode 1)
(setq mac-option-modifier 'control)

To rebind the hash key, just drop the following in your .emacs:

(global-unset-key (kbd "C-3"))
(global-set-key (kbd "C-3") '(lambda() (interactive) (insert-string "#")))