Skip to content
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

#3 handle accents and a few cosmetic changes #12

Closed
wants to merge 14 commits into from

Conversation

fabmars
Copy link

@fabmars fabmars commented Feb 10, 2020

#3 handle accents and a few cosmetic changes

fabien added 13 commits December 20, 2019 01:52
…nd line switches ands special cases, in English and French.
- 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
� Conflicts:
�	src/main/java/fr/raluy/chocoratage/Config.java
Copy link
Owner

@Draluy Draluy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You changed a lot of stuff. Give me some days to review everything plox <3

@fabmars
Copy link
Author

fabmars commented Feb 10, 2020

I didn't change much. The main change is the way keyCodes and keyChars are analyzed. What you were doing (getKeyText) was some sort of (unintentional?) workaround for the (poorly documented) way NativeKeyEvents are contextualized. Now we're as neat as Mr. Clean (plus I nearly have the same amount of hair).

@Draluy
Copy link
Owner

Draluy commented Feb 11, 2020

Hey, I cant build the project because I'm missing jnativehook-2.1.1-SNAPSHOT.jar
Could you provide it please?

@fabmars
Copy link
Author

fabmars commented Feb 11, 2020

@fabmars
Copy link
Author

fabmars commented Feb 11, 2020

Unzip it, github refuses to include jars (which are zips, go figure)
mvn install:install-file -Dfile=/path/to/the/file/jnativehook-2.1.1-SNAPSHOT.jar -DgroupId=com.1stleg -DartifactId=jnativehook -Dversion=2.1.1-SNAPSHOT -Dpackaging=jar

@Draluy
Copy link
Owner

Draluy commented Feb 12, 2020

Hi Fabien,

I'm on sick leave today and I plan on reviewing this PR. There are some things in the code that bothers me, amomgst them new README.

How open are you to changes? As you are the main contributor right now, I dont feel like its right for me to play the dictator, but on the other hand I can't host and maintain stuff I don't believe in.

@fabmars
Copy link
Author

fabmars commented Feb 12, 2020

Huh sounds like serious matter.
How do you mean? Did I write anything stupid or unnecessary?
For me it's a fun project, I'm learning new things, like some Unicode concepts or discovering the gradle far-west world. I don't plan on working on it much further than the improved matching ticket.

@Draluy
Copy link
Owner

Draluy commented Feb 12, 2020

Nothing serious, dont' worry :) I don't take myself or this project too seriously. Let me make some changes to your PR and submit them to you, it'll be easier.

if (Config.isDebugMode()) {
log.info("OS set to {}", os);
log.info("Forbidden phrases:", os);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os gets logged twice?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bad case of copy paste, there's not even a {}. Should be log.info("Forbidden phrases:");

@Draluy

This comment has been minimized.

@Draluy Draluy closed this Feb 12, 2020
@Draluy
Copy link
Owner

Draluy commented Feb 12, 2020

I cannot get the program to work, be it using the command line or the IDE.
I get this

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.jnativehook.GlobalScreen.getAutoRepeatRate()Ljava/lang/Integer;
It does compile fine, I can see the jnativehook classes in the jar, but it still hangs on me.

When running the jar I get the error at this line: GlobalScreen.registerNativeHook();

Any idea?

@Draluy
Copy link
Owner

Draluy commented Feb 12, 2020

Could you test it on a Debian VM? It seems to me this version of jnativehook crashes.

@fabmars
Copy link
Author

fabmars commented Feb 12, 2020

Ah damn, I realize the jar I gave you was a quick compile on windows (yes I develop this on windows, sometimes Ubuntu shame on me). On any other OS you'll miss the native lib (.so...).
So, I need to compile jnativehook correctly on all platforms. It's quite a struggle, believe me.

@fabmars
Copy link
Author

fabmars commented Feb 13, 2020

jnativehook-2.1.20200213.zip
There you are @Draluy. Very sorry again.

@Draluy
Copy link
Owner

Draluy commented Feb 13, 2020

Thx a lot :) And no need to apologize :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants