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".
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)
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With