mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-18 16:02:57 +00:00
feat: compound chording actions
This commit is contained in:
@@ -51,3 +51,11 @@ actions:
|
||||
id: "RELEASE_KEYS"
|
||||
title: Release all keys, but not keyboard modifiers
|
||||
icon: text_rotate_up
|
||||
523:
|
||||
id: "PRESS_NEXT"
|
||||
title: "Press and do not release the next key/action"
|
||||
icon: download
|
||||
524:
|
||||
id: "RELEASE_NEXT"
|
||||
title: "Release the next key/action in the sequence"
|
||||
icon: upload
|
||||
|
||||
@@ -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