Menu

Can I shortcut to the grey numpad keys?

2007-04-14
2012-11-13
  • Nobody/Anonymous

    I'm used to an old editor that let me map shortcuts to the keys on the numpad on the right side of my keyboard, specifically, the +, -, Enter, and * keys.  But of course I don't want to override what those keys do on the normal keyboard (big enter, shift-8, etc).  Can I do this?  Thanks, CB.

     
    • MJG

      MJG - 2007-04-20

      I know you can directly map the numpad keys that are numbers, by using them as shortcut keys on macros.  So you can create a macro that performs the task you want, then assign it to a ctrl-NUMPAD0, say.

      *** Disclaimer for the following:  I don't warrant this, and the developers of NPP should not be asked about this should you change their configuration files directly. ***

      I've also edited NPP's shortcuts.xml file to add others based on the virtual keys (the ones prefixed with "VK_") found in the Microsoft SDK header file winuser.h.

      _IN SOME CASES_, you can also remove the ctrl, alt, and/or shift prefix on these macros after assigning them inside Notepad++ by editing that shortcuts.xml file and changing the corresponding key qualifier from "yes" to "no".  The numpad numbers 0 through 9 have virtual key codes of 96 through 105.  The asterisk is 106, the plus is 107, the minus is 109, the decimal is 110, and the slash is 111, according to winuser.h (I converted hex to decimal here, which is what NPP expects).

      At the moment, I don't know what virtual code represents the keypad Enter key.  There's VK_SELECT (0x29, 41 decimal), VK_EXECUTE (0x2B, 43 decimal), and VK_SEPARATOR (0x6C, 108 decimal), but no VK_KP_ENTER or similar.  --Joel