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 Brazilian Portuguese keyboard layout #100

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

samuelstj
Copy link
Contributor

No description provided.

Copy link

Memory usage change @ 939d576

Board flash % RAM for global variables %
arduino:avr:leonardo 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:sam:arduino_due_x_dbg 0 - 0 0.0 - 0.0 N/A N/A
arduino:samd:mkrzero 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Serial
flash
% examples/Serial
RAM for global variables
%
arduino:avr:leonardo 0 0.0 0 0.0
arduino:sam:arduino_due_x_dbg 0 0.0 N/A N/A
arduino:samd:mkrzero 0 0.0 0 0.0
Click for full report CSV
Board,examples/Serial<br>flash,%,examples/Serial<br>RAM for global variables,%
arduino:avr:leonardo,0,0.0,0,0.0
arduino:sam:arduino_due_x_dbg,0,0.0,N/A,N/A
arduino:samd:mkrzero,0,0.0,0,0.0

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Nov 23, 2024
@edgar-bonet edgar-bonet self-assigned this Nov 23, 2024
Copy link
Collaborator

@edgar-bonet edgar-bonet left a comment

Choose a reason for hiding this comment

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

Hello, and thank-you for contributing to this library!

Now, I just learnt that Brazilian keyboards have this extra key, 0x54, which is not present on the ISO physical layout. Unfortunately, the library cannot support adding modifiers to this key. This is because, in this array, bit 6 (0x40) of each cell is used to select between the AltGr and Shift modifiers. C.f. the explanation by the bottom of KeyboardLayout.h.

Fortunately, Wikipedia tells me that:

To make this layout usable with keyboards with only 11 keys in the last row, the rightmost key (/?°) has its functions replicated across the AltGr+Q, AltGr+W, and AltGr+E combinations.

We will have to use these AltGr combinations instead of the key 0x54.

Below are some more comments about specific lines of this pull request:

src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/KeyboardLayout_pt_BR.cpp Outdated Show resolved Hide resolved
src/Keyboard_pt_BR.h Outdated Show resolved Hide resolved
src/Keyboard_pt_BR.h Outdated Show resolved Hide resolved
Copy link

Memory usage change @ 7aaa02b

Board flash % RAM for global variables %
arduino:avr:leonardo 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:sam:arduino_due_x_dbg 0 - 0 0.0 - 0.0 N/A N/A
arduino:samd:mkrzero 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Serial
flash
% examples/Serial
RAM for global variables
%
arduino:avr:leonardo 0 0.0 0 0.0
arduino:sam:arduino_due_x_dbg 0 0.0 N/A N/A
arduino:samd:mkrzero 0 0.0 0 0.0
Click for full report CSV
Board,examples/Serial<br>flash,%,examples/Serial<br>RAM for global variables,%
arduino:avr:leonardo,0,0.0,0,0.0
arduino:sam:arduino_due_x_dbg,0,0.0,N/A,N/A
arduino:samd:mkrzero,0,0.0,0,0.0

@edgar-bonet edgar-bonet merged commit f570bde into arduino-libraries:master Nov 25, 2024
6 checks passed
@edgar-bonet
Copy link
Collaborator

Merged to master. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants