From f8eff0f80316ca8e5bd2a346fcd03b20d8b741a4 Mon Sep 17 00:00:00 2001 From: Aytackydln Date: Sun, 27 Oct 2024 01:22:15 +0200 Subject: [PATCH] add custom layout page --- content/advanced-topics/custom-layout.md | 48 ++++++++++ static/files/extra_dock.json | 105 +++++++++++++++++++++ themes/aurora/layouts/shortcodes/link.html | 3 + 3 files changed, 156 insertions(+) create mode 100644 content/advanced-topics/custom-layout.md create mode 100644 static/files/extra_dock.json create mode 100644 themes/aurora/layouts/shortcodes/link.html diff --git a/content/advanced-topics/custom-layout.md b/content/advanced-topics/custom-layout.md new file mode 100644 index 0000000..df3a15b --- /dev/null +++ b/content/advanced-topics/custom-layout.md @@ -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) diff --git a/static/files/extra_dock.json b/static/files/extra_dock.json new file mode 100644 index 0000000..e5691e3 --- /dev/null +++ b/static/files/extra_dock.json @@ -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 + } + ] +} \ No newline at end of file diff --git a/themes/aurora/layouts/shortcodes/link.html b/themes/aurora/layouts/shortcodes/link.html new file mode 100644 index 0000000..37b9cac --- /dev/null +++ b/themes/aurora/layouts/shortcodes/link.html @@ -0,0 +1,3 @@ + +{{ .Inner }} + \ No newline at end of file