emacs keyboard bindings
Wednesday, 2. May 2007, 20:46:30
For quite some time I have been using my own Emacs Keyboard Bindings in Opera. Time to share (v 0.1).
The basic idea is to have frequently used bindings quickly accessible by one-key bindings in both the browser and the mailer, and reserve simple prefixes for subgroups of actions, more complex prefixes for more rarely used bindings. Models have been Emacs itself, some text browsers (and emacs-w3m) and some mail readers (and Gnus). Not all the functionality could be mapped one-to-one, and not everything I have chosen to map directly.
I follow the Emacs convention for key combinations and sequences, but use Ctrl and Alt instead of C and M. Keys that are to pressed simultaneously are connected with a dash (-), and keys following each other are to be pressed in sequence.
Browsing
For the basic browsing functionality the following bindings are available:
Editing
In editing context I use Emacs bindings (including Ctrl-w for cutting, and not for closing the active tab, as the binding in the default configuration does):
Mail
The main bindings in mail view are simple and straight-forward:
And last but not least,
A more complete list of bindings is also available with Ctrl-h b.
Note:
Due to Opera's handling of bindings, it might be that you need to fix some of the shortcuts: they are commented in the INI file. The commented out version is what the binding is supposed to be, and you might need to adapt this to your keyboard layout. One example: Ctrl-_ is the binding for undo, but on a US keyboard layout you'll need the following in your INI file:
Enjoy - and feedback welcome!
Update:
Some updates in mail bindings, and other small fixes.
Update 2:
Some more minor fixes, and you can now also get it from the opera keyboard setups section in the community.
Update 3:
A few more minor fixes and some more bindings (thanks petteri). 2007-05-22
The basic idea is to have frequently used bindings quickly accessible by one-key bindings in both the browser and the mailer, and reserve simple prefixes for subgroups of actions, more complex prefixes for more rarely used bindings. Models have been Emacs itself, some text browsers (and emacs-w3m) and some mail readers (and Gnus). Not all the functionality could be mapped one-to-one, and not everything I have chosen to map directly.
I follow the Emacs convention for key combinations and sequences, but use Ctrl and Alt instead of C and M. Keys that are to pressed simultaneously are connected with a dash (-), and keys following each other are to be pressed in sequence.
Browsing
For the basic browsing functionality the following bindings are available:
g prompt for a URL c copy URL of document u copy URL of selected link e edit URL of document E edit URL of selected link h go to homepage n go forward b go back r reload a add URL of document to bookmarks s subscribe to feed
Editing
In editing context I use Emacs bindings (including Ctrl-w for cutting, and not for closing the active tab, as the binding in the default configuration does):
Ctrl-w cut Alt-w copy Ctrl-k cut to end of line Ctrl-y paste Shift-ins paste PRIMARY (mouse selection) Ctrl-u clear Ctrl-_ undo
The main bindings in mail view are simple and straight-forward:
Shift-g retrieve new mail n next mail p previous mail k mark mail as read m compose new mail r reply to mail Ctrl-c Ctrl-c send message
And last but not least,
Ctrl-x Ctrl-s save Ctrl-x Ctrl-c quit Opera
A more complete list of bindings is also available with Ctrl-h b.
Note:
Due to Opera's handling of bindings, it might be that you need to fix some of the shortcuts: they are commented in the INI file. The commented out version is what the binding is supposed to be, and you might need to adapt this to your keyboard layout. One example: Ctrl-_ is the binding for undo, but on a US keyboard layout you'll need the following in your INI file:
- ctrl shift=Undo
Enjoy - and feedback welcome!
Update:
Some updates in mail bindings, and other small fixes.
Update 2:
Some more minor fixes, and you can now also get it from the opera keyboard setups section in the community.
Update 3:
A few more minor fixes and some more bindings (thanks petteri). 2007-05-22
- ØØ -
By NoteMe, # 3. May 2007, 13:35:34
By csant, # 3. May 2007, 13:46:04
main window (these are nice since the you can nicely move on page):
ctrl p = srcoll up
ctrl n = scroll down
ctrl b = scroll left
ctrl f = scroll right
alt < = go to start
alt < shift = go to end
ctrl v = same as pagedown key
alt v = same as pageup key (conflicts with some menu)
edit widget:
alt-d = delete word (this one I'm using a lot, strange that you don't have it)
I would suggest that some kind of cycle tabs with ctrl-x-b would also be neat.
Add these bindings and the emacskey file will truly rock
By petteri, # 22. May 2007, 20:36:24
- ØØ -
By NoteMe, # 22. May 2007, 20:54:30
Some remarks:
I am also still struggeling with various Ctrl-x prefixed stuff...
By csant, # 22. May 2007, 21:41:21
Originally posted by csant:
Now that makes perfect sense (at least in my world). Then again, I have never done any changes to Opera like that before. A quick test shoed me that changing the language file gave result (ie. -1486159215="&1 File"), but should it be possible by changing the menu.ini files too? I can't see I have stumbeled over anything of interes in any of those.
Well, it is night time++ in Oslo now. And work tomorrow, so need to have an other look at this an other day.
- ØØ -
By NoteMe, # 22. May 2007, 22:57:40
By Valgrind, # 23. May 2007, 08:25:04
I have been thinking of making different setups for emulation of various mailers, but have not made up my mind yet.
By csant, # 23. May 2007, 10:27:39
I have one minor problem, the undo combination. It seems to work in the addresbar but not in the text widget (like in this comment form).
Also one thing that is missing is marking a region, which is the same thing as selecting something. The default behavior for this in Opera is hold shift and then move around with arrow keys to paint the selection. I would guess that it is not possible to change this to behave like it does in emacs (ctrl-space and then move around and select things then again ctrl-space to end selecting).
By petteri, # 23. May 2007, 15:03:38
By petteri, # 23. May 2007, 15:11:58
I'll look into the undo issue tomorrow.
File updated. Thanks for input!
By csant, # 23. May 2007, 17:57:50