Skip to content

Adding a Layout

Francisco Hodge edited this page May 30, 2020 · 10 revisions

How to add a new layout?

  1. Create your layout file in src/lib/layouts
  2. Import it in src/lib/components/Layouts.js.
  3. Make a Pull Request

Example of a layout file

const french = {
  'default' : [
    "\u00B2 & \u00E9 \" ' ( - \u00E8 _ \u00E7 \u00E0 ) = {bksp}",
    "{tab} a z e r t y u i o p ^ $",
    "{lock} q s d f g h j k l m \u00F9 * {enter}",
    "{shift} < w x c v b n , ; : ! {shift}",
    '.com @ {space}'
  ],
  'shift' : [
    "{//} 1 2 3 4 5 6 7 8 9 0 \u00B0 + {bksp}",
    "{tab} A Z E R T Y U I O P \u00A8 \u00A3",
    "{lock} Q S D F G H J K L M % \u00B5 {enter}",
    "{shift} > W X C V B N ? . / \u00A7 {shift}",
    '.com @ {space}'
  ]
}

export default french;

Please don't forget to...

  • Keep layouts up to 5 rows max.
  • Add up to two layouts (default, shift)
  • Avoid adding keys after the space button

Supported Layouts

https://github.com/hodgef/simple-keyboard-layouts#-supported-layouts

Clone this wiki locally