Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Manage Hotkeys in NinjaScript?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Manage Hotkeys in NinjaScript?

    I would like to be able to do the following for hotkeys in a NinjaScript AddOn:
    • Find all hotkeys and what they are assigned to and their hotkey category
    • Assign/deassign a hotkey
    • Create/populate/destroy a new (non-system) category of hotkeys
    • Assign/deassign hotkeys for existing AddOns
    Are there any examples of these capabilities available in NinjaScript?

    Thanks!
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hello jeronymite,

    Currently there is no way to manage the existing hotkeys, there is a feature request for this which I have added your vote for SFT-2669.

    If you wanted to add key controls to something you are doing you can use the PreviewKey events (WPF concept) from the target control for that purpose. You can search the forum for PreviewKeyDown or PreviewKeyUp for some examples, this is also something you can just search for online in contrast to WPF to better understand how to use keyboard events.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks, Jesse. Whilst I am looking for the NinjaScript functionality (thanks for adding my vote to the feature request), it is also desirable to have the ability to assign/deassign hotkeys to existing AddOns in the NT UI. Thanks again!
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        How do I vote for SFT-2669? I want to vote, too.

        Comment


          #5
          Hello leontancfa,

          I have added a vote.

          Please let me know if I may be of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Hello,

            I'd like to vote for this option as well please.

            Comment


              #7
              Hello KINGKODA,

              I have added a vote.

              As a side note, any further votes past this point I will add them however I will not keep adding a new post saying that I have added a vote. Please know that I have added it.

              Please let me know if I may be of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                I'd also like to vote for this please.

                Comment


                  #9
                  Originally posted by jeronymite View Post
                  I would like to be able to Find all hotkeys and what they are assigned to and their hotkey category. Thanks!
                  Recently added several hotkeys to several projects and needed a way to check for conflicts..
                  Code below will print a list of all available hotkeys (assigned or not) to output window (1)
                  Code:
                  foreach(var v in NinjaTrader.Gui.HotKeys.HotKeysManager.AllHotKeys)
                  {
                       Print("-----------------------------"); 
                       Print(v.GetType().ToString()); 
                       Print("-----------------------------"); 
                       var vSplit = v.ToString().Split(new [] { ' ' });
                       foreach(string s in vSplit) Print(s);
                  }
                  Print("-----------------------------");

                  -=Edge=-
                  NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

                  Comment


                    #10
                    I would like to add my vote to SFT-2669.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by helpwanted, Today, 03:06 AM
                    1 response
                    8 views
                    0 likes
                    Last Post sarafuenonly123  
                    Started by Brevo, Today, 01:45 AM
                    0 responses
                    7 views
                    0 likes
                    Last Post Brevo
                    by Brevo
                     
                    Started by aussugardefender, Today, 01:07 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post aussugardefender  
                    Started by pvincent, 06-23-2022, 12:53 PM
                    14 responses
                    242 views
                    0 likes
                    Last Post Nyman
                    by Nyman
                     
                    Started by TraderG23, 12-08-2023, 07:56 AM
                    9 responses
                    385 views
                    1 like
                    Last Post Gavini
                    by Gavini
                     
                    Working...
                    X