How to invoke keystroke(like macro) in openapi

I hope finish some complex macro in java code not recorder

9 comments
Comment actions Permalink

Sorry, I can't understand your question. If you want to finish macro recording programmatically, call ActionMacroManager.getInstance().stopRecording().

0
Comment actions Permalink

No, i mean how to control keyboard (like macro) in openapi

0
Comment actions Permalink

In linux, I can use xdotool and load libxdo with jna, but it's inconvenient

0
Comment actions Permalink

What are you trying to accomplish?

0
Comment actions Permalink

For example, https://www.youtube.com/watch?v=RjeBi7xmZ8k&feature=youtu.be, I wanna do "popup alternative debugconfiguration" > "select 2" with one key. I hope implement it with "invoke popup" + "keystroke 2".

0
Comment actions Permalink

There is absolutely no need to simulate keyboard events for that. You can execute the necessary configuration directly, using ExecutionUtil.runConfiguration().

0
Comment actions Permalink

It's not key point that "How to run configuration", I think if i can inovke keystroke in plugin code, it will implement many features even though i don't know how to implement them with openapi.

0
Comment actions Permalink

Sorry, I don't think I'll be able to help you with this approach. I personally don't consider it to be a reasonable way to develop IntelliJ plugins.

0
Comment actions Permalink

If I don't use keystroke, how to implement this feature https://devnet.jetbrains.com/message/5539403#5539403, I can't get run and debug list like popup
run

0

Please sign in to leave a comment.