質問

I want to "Select all" via a robot pressing the keys Control and A, but i dont want the keyboardListener to notice it as input. Is there another way to use "Select all" or a way to differentiate between the two input types?

Edit: I'm using the JNativeHook NativeKeyboardListener, not the normal one, thought I'd point that out, maybe it has some special abilities. :)

役に立ちましたか?

解決

You could just set the selected range on the appropriate control. No keyboard is needed for this, so it won't be handled by a keyboard listener.

他のヒント

You can inject input but in order for it to be recognized by the application layer it needs to propagate up through the input stack and thus will be recognized by the keyboardlistener.

Perhaps there is another way to perform a select all programmatically without injecting keyboard input.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top