[wingide-users] Key mapping.

Wingware Support support at wingware.com
Tue Jan 30 09:04:00 MST 2007

On Tue, 2007-01-30 at 02:38 -0700, SirJSR wrote:

> I have a hard time reaching up to the escape key to enter command
> mode, or should I say I don't want to reach that far.  This one thing
> kept me away from vi, vim, gvim for a long time.  And, I already have
> a little carpal tunnel syndrome going, and there's no way I am going
> to use Emacs---my hand wouldn't survive a weak. 
> In my C:\Program Files\Vim directory, in my "_gvimrc" I put this
> command, below:
> "map! ii <esc>" 
> ... which allows me to exit insert mode by pressing the i key twice.
> If you press the i key once, wait a second, then press the i key
> again, it does not take you out of insert mode, but types out "ii".
> But how many time does one need "ii".  So, the net effect is that the
> "i" key becomes kind of a toggle key.  Never have to take your hand of
> the keyboard, and only one finger has to reach just above the home
> row. 
> All kinds of way to do it:  http://www.vim.org/tips/tip.php?tip_id=285

You can't currently map ii in this way in Wing, but you can add other
key bindings.  Normally, this is done with the User Interface /
Keyboard / Custom Key Bindings preference.  However, that doesn't let
you enter the virtual mode indicators used in vi mode, so you'll have to
edit keymap.vi in your Wing installation.  You may want to keep your
additions in a separate file by using an import like this:

%include keymap.myvi

And then in the file keymap.myvi add something like:

'Insert-Kp_delete': 'enter-browse-mode'

You can easily find the key names using the Custom Key Bindings
preference.  Other alternatives that come to mind are:

'Insert-Kp_enter': 'enter-browse-mode'
'Insert-Kp_insert': 'enter-browse-mode'
'Insert-Ctrl-Space': 'enter-browse-mode'

Unlike the preference, this does require restarting Wing.

I saw someone recommended a keyboard as part of the solution on the page
you reference above.  I've got one of these:


While it doesn't address the problem you write about, it has made a huge
difference for me in general.

Hope that helps.

Stephan Deibel

Wing IDE for Python
Advancing Software Development


More information about the wingide-users mailing list