Skip to content

Commit

Permalink
refactor(docs): Remove unnecessary jsx includes
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar committed Aug 14, 2024
1 parent 4faeb36 commit 96cd3a1
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 58 deletions.
8 changes: 8 additions & 0 deletions docs/docs/codes/_keyboard-consumer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:::info[Keyboard vs. Consumer keycodes]
In the below tables, there are keycode pairs with similar names where one variant has a `K_` prefix and another `C_`.
These variants correspond to similarly named usages from different [HID usage pages](https://usb.org/sites/default/files/hut1_2.pdf#page=16),
namely the "keyboard/keypad" and "consumer" ones respectively.

In practice, some OS and applications might listen to only one of the variants.
You can use the values in the compatibility columns below to assist you in selecting which one to use.
:::
2 changes: 1 addition & 1 deletion docs/docs/codes/applications.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ hide_title: true

import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import KeyboardConsumer from "@site/src/components/codes/KeyboardConsumer";
import Content, { toc as contentToc } from "./_applications.mdx";
import KeyboardConsumer from "./_keyboard-consumer.md";

export const toc = contentToc;

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/codes/editing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hide_title: true
import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { toc as contentToc } from "./_editing.mdx";
import KeyboardConsumer from "@site/src/components/codes/KeyboardConsumer";
import KeyboardConsumer from "./_keyboard-consumer.md";

export const toc = contentToc;

Expand Down
9 changes: 6 additions & 3 deletions docs/docs/codes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ hide_title: true
slug: ./
---

import SpellingCaution from "@site/src/components/codes/SpellingCaution";
import KeyboardConsumer from "@site/src/components/codes/KeyboardConsumer";
import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Key, { toc as keyToc } from "./_keyboard-keypad.mdx";
Expand All @@ -15,6 +13,7 @@ import Media, { toc as mediaToc } from "./_media.mdx";
import Applications, { toc as applicationsToc } from "./_applications.mdx";
import InputAssist, { toc as inputAssistToc } from "./_input-assist.mdx";
import Power, { toc as powerToc } from "./_power.mdx";
import KeyboardConsumer from "./_keyboard-consumer.md";

export const toc = [
...keyToc,
Expand All @@ -25,7 +24,11 @@ export const toc = [
...powerToc,
];

<SpellingCaution />
:::warning
Take extra notice of the spelling of the keycodes, especially the shorthand spelling.
Otherwise, it will result in an elusive parsing error!
:::

<KeyboardConsumer />
<OsLegend />
<ToastyContainer />
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/codes/media.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hide_title: true
import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { toc as contentToc } from "./_media.mdx";
import KeyboardConsumer from "@site/src/components/codes/KeyboardConsumer";
import KeyboardConsumer from "./_keyboard-consumer.md";

export const toc = contentToc;

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/codes/power.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hide_title: true
import OsLegend from "@site/src/components/codes/OsLegend";
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
import Content, { toc as contentToc } from "./_power.mdx";
import KeyboardConsumer from "@site/src/components/codes/KeyboardConsumer";
import KeyboardConsumer from "./_keyboard-consumer.md";

export const toc = contentToc;

Expand Down
30 changes: 0 additions & 30 deletions docs/src/components/codes/KeyboardConsumer.jsx

This file was deleted.

21 changes: 0 additions & 21 deletions docs/src/components/codes/SpellingCaution.jsx

This file was deleted.

0 comments on commit 96cd3a1

Please sign in to comment.