Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions .local/share/hyde/templates/hypr/keybindings/README.md
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
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

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)

-4. Report at: https://github.com/HyDE-Project/HyDE/issues/1442
+4. Report at: <https://github.com/HyDE-Project/HyDE/issues/1442>

Option 2: Markdown link (more semantic)

-4. Report at: https://github.com/HyDE-Project/HyDE/issues/1442
+4. Report at: [GitHub Issue #1442](https://github.com/HyDE-Project/HyDE/issues/1442)
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
4. Report at: https://github.com/HyDE-Project/HyDE/issues/1442
4. Report at: <https://github.com/HyDE-Project/HyDE/issues/1442>
Suggested change
4. Report at: https://github.com/HyDE-Project/HyDE/issues/1442
4. Report at: [GitHub Issue #1442](https://github.com/HyDE-Project/HyDE/issues/1442)
🧰 Tools
πŸͺ› markdownlint-cli2 (0.18.1)

165-165: Bare URL used

(MD034, no-bare-urls)

πŸ€– Prompt for AI Agents
.local/share/hyde/templates/hypr/keybindings/README.md around line 165: the bare
URL "https://github.com/HyDE-Project/HyDE/issues/1442" should be wrapped to
satisfy MD034; replace the plain URL with either angle brackets like
<https://github.com/HyDE-Project/HyDE/issues/1442> or a markdown link such as
[Report an issue](https://github.com/HyDE-Project/HyDE/issues/1442), keeping the
surrounding text intact.


## πŸ’‘ 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)
Loading