mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-11 13:26:16 +00:00
fix: sort legacy chord inputs
This commit is contained in:
@@ -13,7 +13,10 @@ export function csvChordsToJson(csv: string): CharaChordFile {
|
||||
.map(line => {
|
||||
const [input, output] = line.split(/,(?=[^,]*$)/, 2)
|
||||
return [
|
||||
input.split("+").map(it => KEYMAP_IDS.get(it.trim())?.code ?? 0),
|
||||
input
|
||||
.split("+")
|
||||
.map(it => KEYMAP_IDS.get(it.trim())?.code ?? 0)
|
||||
.sort((a, b) => a - b),
|
||||
output
|
||||
.trim()
|
||||
.split("")
|
||||
|
||||
Reference in New Issue
Block a user