tags:

views:

223

answers:

3

How do you set a function to \C-' ? when I try to do :

(global-set-key "\C-'" 'myfunct)

it gives me "Invalid modifier in string".

+9  A: 

What is \C-'? Do you want something to happen when you type backslash+c+quote? Or do you mean C-' (control+quote)? If it's the latter (and I guess it is), then you should use

(global-set-key (kbd "C-'") 'myfunct)
ShreevatsaR
A: 

That was what I wanted, thanks!

Nathaniel Flath
+1  A: 

For any key sequence you want to use, press C-h k and then press the key sequence you want to use. Then it tells you the name of the key. That name is what should be used (with the code in the accepted answer).

RamyenHead