Skip to content
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

Added Blackwidow Elite support #2240

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion Project-Aurora/Project-Aurora/Devices/Razer/RazerDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ public override bool UpdateDevice(Dictionary<DeviceKeys, System.Drawing.Color> k

if (keyColors.TryGetValue(DeviceKeys.Peripheral_Logo, out var clr))
{
keyboard.Set(ToColore(clr));
mousepad.Set(ToColore(clr));
mouse.Set(ToColore(clr));
headset = ToColore(clr);
chromalink.Set(ToColore(clr));
keypad.Set(ToColore(clr));
}

if (keyColors.TryGetValue(DeviceKeys.MEDIA_PLAY_PAUSE, out var clrMedia))
keyboard.Set(ToColore(clrMedia));

foreach (var key in keyColors)
{
if (RazerMappings.keyboardDictionary.TryGetValue(key.Key, out var kbIndex))
Expand Down
121 changes: 121 additions & 0 deletions Project-Aurora/Project-Aurora/Devices/Razer/RazerLayoutMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,126 @@ public static class RazerLayoutMap
{DeviceKeys.ARROW_DOWN, new int [] {5, 14} },
{DeviceKeys.ARROW_RIGHT, new int [] {5, 15} }
};

public static readonly Dictionary<DeviceKeys, int[]> Razer_Blackwidow_Elite = new Dictionary<DeviceKeys, int[]>
{
{DeviceKeys.ESC, new int [] {0,1} },
{DeviceKeys.F1, new int [] {0, 3} },
{DeviceKeys.F2, new int [] {0, 4} },
{DeviceKeys.F3, new int [] {0, 5} },
{DeviceKeys.F4, new int [] {0, 6} },
{DeviceKeys.F5, new int [] {0, 7} },
{DeviceKeys.F6, new int [] {0, 8} },
{DeviceKeys.F7, new int [] {0, 9} },
{DeviceKeys.F8, new int [] {0, 10} },
{DeviceKeys.F9, new int [] {0, 11} },
{DeviceKeys.F10, new int [] {0, 12} },
{DeviceKeys.F11, new int [] {0, 13} },
{DeviceKeys.F12, new int [] {0, 14} },
{DeviceKeys.PRINT_SCREEN, new int [] {0, 15} },
{DeviceKeys.SCROLL_LOCK, new int [] {0, 16} },
{DeviceKeys.PAUSE_BREAK, new int [] {0, 17} },
{DeviceKeys.MEDIA_PREVIOUS, new int [] {0, 18} },
{DeviceKeys.MEDIA_PLAY_PAUSE, new int [] {0, 19} },
{DeviceKeys.MEDIA_NEXT, new int [] {0, 20} },
{DeviceKeys.VOLUME_MUTE, new int [] {0, 21} },
{DeviceKeys.G1, new int [] {1, 0} },
{DeviceKeys.TILDE, new int [] {1, 1} },
{DeviceKeys.ONE, new int [] {1, 2} },
{DeviceKeys.TWO, new int [] {1, 3} },
{DeviceKeys.THREE, new int [] {1, 4} },
{DeviceKeys.FOUR, new int [] {1, 5} },
{DeviceKeys.FIVE, new int [] {1, 6} },
{DeviceKeys.SIX, new int [] {1, 7} },
{DeviceKeys.SEVEN, new int [] {1, 8} },
{DeviceKeys.EIGHT, new int [] {1, 9} },
{DeviceKeys.NINE, new int [] {1, 10} },
{DeviceKeys.ZERO, new int [] {1, 11} },
{DeviceKeys.MINUS, new int [] {1, 12} },
{DeviceKeys.EQUALS, new int [] {1, 13} },
{DeviceKeys.BACKSPACE, new int [] {1, 14} },
{DeviceKeys.INSERT, new int [] {1, 15} },
{DeviceKeys.HOME, new int [] {1, 16} },
{DeviceKeys.PAGE_UP, new int [] {1, 17} },
{DeviceKeys.NUM_LOCK, new int [] {1, 18} },
{DeviceKeys.NUM_SLASH, new int [] {1, 19} },
{DeviceKeys.NUM_ASTERISK, new int [] {1, 20} },
{DeviceKeys.NUM_MINUS, new int [] {1, 21} },
{DeviceKeys.G2, new int [] {2, 0} },
{DeviceKeys.TAB, new int [] {2, 1} },
{DeviceKeys.Q, new int [] {2, 2} },
{DeviceKeys.W, new int [] {2, 3} },
{DeviceKeys.E, new int [] {2, 4} },
{DeviceKeys.R, new int [] {2, 5} },
{DeviceKeys.T, new int [] {2, 6} },
{DeviceKeys.Y, new int [] {2, 7} },
{DeviceKeys.U, new int [] {2, 8} },
{DeviceKeys.I, new int [] {2, 9} },
{DeviceKeys.O, new int [] {2, 10} },
{DeviceKeys.P, new int [] {2, 11} },
{DeviceKeys.OPEN_BRACKET, new int [] {2, 12} },
{DeviceKeys.CLOSE_BRACKET, new int [] {2,13} },
{DeviceKeys.BACKSLASH, new int [] {2, 14} },
{DeviceKeys.DELETE, new int [] {2, 15} },
{DeviceKeys.END, new int [] {2, 16} },
{DeviceKeys.PAGE_DOWN, new int [] {2, 17} },
{DeviceKeys.NUM_SEVEN, new int [] {2, 18} },
{DeviceKeys.NUM_EIGHT, new int [] {2, 19} },
{DeviceKeys.NUM_NINE, new int [] {2, 20} },
{DeviceKeys.NUM_PLUS, new int [] {2, 21} },
{DeviceKeys.G3, new int [] {3, 0} },
{DeviceKeys.CAPS_LOCK, new int [] {3, 1} },
{DeviceKeys.A, new int [] {3, 2} },
{DeviceKeys.S, new int [] {3, 3} },
{DeviceKeys.D, new int [] {3, 4} },
{DeviceKeys.F, new int [] {3, 5} },
{DeviceKeys.G, new int [] {3, 6} },
{DeviceKeys.H, new int [] {3, 7} },
{DeviceKeys.J, new int [] {3, 8} },
{DeviceKeys.K, new int [] {3, 9} },
{DeviceKeys.L, new int [] {3, 10} },
{DeviceKeys.SEMICOLON, new int [] {3, 11} },
{DeviceKeys.APOSTROPHE, new int [] {3, 12} },
{DeviceKeys.HASHTAG, new int [] {3, 13} },
{DeviceKeys.ENTER, new int [] {3, 14} },
{DeviceKeys.NUM_FOUR, new int [] {3, 18} },
{DeviceKeys.NUM_FIVE, new int [] {3, 19} },
{DeviceKeys.NUM_SIX, new int [] {3, 20} },
{DeviceKeys.G4, new int [] {4, 0} },
{DeviceKeys.LEFT_SHIFT, new int [] {4, 1} },
{DeviceKeys.BACKSLASH_UK, new int [] {4, 2} },
{DeviceKeys.Z, new int [] {4, 3} },
{DeviceKeys.X, new int [] {4, 4} },
{DeviceKeys.C, new int [] {4, 5} },
{DeviceKeys.V, new int [] {4, 6} },
{DeviceKeys.B, new int [] {4, 7} },
{DeviceKeys.N, new int [] {4, 8} },
{DeviceKeys.M, new int [] {4, 9} },
{DeviceKeys.COMMA, new int [] {4, 10} },
{DeviceKeys.PERIOD, new int [] {4, 11} },
{DeviceKeys.FORWARD_SLASH, new int [] {4, 12} },
{DeviceKeys.RIGHT_SHIFT, new int [] {4, 14} },
{DeviceKeys.ARROW_UP, new int [] {4, 16} },
{DeviceKeys.NUM_ONE, new int [] {4, 18} },
{DeviceKeys.NUM_TWO, new int [] {4, 19} },
{DeviceKeys.NUM_THREE, new int [] {4, 20} },
{DeviceKeys.NUM_ENTER, new int [] {4, 21} },
{DeviceKeys.G5, new int [] {5, 0} },
{DeviceKeys.LEFT_CONTROL, new int [] {5, 1} },
{DeviceKeys.LEFT_WINDOWS, new int [] {5, 2} },
{DeviceKeys.LEFT_ALT, new int [] {5, 3} },
{DeviceKeys.SPACE, new int [] {5, 6} },
{DeviceKeys.RIGHT_ALT, new int [] {5, 10} },
{DeviceKeys.LOGO, new int [] {5, 11 } },
{DeviceKeys.RIGHT_WINDOWS, new int [] {5, 12} },
{DeviceKeys.FN_Key, new int [] {5, 12} },
{DeviceKeys.APPLICATION_SELECT, new int [] {5, 13} },
{DeviceKeys.RIGHT_CONTROL, new int [] {5, 14} },
{DeviceKeys.ARROW_LEFT, new int [] {5, 15} },
{DeviceKeys.ARROW_DOWN, new int [] {5, 16} },
{DeviceKeys.ARROW_RIGHT, new int [] {5, 17} },
{DeviceKeys.NUM_ZERO, new int [] {5, 19} },
{DeviceKeys.NUM_PERIOD, new int [] {5, 20} }
};
}
}
2 changes: 2 additions & 0 deletions Project-Aurora/Project-Aurora/Settings/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ public enum PreferredKeyboard
Razer_Blackwidow_TE = 302,
[Description("Razer - Blade")]
Razer_Blade = 303,
[Description("Razer - Blackwidow Elite")]
Razer_Blackwidow_Elite = 304,

//Clevo range is 400-499

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ public void LoadBrand(PreferredKeyboard keyboard_preference = PreferredKeyboard.
layoutConfigPath = Path.Combine(layoutsPath, "razer_blackwidow_te.json");
else if (keyboard_preference == PreferredKeyboard.Razer_Blade)
layoutConfigPath = Path.Combine(layoutsPath, "razer_blade.json");
else if (keyboard_preference == PreferredKeyboard.Razer_Blackwidow_Elite)
layoutConfigPath = Path.Combine(layoutsPath, "razer_blackwidow_elite.json");
else if (keyboard_preference == PreferredKeyboard.Masterkeys_Pro_L)
layoutConfigPath = Path.Combine(layoutsPath, "masterkeys_pro_l.json");
else if (keyboard_preference == PreferredKeyboard.Masterkeys_Pro_S)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"group_tag": "keyboard",
"origin_region": 1,
"grouped_keys": [
{
"visualName": "<<",
"tag": 137,
"margin_left": 682.0,
"margin_top": 0.0,
"width": 30.0,
"height": 30.0,
"font_size": 12.0,
"width_bits": 3,
"height_bits": 3,
"margin_left_bits": -9,
"margin_top_bits": 3,
"enabled": true,
"absolute_location": true
},
{
"visualName": "||",
"tag": 133,
"margin_left": 718.0,
"margin_top": 0.0,
"width": 30.0,
"height": 30.0,
"font_size": 12.0,
"width_bits": 3,
"height_bits": 3,
"margin_left_bits": -9,
"margin_top_bits": 6,
"enabled": true,
"absolute_location": true
},
{
"visualName": ">>",
"tag": 138,
"margin_left": 756.0,
"margin_top": 0.0,
"width": 30.0,
"height": 30.0,
"font_size": 12.0,
"width_bits": 3,
"height_bits": 3,
"margin_left_bits": -9,
"margin_top_bits": 9,
"enabled": true,
"absolute_location": true
},
{
"visualName": "Mute",
"tag": 139,
"margin_left": 792.0,
"margin_top": 0.0,
"width": 30.0,
"height": 30.0,
"font_size": 12.0,
"width_bits": 3,
"height_bits": 3,
"margin_left_bits": -9,
"margin_top_bits": 12,
"enabled": true,
"absolute_location": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"keys_to_remove": [],
"key_modifications": {
"99": {
"visualName": "FN",
"tag": 107,
"line_break": null,
"margin_left": null,
"margin_top": null,
"width": null,
"height": null,
"font_size": null,
"width_bits": null,
"height_bits": null,
"margin_left_bits": null,
"margin_top_bits": null,
"enabled": null
}
},
"included_features": [
"razer_blackwidow_left_bottom_features.json",
"razer_blackwidow_media_features.json"
]
}