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

Add French keyboard supporting ~#{[|`\^@]} with ALT RIGHT #55

Merged
merged 1 commit into from Jan 29, 2020

Conversation

@Nazime
Copy link
Contributor

Nazime commented Jan 29, 2020

With the French keyboard layout we can't Type the letters ~#{[|`^@]} with the WHID injector because the keyboard.cpp module is for qwerty, and qwerty only need SHIFT to access all other keys while French keyboard need SHIFT and also ALT RIGHT in order to type all keys.

I just added a condition to activate the ALT RIGHT modifier for those ASCII letters ~#{[|`^@]}

// Press ALT RIGHT for ~#{[|`\^@]} for french keyboard
	    if (k == 126|| k == 35|| k == 123|| k == 91|| k == 124|| k == 96|| k == 92|| k == 94|| k == 64|| k == 93|| k == 125){
            _keyReport.modifiers |= 0x40;  // 0x40 is the ALT RIGHT 
      }
// Release ALT RIGHT for ~#{[|`\^@]} for french keyboard
	    if (k == 126|| k == 35|| k == 123|| k == 91|| k == 124|| k == 96|| k == 92|| k == 94|| k == 64|| k == 93|| k == 125){
            _keyReport.modifiers &= ~(0x40); // 0x40 is the ALT RIGHT 
        }

In order to have the french keyboard working alright, you have to upload the sketch Arduino_32u4 with this keyboard.cpp file.

Using this technique you can also modifies the keyboard.cpp in order to have all ASCII keys in other layout.

@whid-injector whid-injector merged commit 861e600 into whid-injector:master Jan 29, 2020
@whid-injector

This comment has been minimized.

Copy link
Owner

whid-injector commented Jan 29, 2020

Thanks man! Really appreciated.
Will add a note about it in the wiki!

fengjixuchui added a commit to fengjixuchui/WHID that referenced this pull request Jan 29, 2020
Merge pull request whid-injector#55 from Nazime/master
@Nazime

This comment has been minimized.

Copy link
Contributor Author

Nazime commented Jan 29, 2020

Nice :D

It would be great if you could test it before adding a note to the wiki, even if it worked perfectly find for me.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.