Menu

Tip: How to Replace a Built-In Key Shortcut

kismert
2007-10-26
2012-11-13
  • kismert

    kismert - 2007-10-26

    I do web development, and all modern browsers use Ctrl-T to open a new Tab. N++ uses Ctrl-T to transpose lines -- perfectly reasonable, but I tripped over it enough to want to change it. I really wanted Ctrl-T to be equivalent to Ctrl-N (New file) in N++.

    Unfortunately, there seems to be no way in Settings -> Shortcut Mapper to turn off the Transpose Line shortcut, and add another New shortcut mapped to Ctrl-T.

    Fortunately, Macros came to the rescue. I simply recorded a new macro, hit Ctrl-N, and saved it with a shortcut of Ctrl-T. Macros are executed before built in key shortcuts, so this effectively turned off the native Transpose function.

    While the ideal might be to have a Shortcut Mapper that allows certain functions to be disabled, and duplicate shortcuts for other functions, Macros certainly get the job done.

    -Ken

     
    • DoGooder

      DoGooder - 2007-11-06

      The Shortcut Mapper needs to be fixed.

      It shouldn't allow multiple key sequences to be set to the same value and should tell you when you try to do that.

      And there should be a way to add shortcuts to existing menu items.

      It is also displaying shortcuts that have a blank name.

      And it doesn't look like the "delete shortcut" works.