mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 00:43:04 +00:00
feat: compound chording actions
This commit is contained in:
@@ -62,15 +62,13 @@ for (const icon of icons) {
|
||||
.flatMap(it => [...it])
|
||||
.map(it => it.codePointAt(0).toString(16))
|
||||
|
||||
if (codePoints.length === 0) {
|
||||
const codePoint = config.codePoints[icon]
|
||||
if (config.codePoints?.[icon]) {
|
||||
glyphs.push(config.codePoints[icon])
|
||||
} else {
|
||||
console.log()
|
||||
console.error(`${icon} code point could not be determined. Add it to config.codePoints.`)
|
||||
process.exit(-1)
|
||||
}
|
||||
const codePoint = config.codePoints[icon]
|
||||
if (codePoint) {
|
||||
glyphs.push(codePoint)
|
||||
} else if (codePoints.length === 0) {
|
||||
console.log()
|
||||
console.error(`${icon} code point could not be determined. Add it to config.codePoints.`)
|
||||
process.exit(-1)
|
||||
}
|
||||
|
||||
glyphs.push(...codePoints)
|
||||
|
||||
Reference in New Issue
Block a user