refactor(docs): Remove unnecessary jsx includes

This commit is contained in:
Cem Aksoylar 2024-08-13 22:56:17 -07:00
parent 22fdb3f36a
commit a60b476c03
8 changed files with 18 additions and 58 deletions

View file

@ -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.
:::

View file

@ -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;

View file

@ -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;

View file

@ -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";
@ -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,
@ -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 />

View file

@ -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;

View file

@ -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;

View file

@ -1,30 +0,0 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: CC-BY-NC-SA-4.0
*/
import Admonition from "@theme/Admonition";
export default function KeyboardConsumer() {
return (
<Admonition type="info" title="Keyboard vs. Consumer keycodes">
<p>
In the below tables, there are keycode pairs with similar names where
one variant has a <code>K_</code> prefix and another <code>C_</code>.
These variants correspond to similarly named usages from different{" "}
<a href="https://usb.org/sites/default/files/hut1_2.pdf#page=16">
HID usage pages
</a>
, namely the "keyboard/keypad" and "consumer" ones respectively.
</p>
<p>
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.
</p>
</Admonition>
);
}
KeyboardConsumer.propTypes = {};

View file

@ -1,21 +0,0 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: CC-BY-NC-SA-4.0
*/
import Admonition from "@theme/Admonition";
export default function SpellingCaution() {
return (
<Admonition type="warning">
<p>
Take extra notice of the spelling of the keycodes, especially the
shorthand spelling. Otherwise, it will result in an elusive parsing
error!
</p>
</Admonition>
);
}
SpellingCaution.propTypes = {};