-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle accents #3
Comments
Maybe work on a "transliterated" version of the forbidden phrases and inputs, but it may have a performance cost. Maybe add a config switch for it. 2 options, the first one WILL do the job, not sure about the second: |
@Draluy please assign this one to me. |
Actually bound to |
Tried with version 2.0.3 and no luck either. 2.1.1 may be better in that regard from what I read? Maybe worth a shot to compile it and test. |
Hmm fantastic, the builds from https://oss.sonatype.org/content/repositories/snapshots/com/1stleg/jnativehook/2.1.SNAPSHOT/ cannot be downloaded for some reason. So I went ahead and compiled the thing using the wiki. Which of course wasn't straightfoward for Windows. You need to do 2 extra things:
And bloody install the file in .m2 of course Bottomline:
...and our listener is never fired !!!
Giving up for now. I'll build it on Linux and see if there's any improvement... |
Leaned on it again and found the issue very quickly thanks to the NativeHookDemo provided within the jnativehook doc: there, an alternate event executor is set up. I checked the jnativehook source code and saw that one executor is supposed to be instantiated by default https://github.com/kwhat/jnativehook/blob/2.1/src/java/org/jnativehook/GlobalScreen.java#L669 And just below is also written that no listener would be called if no executor service was registered: https://github.com/kwhat/jnativehook/blob/2.1/src/java/org/jnativehook/GlobalScreen.java#L674 Which is exactly what's happening since DefaultDispatchService isn't instanciated by default anymore. The change in the source code happened on 2017-07-30, commit 32fcd1f1ff760d1d22355a33ed07b22897954b03 At first I didn't want to believe it, but fact is, the latest jnativehook build is from 2017-01-25 Quick fix for us:
And I'm opening a new issue on jnativehook: kwhat/jnativehook#277 |
Awesome job investigating that! |
- needs recent build.gradle of jnativehook - needs unicode encoded source files Also fixed the way chars are recorded (must be via method)nativeKeyTyped And also fixed the way backspace (and other control chars) was (might have been) implemented Fixed UT that remained strict
Fun fact: did you know that the "croissant" emoji 🥐 is 0x1F950, and that it's actually impossible to type it on Windows: keeping Alt pressed + F triggers the "File" menu. And still no chocolate bread emoji in 2020. Just this: 🥐🍫, although those exist: 🍪🍩🥞. SHAME! |
I vote for banning them anyway, as they can be used as a workaround, and its a cheap fix. Also, with millenials using emojis as words... |
Right #14 |
This should be resolved in 2.2. Has this been tested with 2.2.1? |
Hi Alex @kwhat , David is sick with the Covid right now, so I'll answer: we had a working build with a 2.2-SNAPSHOT, so yeah I bet this should work with a stable one. But I will check to be extra sure. Thanks a lot. |
Yeah it works all right with JNativeHook 2.2.1 |
Aligned with new JNativehook packages
When typying é on a french keyboard (2 being on the same key using shift)
The same will happen with all accents and with other keyboards and accented languages too.
The text was updated successfully, but these errors were encountered: