Skip to content

Commit

Permalink
add custom layout page
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Oct 26, 2024
1 parent 96b1242 commit f8eff0f
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 0 deletions.
48 changes: 48 additions & 0 deletions content/advanced-topics/custom-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Custom Layout
order: 1
authors:
- Aytackydln
---

Intended way to use Aurora with more than keyboard, mouse, mousepad etc. is _Remapping_ them to CL1-CL5 keys.
This way, they can be integrated with default game effects.

# Creating Custom Layouts

Currently only way to create new layouts is by editing the json files in Aurora's installation folder.

You can save your layouts as **custom_keyboard.json**, **custom_mouse.json**,
**custom_mousepad.json**, **custom_headset.json** or **custom_chroma.json**

This naming is recommended as you will lose your changes if new layout updates are downloaded

## Using AI to Create New Layout

1. Use your preferred AI that supports file attachments. You can use ChatGpt4 if you have the plan or [claude.ai](https://claude.ai/)
2. Go to Aurora's installation folder, then **kb_layouts** folder
3. Pick any layout, and one of the included_features (mentioned in json) file from **Extra Features** and attach it to the AI conversation
4. Attach {{% link "files/extra_dock.json" %}}example file extra_dock.json{{% /link %}}
5. Enter this prompt, edit it as you like:
> Create a layout that adds two 5 LED RAM layout to the left of _corsair_k70_pro.json_.
> New file should be called custom_keyboard.json
>
> Give me all the files completely.
>
> Example file that adds 9 vertical LEDs to the left of the keyboard is included, extra_dock.json
## Extra Info

In case you want to add leds to different regions, include this to the prompt:

> Enum of origin_region property:
>>public enum KeyboardRegion
>>{
>>TopLeft = 1,
>>TopRight = 2,
>>BottomLeft = 3,
>>BottomRight = 4
>>}
"tag" value of each led should be different. It is recommended to use ADDITIONALLIGHT enums. They can be found here:
[DeviceKeys.cs](https://github.com/Aurora-RGB/Aurora/blob/master/Project-Aurora/AuroraCommon/Devices/DeviceKeys.cs)
105 changes: 105 additions & 0 deletions static/files/extra_dock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"group_tag": "keyboard",
"origin_region": 1,
"grouped_keys": [
{
"visualName": "1",
"tag": 142,
"margin_left": -40,
"margin_top": 0,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "2",
"tag": 143,
"margin_left": -40,
"margin_top": 30,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "3",
"tag": 144,
"margin_left": -40,
"margin_top": 60,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "4",
"tag": 145,
"margin_left": -40,
"margin_top": 90,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "5",
"tag": 146,
"margin_left": -40,
"margin_top": 120,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "6",
"tag": 147,
"margin_left": -40,
"margin_top": 150,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "7",
"tag": 148,
"margin_left": -40,
"margin_top": 180,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "8",
"tag": 149,
"margin_left": -40,
"margin_top": 210,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
},
{
"visualName": "9",
"tag": 150,
"margin_left": -40,
"margin_top": 240,
"width": 35,
"height": 29,
"font_size": 24,
"enabled": true,
"absolute_location": true
}
]
}
3 changes: 3 additions & 0 deletions themes/aurora/layouts/shortcodes/link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ .Site.BaseURL }}/{{ .Get 0 }}"/>
{{ .Inner }}
</a>

0 comments on commit f8eff0f

Please sign in to comment.