Other Key binding in Emacs

I'm trying to learn how to bind keys in Emacs, but it is a struggle...

Following an example here


i tried this Key Sequence, which seemed pretty straightforward

M-x global-set-key(kbd"<f11>")'calc) - (looks like an error but that is in the example.

When I press Enter I get [No match]

How do invoke F11?
 
How do invoke F11?
I just tried this and I had the same issue that F11 doesn't work for me either. I asked on the #emacs channel on IRC (you should join that channel as you'll get more help there if it's an emacs-related issue than you will on a FreeBSD forum) and it seems that some keys are 'stolen' by the WM that you're running. To check this and see whether emacs has actually bound the key, run M-x describe-key then press the F11 key. If there's no output then the binding didn't work. You can reset the way that your WM treats the F11 key in your settings somewhere depending on which DE you're running.

I also think that the command that you posted above wouldn't work anyway as you are missing spaces between some of the constituent parts of the key binding command. The command that you probably want is (global-set-key [f11] 'calc).

If you're just looking to bind calc to any key stroke and not F11 in particular then the following does work correctly: (global-set-key (kbd "C-c a") 'calc) and you can invoke calc using the keystrokes 'C-c a'.

It's also possible to join the #emacs channel on IRC through emacs itself using the M-x erc command. You should try it.
 
Back
Top