Posts [ 6 ]

Re: How to select from ContextMenuStrip without using the mouse?

Hi. I'm a long time visual studio + visual assist user. I've only recently started using vim at home for light coding on my macbook. I found ViEmu and it seems like it can greatly improve my productivity at work plus help me towards my goal of never having to use the mouse.

I've been using the trial version for about a week now and it's mostly fit into my daily workflow. One issue I do have though regards the "Goto Implementation" feature in Visual Assist (VAX). Before ViEmu, I would move the cursor over a keyword and press Alt + G (which is mapped to to VAssistX.GotoImplementation ) to goto that keywords declaration. If there were multiple possibilities, a ContextMenuStrip would pop up. And I could either use the keyboard arrows or the mouse to select between them.

However with ViEmu installed, the arrow keys no longer work. Once I press Alt + G, the options pops up. But then the focus goes back to the text editor. The arrow keys or hjkl move the cursor in the text editor. The only way to select an option from the popup is to use the mouse.

Do other people encounter this issue? Is there a solution that would enable me to use the keyboard to select an option? I posted a screenshot to show the issue.

Re: How to select from ContextMenuStrip without using the mouse?

Hi. Thanks for getting back to me. I tried the AutoHotKey suggestion and mapped the up/down arrow keys but it still does not select any entry in the context menu. Which makes sense because I can't use the normal arrow keys anyway since the context menu doesn't have focus. However, once that problem is resolved, I can see AutoHotKey being useful - since it allows me to avoid moving my hands to the arrow keys.

Re: How to select from ContextMenuStrip without using the mouse?

Ok. Actually, the right fix would be the following:

1) In ViEmu, intercept the Alt-G command in some way 2) When the command is triggered, put ViEmu in internal "passthrough mode". This will basically ViEmu inactive, such that arrow keypresses can go to VAX. 3) Detect a RETURN or ESC or mouseclick in this mode, and exit passthrough mode.

The toughest part here is detecting the VA command. If they have used VS's command routing system, it's easy to intercept. If they are processing keypresses directly, or doing it in some other way, it could range anywhere from difficult to impossible.

It's good to get the full background now. I'm taking note of this, and I'll try to look at it as time permits.