Hi all.
First off blame @Roycefer for this.
This started out as a way to learn how to intercept hot keys. I used @Roycefer jNativeHook lib for that. It worked pretty well but in my research I found @Roycefer jAWTRobot lib. hhhmmm, what can I do with these 2 libs together?
So in the end this is what you get. A b4j console app that will paste code into your b4x project depending on the sub.
Remember to unzip the libs.zip and put in your additional lib folder.
So to use, highlight the sub line:
And copy to your clip board
SHIFT-CTRL-E will get you:
SHIFT-CTRL-R will get you:
SHIFT-CTRL-W will get you:
SHIFT-CTRL-E will get you:
And this is why we blame @Roycefer and a good reason for you to check these projects out.
jNativeHook
https://www.b4x.com/android/forum/t...tercepting-system-input-events.55826/#content
That wrapped this
https://github.com/kwhat/jnativehook/releases
jAWTRobot
https://www.b4x.com/android/forum/t...-keyboard-and-mouse-events-etc.55832/#content
that wrapped the Oracle's java.awt.Robot package.
Have fun and remember. To stop the nativehook it is left windows key + ESC. In playing with this I rebooted my machine a few times.
I do wish Erel would give us hooks into the IDE.
Let me know if you find bugs. So... (c)The World. As always, source code included.
Extend, use and share back if you add some things.
Thanks.
First off blame @Roycefer for this.
This started out as a way to learn how to intercept hot keys. I used @Roycefer jNativeHook lib for that. It worked pretty well but in my research I found @Roycefer jAWTRobot lib. hhhmmm, what can I do with these 2 libs together?
So in the end this is what you get. A b4j console app that will paste code into your b4x project depending on the sub.
Remember to unzip the libs.zip and put in your additional lib folder.
So to use, highlight the sub line:
And copy to your clip board
SHIFT-CTRL-E will get you:
B4X:
Log("**********************************")
Log("Method: ime_heightchanged")
Log("NewHeight: " & NewHeight) 'ignore
Log("OldHeight: " & OldHeight) 'ignore
Log("**********************************")
SHIFT-CTRL-R will get you:
B4X:
#if debug
Log("**********************************")
Log("Method: ime_heightchanged")
Log("NewHeight: " & NewHeight) 'ignore
Log("OldHeight: " & OldHeight) 'ignore
Log("**********************************")
#end if
SHIFT-CTRL-W will get you:
B4X:
Try
Catch
Log("ime_heightchanged: " & LastException)
End Try
SHIFT-CTRL-E will get you:
B4X:
Log("**********************************")
Log("Method: ime_heightchanged")
Log("NewHeight: " & NewHeight) 'ignore
Log("OldHeight: " & OldHeight) 'ignore
Log("**********************************")
Try
Catch
Log("ime_heightchanged: " & LastException)
End Try
And this is why we blame @Roycefer and a good reason for you to check these projects out.
jNativeHook
https://www.b4x.com/android/forum/t...tercepting-system-input-events.55826/#content
That wrapped this
https://github.com/kwhat/jnativehook/releases
jAWTRobot
https://www.b4x.com/android/forum/t...-keyboard-and-mouse-events-etc.55832/#content
that wrapped the Oracle's java.awt.Robot package.
Have fun and remember. To stop the nativehook it is left windows key + ESC. In playing with this I rebooted my machine a few times.
I do wish Erel would give us hooks into the IDE.
Let me know if you find bugs. So... (c)The World. As always, source code included.
Extend, use and share back if you add some things.
Thanks.
Attachments
Last edited: