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!
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
NinjaTrader
Shortcut Key Functionality for Addons
Collapse
X
-
Hello ntbone,
Thank you for the post.
Currently there is no framework exposed for NinjaScript to manage hotkeys so in this situation you would need to use the preview key events to monitor key events and then handle the events you needed. Preview key events are not a NinjaScript concept so this is not something we have a sample or documentation for, you can research this topic on MSDN in contrast to WPF controls. You can also find a sample that was uploaded to the forum of a text box that handles key events which would be a similar process to what you would need: https://ninjatrader.com/support/foru...PreviewKeyDown
Depending on where you wanted this code to be executed you would need to subscript to that controls preview key events to observe key events when that control is in focus.
Please let me know if I may be of further assistance.JesseNinjaTrader Customer Service
-
Hello ntbone,
You have understood correctly, the hotkey manager has logic to look for drawing objects so they can have hotkeys added like the existing drawing objects. The hotkey manager was otherwise not exposed for NinjaScript use so other types which are not specifically drawing objects wont be able to take advantage of that. You can use the preview key events from other types to capture keys but the existing hotkey manager has no supported solutions for adding custom hotkeys right now.
Please let me know if I may be of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by andrewtrades, Today, 04:57 PM
|
1 response
10 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
6 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
9 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
20 views
0 likes
|
Last Post Today, 03:33 PM |
Comment