• Login
Community
  • Login

Is there any way to assign a Plugin's function to a hotkey?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 509 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    safetaco
    last edited by safetaco Oct 28, 2022, 5:47 PM Oct 28, 2022, 5:46 PM

    I am hoping there is a way to assign the Date Time - short format to a hotkey so I can have a quick way of inserting the current date Time in a line.

    Is there any way to assign this function to a key? (please see screenshot below)

    datetime

    A P 2 Replies Last reply Oct 28, 2022, 5:51 PM Reply Quote 0
    • A
      Alan Kilborn @safetaco
      last edited by Alan Kilborn Oct 28, 2022, 5:55 PM Oct 28, 2022, 5:51 PM

      @safetaco

      Why are you using that (meaning, in a demo plugin)?

      Why not use the Edit menu’s insert-timestamp command(s) ? – on the Insert submenu:

      30d88b33-d19b-4213-9872-f5a405053805-image.png

      These commands are definitely shortcuttable via normal Shortcut Mapper means:

      bd4a20a7-5fea-43e4-8248-15843dbbe61e-image.png

      1 Reply Last reply Reply Quote 2
      • P
        PeterJones @safetaco
        last edited by Oct 28, 2022, 6:10 PM

        @safetaco ,

        Your specific question about the date-format keystroke was answered already.

        But the generic question,

        Is there any way to assign a Plugin’s function to a hotkey?

        Yes. Settings > Shortcut Mapper > Plugin Commands. Every menu entry that is in the first-level of your plugin’s menu in Plugins > My Plugin should be visible to the Shortcut Mapper. (I have never noticed an exception to this, but it might be that dynamic menu editing will cause dynamic entries to not show up in Shortcut Mapper. If so, then don’t use dynamic entries in your top-level menu for your plugin. Or add your own shortcuts-defining settings to your plugin’s configuration)

        1 Reply Last reply Reply Quote 2
        • S
          safetaco
          last edited by Oct 28, 2022, 7:16 PM

          Thank you so much guys. I am pretty new to all of this and I see I have a lot to learn :)

          I will get this set up now!

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors