WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Winbatch Studio
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Disable Studio Keyboard Shortcut

 Keywords: Disable WinBatch Studio Keyboard Shortcut NUMPAD Minus - Hyphen Dash {NUMPAD-} Hotkey Context Menu

Question:

Is there a way to disable the functionality that the Winbatch Studio Editor has that deletes the current line when the user presses the hyphen key on the 10-key pad?

It seems pretty dangerous to me. I have several times lost lines of code after hitting what seems like an innocent key on the numeric keypad.

It would be nice if it could be turned off.

Answer:

Currently there is no direct way to modify the keyboard shortcuts defined by WinBatch Studio.

However, here is a workaround to disable the NUMPAD Minus keyboard shortcut.

In addition to the standard methods for executing a context menu item in WinBatch Studio (double-clicking on it, highlighting it and pressing Enter, or using Alt the underlined letter), you can define optional hotkeys for your menu items. Hotkeys will cause an item to be executed immediately upon pressing the designated hot key. Hotkeys are defined by following the menu item with a backslash (\) and then the hotkey

The hotkey used in the WinBatch Context Menu ( wsp-user.mnu ) trumps the predefined keyboard shortcuts in WinBatch Studio.

Therefore in order to disable NUMPAD Minus keyboard shortcut, you can set up a dummy Context Menu option ( that doesn't display ) with the same NUMPAD Minus hotkey.

  1. Open wsp-user.mnu in WinBatch Studio.

  2. Add the lines ( being careful with indentation ):
    @Ignore_Numpad_Minus \ {NUMPAD-}
         Ignore_Numpad_Minus = 1
    
    Note: the @ sign at the beginning of the menu title, tells the menu option to NOT display.

  3. After you have edited your context menu, it must be reloaded into memory for the changes to take effect. The menus will be reloaded automatically the next time you execute *any* menu item or you can simply close then re-open WinBatch Studio.

Article ID:   W18450
Filename:   Disable Studio Keyboard Shortcut.txt
File Created: 2010:04:21:09:35:16
Last Updated: 2010:04:21:09:35:16