Skip to content

Commit

Permalink
docs(codes): Add (key) codes documentation
Browse files Browse the repository at this point in the history
Create codes documentation for standardized keys.

Closes zmkfirmware#218.  Fixes zmkfirmware#308.  Ref #21.
  • Loading branch information
innovaker authored and krikun98 committed Nov 10, 2020
1 parent 41b54dd commit b95f0d2
Show file tree
Hide file tree
Showing 44 changed files with 9,578 additions and 3 deletions.
9 changes: 9 additions & 0 deletions docs/docs/codes/_applications.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Table from "@site/src/components/codes/Table";

## Application Controls

<Table group="application-controls" />

## Applications (Launch)

<Table group="applications" />
9 changes: 9 additions & 0 deletions docs/docs/codes/_editing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Table from "@site/src/components/codes/Table";

## Cut, Copy, Paste

<Table group="cut-copy-paste" />

## Undo, Redo

<Table group="undo-redo" />
13 changes: 13 additions & 0 deletions docs/docs/codes/_footnotes/example.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This is an _example_ footnote for **code** tables.

- Footnotes are supported per row by each operating system column.
- Footnotes support MDX syntax.
- A footnote's `id` is its filename by convention (i.e. `example`).
- Footnotes must be included and listed in `src/data/footnotes.js` because they're statically compiled.
- Footnotes are assigned within `src/data/hid.js` using `column-id: footnote-id(s)` `K`:`V` pairs (case-sensitive), where:
- `K` is the column's `id`.
- `V` is the footnote's `id`.
- `V` can also be an array of footnote ids (_optional_).
- The footnote system aims to prevent duplication of _sources_ (mdx).
- Footnotes are listed under each table, so try to avoid multiline notes unless it's necessary!
- Footnotes are automatically numbered.
5 changes: 5 additions & 0 deletions docs/docs/codes/_input-assist.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Table from "@site/src/components/codes/Table";

## Input Assist

<Table group="input-assist" />
59 changes: 59 additions & 0 deletions docs/docs/codes/_keyboard-keypad.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import Table from "@site/src/components/codes/Table";

## Keyboard

### Letters

<Table group="keyboard-letters" />

### Numbers

<Table group="keyboard-numbers" />

### Symbols / Punctuation

<Table group="keyboard-symbols" />

### Control & Whitespace

<Table group="keyboard-control-whitespace" />

### Navigation

<Table group="keyboard-navigation" />

### Modifiers

<Table group="keyboard-modifiers" />

### Locks

<Table group="keyboard-locks" />

### F Keys

<Table group="keyboard-fkeys" />

### International

<Table group="keyboard-international" />

### Language

<Table group="keyboard-language" />

### Miscellaneous

<Table group="keyboard-miscellaneous" />

## Keypad

<Table group="keypad" />

### Numbers

<Table group="keypad-numbers" />

### Symbols / Operations

<Table group="keypad-operations" />
21 changes: 21 additions & 0 deletions docs/docs/codes/_media.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Table from "@site/src/components/codes/Table";

## Sound / Volume

<Table group="sound" />

## Display

<Table group="display" />

## Media Controls

<Table group="media-controls" />

## Consumer Menus

<Table group="consumer-menus" />

## Consumer Controls

<Table group="consumer-controls" />
5 changes: 5 additions & 0 deletions docs/docs/codes/_power.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Table from "@site/src/components/codes/Table";

## Power & Lock

<Table group="power" />
15 changes: 15 additions & 0 deletions docs/docs/codes/applications.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Applications
sidebar_label: Applications
hide_title: true
---

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { rightToc as contentToc } from "./_applications.mdx";

export const rightToc = contentToc;

<OsLegend />
<ToastyContainer />
<Content />
15 changes: 15 additions & 0 deletions docs/docs/codes/editing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Editing
sidebar_label: Editing
hide_title: true
---

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { rightToc as contentToc } from "./_editing.mdx";

export const rightToc = contentToc;

<OsLegend />
<ToastyContainer />
<Content />
33 changes: 33 additions & 0 deletions docs/docs/codes/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Codes
sidebar_label: Full List
hide_title: true
slug: ./
---

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Key, { rightToc as keyToc } from "./_keyboard-keypad.mdx";
import Editing, { rightToc as editingToc } from "./_editing.mdx";
import Media, { rightToc as mediaToc } from "./_media.mdx";
import Applications, { rightToc as applicationsToc } from "./_applications.mdx";
import InputAssist, { rightToc as inputAssistToc } from "./_input-assist.mdx";
import Power, { rightToc as powerToc } from "./_power.mdx";

export const rightToc = [
...keyToc,
...editingToc,
...mediaToc,
...applicationsToc,
...inputAssistToc,
...powerToc,
];

<OsLegend />
<ToastyContainer />
<Key />
<Editing />
<Media />
<Applications />
<InputAssist />
<Power />
15 changes: 15 additions & 0 deletions docs/docs/codes/input-assist.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Input Assist
sidebar_label: Input Assist
hide_title: true
---

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { rightToc as contentToc } from "./_input-assist.mdx";

export const rightToc = contentToc;

<OsLegend />
<ToastyContainer />
<Content />
15 changes: 15 additions & 0 deletions docs/docs/codes/keyboard-keypad.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Keyboard & Keypad
sidebar_label: Keyboard & Keypad
hide_title: true
---

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { rightToc as contentToc } from "./_keyboard-keypad.mdx";

export const rightToc = contentToc;

<OsLegend />
<ToastyContainer />
<Content />
15 changes: 15 additions & 0 deletions docs/docs/codes/media.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Media
sidebar_label: Media
hide_title: true
---

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { rightToc as contentToc } from "./_media.mdx";

export const rightToc = contentToc;

<OsLegend />
<ToastyContainer />
<Content />
15 changes: 15 additions & 0 deletions docs/docs/codes/power.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Power
sidebar_label: Power
hide_title: true
---

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { rightToc as contentToc } from "./_power.mdx";

export const rightToc = contentToc;

<OsLegend />
<ToastyContainer />
<Content />
5 changes: 4 additions & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ module.exports = {
editUrl: "https://github.com/zmkfirmware/zmk/edit/main/docs/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
customCss: [
require.resolve("./src/css/custom.css"),
require.resolve("./src/css/codes.css"),
],
},
},
],
Expand Down
Loading

0 comments on commit b95f0d2

Please sign in to comment.