How to configure Microsoft Ergonomic Keyboard 4000 to use Visual Studio NavigateBackwords / Forward?

I bought the new Microsoft Ergonamic Keyboard 4000, and I want the back and forward buttons to launch View.NavigateBackwards ( Ctrl+ -) and View.NavigateForwards ( Ctrl+ Shift+ -).

By default, the keyboard sends Alt + Right / left arrow for these buttons, but I already have those that are mapped to different commands, so I don’t want to use it.

My first attempt was to edit the keyboard driver with the contrived file "commands.xml" and add

<Application UniqueName="HwndWrapper" >
        <C100 Type="5" KeySeq="ctrl -" />
        <C101 Type="5" KeySeq="ctrl shift -" />
</Application>

(since I saw that UniqueName should be the target window class, and according to Spy ++, "HwndWrapper" is the name of the window class devenv.exe).

This did not work unfortunately :( Any other ideas>

+3
source share
1 answer

I think your best way is to use AutoHotKey for this. This is a lightweight program that can be used for all types of keyboard scripts, and it is much more powerful than everything that comes with the keyboard initially. After you installed the application, execute the script that you must run (in this script you can also put any other keyboard setting, and while it works, they will all affect):

SetTitleMatchMode, 2 ; *** THIS LINE HAS TO BE THE FIRST IN THE SCRIPT FILE ***

#IfWinActive, Microsoft Visual Studio

sc169::           ;Forward
    Send, ^+-
    return

sc16A::           ; Back
    Send, ^-
    return

#IfWinActive

/ VS (ALT + SHIFT + CTRL + F6) AutoHotKey. , SHIFT + - ALT + SHIFT + - .

+3

Source: https://habr.com/ru/post/1791468/


All Articles