1

I'm reading the beginning of the Emacs manual on inserting text. It says you can run C-x 8 [ to insert a left single curly quote. That works.

In my init.el I have this:

(define-key global-map [(control t)] ctl-x-map)

I like that because I use a Dvorak keyboard layout, so C-t is easy to type. Usually that line takes commands that start with C-x and makes them available starting with C-t too. But it's failing with this C-x 8. If I do: C-t 8 [, it get a beep and nothing.

In contrast I can do both C-x b and C-t b to switch to a buffer.

Why does my define-key attempt work for most C-x commands but not C-x 8.

I'm running GNU Emacs 27.2 on macOS 12.

Drew
  • 75,699
  • 9
  • 109
  • 225
Rob N
  • 547
  • 2
  • 12

1 Answers1

2

C-x 8 [ and similar are defined in a different keymap, iso-transl-ctl-x-8-map.

What you need is this:

(define-key key-translation-map "\C-t8" 'iso-transl-ctl-x-8-map)

See the Elisp manual, node Translation Keymaps for more info.

Drew
  • 75,699
  • 9
  • 109
  • 225