Instead of writing the XML of the .keylayout
file for macs, this will generate it for you.
TODO: specify all the features of the XML file.
const fs = require('fs')
const toKeyboardXML = require('@lancejpollard/mac-keyboard.js')
const string = toKeyboardXML({
name: 'MyLang',
keyboards: [
{
standard: toKeyboardXML.ANSI,
control: true,
bindings: [
{
sequence: ['e'],
result: 'e'
}
]
}
]
})
fs.writeFileSync('MyLang.keylayout', string)