Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting fn key as Ctrl on Emacs

I am having difficulty in using Ctrl key on emacs. Because, fn key resides in the Ctrl key's location on my new keyboard.

What should I do to map fn to Ctrl on emacs?

like image 783
Ozgur Vatansever Avatar asked Jun 10 '11 21:06

Ozgur Vatansever


People also ask

What is RET key in emacs?

"RET" is the Return key while emacs runs in a terminal. and run emacs in terminal, your keybinding will have no effect. But the problem is, by binding (kbd "RET") , you are also binding (kbd "C-m") , regardless you run emacs in terminal or GUI.

What is the Fn modifier key?

The Fn key, short form for function, is a modifier key on many keyboards, especially on laptops, used in a compact layout to combine keys which are usually kept separate. It is typically found on laptops due to their keyboard size restrictions.


2 Answers

I believe this is controlled by the variable ns-function-modifier, however, as I don't use a laptop I haven't had the opportunity to play around with it.

I guess that you should set it to something like:

(setq ns-function-modifier 'control)
like image 129
Lindydancer Avatar answered Oct 22 '22 17:10

Lindydancer


There's a lovely new feature in EMACS 23 -- customize the group "ns" and you can set all the key mappings very conveniently.

like image 32
Charlie Martin Avatar answered Oct 22 '22 16:10

Charlie Martin