Skip to content

Adding a Layout

Francisco Hodge edited this page Apr 4, 2023 · 10 revisions

How to add a new layout?

  1. Create your layout file in src/lib/layouts (Copy an existing layout for reference).
  2. Import it in src/lib/components/Layouts.ts.
  3. Make a Pull Request.

Example of a layout file

import { LayoutItem } from "../interfaces";

/**
 * Layout: French
 */
export default <LayoutItem>{
  layout: {
    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}",
    ],
  },
};

Please make sure to...

  • Keep layouts up to 5 rows max.
  • Add only two layouts entries (default, shift)
  • Avoid editing the last row (for consistency with other layouts).
  • Ensure that the default and shift layout have the same number of keys.
  • Test your proposed layout here before submitting

Supported Layouts

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

Clone this wiki locally