-
-
Notifications
You must be signed in to change notification settings - Fork 552
feat: Add Brazilian ABNT2 keyboard layout documentation and template #1505
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
Open
CapGuizera
wants to merge
2
commits into
HyDE-Project:dev
Choose a base branch
from
CapGuizera:add-abnt2-keybindings
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,183 @@ | ||
| # HyDE Keyboard Layout Templates | ||
|
|
||
| This directory contains keyboard layout-specific keybinding configurations for HyDE. | ||
|
|
||
| ## π Available Layouts | ||
|
|
||
| - **`keybindings-abnt2.conf`** - Brazilian ABNT2 layout (Portuguese BR) | ||
|
|
||
| ## π How to Use | ||
|
|
||
| ### Option 1: Copy to Your Config | ||
|
|
||
| ```bash | ||
| # Choose the appropriate keybindings file for your keyboard layout | ||
| cp keybindings-abnt2.conf ~/.config/hypr/keybindings.conf | ||
|
|
||
| # Reload Hyprland | ||
| # Method 1: Use keybinding (SUPER+SHIFT+R) | ||
| # Method 2: Restart your session | ||
| ``` | ||
|
|
||
| ### Option 2: Symlink (Advanced) | ||
|
|
||
| ```bash | ||
| # Create a symbolic link (changes will reflect automatically) | ||
| ln -sf ~/.local/share/hyde/templates/hypr/keybindings/keybindings-abnt2.conf \ | ||
| ~/.config/hypr/keybindings.conf | ||
| ``` | ||
|
|
||
| ## π Contributing New Layouts | ||
|
|
||
| Want to add support for your keyboard layout? Here's how: | ||
|
|
||
| ### 1. Understand the Issue | ||
|
|
||
| Most keyboard layout conflicts happen because: | ||
| - Special characters require SHIFT key (e.g., `@` = Shift+2 in ABNT2) | ||
| - Default keybindings may use these same combinations | ||
| - **However**: Hyprland captures key presses BEFORE layout conversion | ||
| - This means `SUPER+SHIFT+2` works correctly even on layouts where Shift+2 = @ | ||
|
|
||
| ### 2. Test Before Creating | ||
|
|
||
| Before creating a new layout template, **test if the default bindings actually conflict**: | ||
|
|
||
| ```bash | ||
| # Try these tests: | ||
| 1. Open a text editor | ||
| 2. Type Shift+2 (should produce @ or your layout's symbol) | ||
| 3. Press SUPER+SHIFT+2 (should move window to workspace 2) | ||
| 4. If both work correctly, you may not need a custom layout! | ||
| ``` | ||
|
|
||
| ### 3. When to Create a Custom Layout | ||
|
|
||
| Create a custom layout file only if: | ||
| - β You confirmed actual conflicts with default keybindings | ||
| - β You need to relocate bindings for better ergonomics | ||
| - β Your physical keyboard layout differs significantly from US | ||
|
|
||
| ### 4. How to Create Your Layout | ||
|
|
||
| ```bash | ||
| # 1. Copy the base template | ||
| cp keybindings-abnt2.conf keybindings-YOUR_LAYOUT.conf | ||
|
|
||
| # 2. Add a descriptive header explaining: | ||
| # - Your keyboard layout name and region | ||
| # - What conflicts you're solving | ||
| # - Which keybindings you changed and why | ||
| # - Testing instructions | ||
|
|
||
| # 3. Modify only the conflicting keybindings | ||
|
|
||
| # 4. Test thoroughly before submitting | ||
| ``` | ||
|
|
||
| ### 5. Header Template | ||
|
|
||
| Add this header to your new layout file: | ||
|
|
||
| ```conf | ||
| # ============================================ | ||
| # HyDE Keybindings - [LAYOUT NAME] | ||
| # ============================================ | ||
| # | ||
| # Author: [Your Name/Username] | ||
| # Created: [Date] | ||
| # Layout: [Full Layout Name] ([Region]) | ||
| # | ||
| # Description: | ||
| # ------------ | ||
| # [Explain what issues this layout solves] | ||
| # | ||
| # Main Changes from Default: | ||
| # --------------------------- | ||
| # 1. [List specific changes] | ||
| # 2. [And why you made them] | ||
| # | ||
| # Special Characters Reference: | ||
| # ------------------------------ | ||
| # [Document how symbols are produced in your layout] | ||
| # | ||
| # Testing Your Configuration: | ||
| # ---------------------------- | ||
| # [Provide test steps to verify it works] | ||
| # | ||
| # ============================================ | ||
| ``` | ||
|
|
||
| ### 6. Guidelines for Modifications | ||
|
|
||
| - β **DO**: Change modifier keys (Shift β Alt, Ctrl, etc.) if needed | ||
| - β **DO**: Relocate bindings to more ergonomic positions | ||
| - β **DO**: Document every change clearly | ||
| - β **DO**: Keep functionality consistent where possible | ||
| - β **DON'T**: Remove essential keybindings | ||
| - β **DON'T**: Change bindings just for personal preference | ||
| - β **DON'T**: Make undocumented changes | ||
|
|
||
| ### 7. Submit Your Contribution | ||
|
|
||
| ```bash | ||
| # 1. Fork the HyDE repository | ||
| # 2. Create a branch: git checkout -b add-LAYOUT-keybindings | ||
| # 3. Add your file to: .local/share/hyde/templates/hypr/keybindings/ | ||
| # 4. Update this README with your layout | ||
| # 5. Commit: git commit -m "feat: Add LAYOUT keyboard layout keybindings" | ||
| # 6. Push and create a Pull Request | ||
| ``` | ||
|
|
||
| ## π Layout-Specific Documentation | ||
|
|
||
| ### ABNT2 (Brazilian Portuguese) | ||
|
|
||
| **Special Characters:** | ||
| - `@` β Shift+2 | ||
| - `#` β Shift+3 | ||
| - `$` β Shift+4 | ||
| - `%` β Shift+5 | ||
| - `&` β Shift+7 | ||
| - `*` β Shift+8 | ||
| - `(` β Shift+9 | ||
| - `)` β Shift+0 | ||
|
|
||
| **Dead Keys:** `Β΄` (acute), `` ` `` (grave), `^` (circumflex), `~` (tilde) | ||
|
|
||
| **Important Note:** | ||
| The default HyDE keybindings work correctly with ABNT2 because Hyprland captures key presses before the layout processes them. For example, `SUPER+SHIFT+2` will move a window to workspace 2 and will NOT produce the `@` symbol. | ||
|
|
||
| **Changes in this template:** | ||
| - None! The default keybindings are fully compatible | ||
| - This template includes comprehensive documentation for ABNT2 users | ||
| - Serves as a reference for understanding how keybindings work with this layout | ||
|
|
||
| --- | ||
|
|
||
| ## π Reporting Issues | ||
|
|
||
| If you encounter keyboard layout issues: | ||
|
|
||
| 1. Test with the default keybindings first | ||
| 2. Document exactly what keybinding conflicts with what symbol | ||
| 3. Provide your keyboard layout details (setxkbmap -query) | ||
| 4. Report at: https://github.com/HyDE-Project/HyDE/issues/1442 | ||
|
|
||
| ## π‘ Tips | ||
|
|
||
| - Physical key positions matter more than the symbol printed on them | ||
| - Most Hyprland keybindings use physical key codes, not layout-specific symbols | ||
| - Test thoroughly before assuming a conflict exists | ||
| - When in doubt, check with: `wev` (Wayland event viewer) to see actual key codes | ||
|
|
||
| ## π Additional Resources | ||
|
|
||
| - [Hyprland Keybinding Documentation](https://wiki.hyprland.org/Configuring/Binds/) | ||
| - [XKB Layout Documentation](https://www.x.org/wiki/XKB/) | ||
| - [Keyboard Layout List](https://en.wikipedia.org/wiki/Keyboard_layout) | ||
|
|
||
| --- | ||
|
|
||
| **Contributors:** Add your name here when you submit a layout | ||
| - CapGuizera (ABNT2) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap the bare URL in angle brackets or use markdown link syntax.
The bare URL violates markdown best practices (MD034). Wrap it in angle brackets or convert to a proper markdown link for better accessibility and standards compliance.
π Proposed fixes (choose one)
Option 1: Angle brackets (simpler)
Option 2: Markdown link (more semantic)
π Committable suggestion
π§° Tools
πͺ markdownlint-cli2 (0.18.1)
165-165: Bare URL used
(MD034, no-bare-urls)
π€ Prompt for AI Agents