Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs keybinding for "\C-' "

Tags:

emacs

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".

like image 538
Nathaniel Flath Avatar asked Dec 20 '08 02:12

Nathaniel Flath


2 Answers

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)
like image 137
ShreevatsaR Avatar answered Nov 08 '22 06:11

ShreevatsaR


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).

like image 43
Yoo Avatar answered Nov 08 '22 05:11

Yoo