Today I learnt that Emacs keyboard macros can just be strings in a keymap! (global-set-key (kbd "C-c h") "hello") Types the keys h, e, l, l, o in the current buffer, which might insert or do something else depending on the mode.