Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 625 Bytes

readme.md

File metadata and controls

29 lines (23 loc) · 625 Bytes

Mac Keyboard Generator

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)