forked from mirrors/0ad
Make pages relying on hotkeys more resilient
Reviewed by: @wraitii Differential Revision: https://code.wildfiregames.com/D3541 This was SVN commit r24856.
This commit is contained in:
@@ -27,6 +27,9 @@ function formatHotkeyCombination(comb, translateScancodes = true)
|
||||
|
||||
function formatHotkeyCombinations(combinations, translateScancodes = true)
|
||||
{
|
||||
if (!combinations || !combinations.length)
|
||||
return "";
|
||||
|
||||
let combs = combinations.map(x => formatHotkeyCombination(x, translateScancodes));
|
||||
combs.sort((a, b) => a.length - b.length || a - b);
|
||||
return translateScancodes ? combs.join(", ") : combs;
|
||||
|
||||
Reference in New Issue
Block a user