Emacs Keybindings - Firefox: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
No edit summary
Line 20: Line 20:
<tr>
<tr>
<td>Ctrl+F</td>  
<td>Ctrl+F</td>  
<td>move forward a character</td>
<td>Go right one character</td>
</tr>
</tr>


<tr>
<tr>
<td>Ctrl+B</td>
<td>Ctrl+B</td>
<td>move left</td>
<td>Go left one character</td>
</tr>
</tr>



Revision as of 08:59, 16 October 2004

Firefox uses the GTK setting to determine whether Emacs-like/Readline-like keybindings are active in text fields. To enable these keybindings, add to ~/.gtkrc-2.0 the line:

gtk-key-theme-name = "Emacs"

If you use Gnome, you can set this using Desktop Preferences > Keyboard Shortcuts instead of editing the configuration file.

The shortcuts are often called Emacs keybindings, but they're actually more similar to keybindings in Readline. When these keybindings are enabled, they override the standard keybindings in Gnome and Firefox (when a text entry field has focus).

Ctrl+A Go to beginning of line
Ctrl+E Go to end of line
Ctrl+F Go right one character
Ctrl+B Go left one character
Ctrl+K Delete to end of line
Ctrl+U Delete entire line (different from readline, in which Ctrl+U deletes to the beginning of the line)
Ctrl+W Delete word, left
Ctrl+H Delete character, left (backspace)
Ctrl+D Delete character, right

Additional Readline keys not supported by Firefox:

Ctrl+T transpose characters
Ctrl+Y yank (like paste)
Ctrl+P previous line (like Readline's Up)
Ctrl+N next line (like Readline's Down)
Ctrl+S search
Ctrl+R reverse search
Ctrl+J return
Ctrl+M carriage return
Ctrl+L redraw