# Alt as Meta Key in Emacs within Virtual Console



## deepblue (Jun 13, 2013)

Greetings!

I'm currently running FreeBSD without X. I am unable to make use of the "Alt" key as a the meta key under emacs. I believe this to be because the default use for the "Alt" key is switching between virtual terminals (Alt+F1...Alt+F8). I'd like to resolve this issue by assigning the window key (just to the left of alt on my keyboard) to the switch console function, thus freeing it up for use as the meta key under emacs.

Will this resolve the issue? What do I need to change to make this happen?

Thank you!


----------



## jrm@ (Jun 14, 2013)

One way (but I'm not sure if it's the cleanest way) to get it working is by creating your own keymap.  For example, copy /usr/share/syscons/keymaps/us.iso.kbd to something like /usr/share/syscons/keymaps/us.deepblue_mod.iso.kbd with the changes and in /etc/rc.conf add the line 
	
	



```
keymap="us.deepblue_mod.iso"
```


----------



## deepblue (Jun 15, 2013)

Thanks jrm!

It turns out there's actually a us.emacs.kbd keymap available in the keymaps directory. I set

```
keymap="us.emacs.kbd"
```
and it works just fine.

Thanks for your help.


----------

