3

I'd like to shortcut some very often used keystroke combinations in spacemacs to my umlauts (as they are unused otherwise). I mapped all my umlauts in vim easily, so I thought, this should be easy in spacemacs, too.

I tried to define (global-set-key [?ä] 'helm-projectile-switch-to-buffer) also with "ä", but this does not recognice the ä as it as non-ascii character. (In the end I might want to define only C-ä or only set in evil-normal-states), but I just wanted to get something running.

The .spacemacs file is already encoded as utf-16 (don't know whether it's good or not). I used emacs 25.2.2 with spacemacs Release 0.200.13.x on my ubuntu 18.04.

I also tried to write [? and press C-q and then pressed ä] as described somewhere. But did not change anything. Also if I run od -ta from command line, I see that I would get an ASCII sequence for something like F2, but not for ä.

Drew
  • 29,895
  • 7
  • 74
  • 104
hanfried
  • 31
  • 1

1 Answers1

0

I believe the solution you want is:

(global-set-key (kbd "ä) 'helm-projectile-switch-to-buffer) 

I find that specifying the key sequences using the kbd function to be clearest way to specify key bindings.

Trey Jackson
  • 73,529
  • 11
  • 197
  • 229