Skip to content

fix(linux): map the ABNT2 dedicated slash key - #227

Open
nanaoniiiii wants to merge 1 commit into
LizardByte:masterfrom
nanaoniiiii:fix/linux-abnt2-slash
Open

nanaoniiiii wants to merge 1 commit into
LizardByte:masterfrom
nanaoniiiii:fix/linux-abnt2-slash

Conversation

@nanaoniiiii

@nanaoniiiii nanaoniiiii commented Nov 10, 2026 •

Copy link
Copy Markdown

Description

Map VK_ABNT_C1 (0xC1), the Brazilian ABNT2 dedicated slash/question-mark key, to Linux KEY_RO. The uinput backend currently rejects this virtual key as unsupported, so no key event reaches the host layout.

The existing keyboard capability setup already enables Linux key codes; the regression now also checks that KEY_RO is advertised. Add translation and pipe-backed press/release coverage using the production backend and existing test hooks. This changes only the Linux uinput mapping.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

Validated on Linux with GCC 12 and C++23:

  • Built the existing tests/unit/test_linux_backend.cpp GoogleTest source against the production library, repository-pinned GoogleTest, and existing Linux test hooks. Without the mapping, the translation and new ABNT2 event tests fail; with the mapping, the focused keyboard/capability group passes (8 tests).
  • Filter: LinuxBackendTest.*Keyboard*:LinuxBackendTest.FakeUinputConstructionCoversCapabilitiesAndFailureBranches.
  • CMake/Ninja production static-library build passed with tests/docs/examples/tools/install disabled, XTest disabled, and libevdev 1.13.4. Used LIBVIRTUALHID_WARNINGS_AS_ERRORS=OFF because the existing XTest-disabled create_xtest_mouse path has an unused options parameter; no build configuration or unrelated source was changed in this PR.
  • Software-only libxkbcommon check with the br layout / abnt2 model confirms evdev KEY_RO (XKB keycode 97) yields /, and Shift yields ?.
  • clang-format --dry-run --Werror on both changed C++ files and git diff --check passed.

The selected GoogleTest translation unit was compiled directly. These pipe/fake-syscall tests cover event emission and advertised capabilities in userspace; the XKB check covers software layout translation.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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