Skip to content

Commit

Permalink
Tabs conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc committed May 28, 2024
1 parent aab7762 commit dac111e
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 121 deletions.
2 changes: 0 additions & 2 deletions builddefs/docsgen/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export default defineConfig(({ mode }) => {
outDir: "../../.build/docs",
cleanUrls: true,

srcExclude: ["ja/**", "zh-cn/**"],

markdown: {
config(md) {
md.use(tabsMarkdownPlugin);
Expand Down
26 changes: 13 additions & 13 deletions docs/feature_unicode.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Add the following to your `config.h`:

Each of these subsystems have their own pros and cons in terms of flexibility and ease of use. Choose the one that best fits your needs.

<!-- tabs:start -->
::::tabs

### ** Basic **
=== Basic

This is the easiest to use, albeit somewhat limited. It supports code points up to `U+7FFF`, which covers characters for most modern languages (including East Asian), as well as many symbols, but does not include emoji.

Expand All @@ -61,7 +61,7 @@ UNICODE_ENABLE = yes

You can then add `UC(c)` keycodes to your keymap, where *c* is the code point of the desired character (in hexadecimal - the `U+` prefix will not work). For example, `UC(0x40B)` will output [Ћ](https://unicode-table.com/en/040B/), and `UC(0x30C4)` will output [](https://unicode-table.com/en/30C4).

### ** Unicode Map **
=== Unicode Map

Unicode Map supports all possible code points (up to `U+10FFFF`). Here, the code points are stored in a separate mapping table (which may contain at most 16,384 entries), instead of directly in the keymap.

Expand Down Expand Up @@ -104,7 +104,7 @@ This is most useful when creating a keymap for an international layout with spec

Due to keycode size constraints, *i* and *j* can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ *i* ≤ 127 and 0 ≤ *j* ≤ 127.

### ** UCIS **
=== UCIS

As with Unicode Map, the UCIS method also supports all possible code points, and requires the use of a mapping table. However, it works much differently - Unicode characters are input by replacing a typed mnemonic.

Expand All @@ -129,7 +129,7 @@ By default, each table entry may be up to three code points long. This can be ch

To invoke UCIS input, the `ucis_start()` function must first be called (for example, in a custom "Unicode" keycode). Then, type the mnemonic for the mapping table entry (such as "rofl"), and hit Space or Enter. The "rofl" text will be backspaced and the emoji inserted.

<!-- tabs:end -->
::::

## Input Modes {#input-modes}

Expand All @@ -147,33 +147,33 @@ These modes can then be cycled through using the `UC_NEXT` and `UC_PREV` keycode
If your keyboard has working EEPROM, it will remember the last used input mode and continue using it on the next power up. This can be disabled by defining `UNICODE_CYCLE_PERSIST` to `false`.
<!-- tabs:start -->
:::::tabs
### ** macOS **
==== macOS
**Mode Name:** `UNICODE_MODE_MACOS`
macOS has built-in support for Unicode input as its own input source. It supports all possible code points by way of surrogate pairs for code points above `U+FFFF`.
To enable, go to **System Preferences → Keyboard → Input Sources**, then add Unicode Hex Input to the list (under Other), and activate it from the input dropdown in the menu bar. Note that this may disable some Option-based shortcuts such as Option+Left and Option+Right.
### ** Linux (IBus) **
==== Linux (IBus)
**Mode Name:** `UNICODE_MODE_LINUX`
For Linux distros with IBus, Unicode input is enabled by default, supports all possible code points, and works almost anywhere. Without IBus, it works under GTK apps, but rarely anywhere else.
Users who would like support in non-GTK apps without IBus may need to resort to a more indirect method, such as creating a custom keyboard layout.
### ** Windows (WinCompose) **
==== Windows (WinCompose)
**Mode Name:** `UNICODE_MODE_WINCOMPOSE`
This mode requires a third-party tool called [WinCompose](https://github.com/samhocevar/wincompose). It supports all possible code points, and is the recommended input mode for Windows.
To enable, install the [latest release from GitHub](https://github.com/samhocevar/wincompose/releases/latest). Once installed, it will automatically run on startup. This works reliably under all versions of Windows supported by WinCompose.
### ** Windows (HexNumpad) **
==== Windows (HexNumpad)
**Mode Name:** `UNICODE_MODE_WINDOWS`
Expand All @@ -189,19 +189,19 @@ To enable, run the following as an administrator, then reboot:
reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1
```

### ** Emacs **
==== Emacs

**Mode Name:** `UNICODE_MODE_EMACS`

Emacs supports code point input with the `insert-char` command.

### ** BSD **
==== BSD

**Mode Name:** `UNICODE_MODE_BSD`

Not currently implemented. If you're a BSD user and want to contribute support for this input mode, please [feel free](contributing)!

<!-- tabs:end -->
:::::

## Keycodes {#keycodes}

Expand Down
10 changes: 5 additions & 5 deletions docs/newbs_building_firmware_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ If you are familiar with using [github.dev](https://docs.github.com/en/codespace

A working Git client is required for your local operating system to commit and push changes to GitHub.

<!-- tabs:start -->
::::tabs

### ** Windows **
=== Windows

QMK maintains a bundle of MSYS2, the CLI and all necessary dependencies including Git. Install [QMK MSYS](https://msys.qmk.fm/) with the latest release [here](https://github.com/qmk/qmk_distro_msys/releases/latest). Git will be part of the bundle.

### ** macOS **
=== macOS

Install Homebrew following the instructions on https://brew.sh. Git will be part of the bundle.

### ** Linux/WSL **
=== Linux/WSL

It's very likely that you already have Git installed. If not, use one of the following commands:

Expand All @@ -52,7 +52,7 @@ It's very likely that you already have Git installed. If not, use one of the fol
* Sabayon: `sudo equo install dev-vcs/git`
* Gentoo: `sudo emerge dev-vcs/git`

<!-- tabs:end -->
::::

### 2. GitHub authentication

Expand Down
8 changes: 4 additions & 4 deletions docs/newbs_flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ Begin by opening the QMK Toolbox application. You'll want to locate the firmware

If you are on Windows or macOS, there are commands you can use to easily open the current folder in Explorer or Finder.

<!-- tabs:start -->
::::tabs

#### ** Windows **
=== Windows

```
start .
```

#### ** macOS **
=== macOS

```
open .
```

<!-- tabs:end -->
::::

The firmware file always follows this naming format:

Expand Down
69 changes: 45 additions & 24 deletions docs/newbs_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ If you haven't worked with the Linux/Unix command line before, there are a few b

We've tried to make QMK as easy to set up as possible. You only have to prepare your Linux or Unix environment, then let QMK install the rest.

<!-- tabs:start -->
:::::tabs

### ** Windows **
==== Windows

QMK maintains a Bundle of MSYS2, the CLI and all necessary dependencies. It also provides a handy `QMK MSYS` terminal shortcut to boot you directly into the correct environment.

Expand Down Expand Up @@ -49,11 +49,13 @@ You will need to install [MSYS2](https://www.msys2.org). Once installed, close a

Install the QMK CLI by running:

pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-python-qmk
```sh
pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-python-qmk
```

::::

### ** macOS **
==== macOS

QMK maintains a Homebrew tap and formula which will automatically install the CLI and all necessary dependencies.

Expand All @@ -69,9 +71,11 @@ If you are using an Apple Silicon machine, the installation process will take si

Install the QMK CLI by running:

brew install qmk/qmk/qmk

### ** Linux/WSL **
```sh
brew install qmk/qmk/qmk
```

==== Linux/WSL

::: tip
**Note for WSL users**: By default, the installation process will clone the QMK repository into your WSL home directory, but if you have cloned manually, ensure that it is located inside the WSL instance instead of the Windows filesystem (ie. not in `/mnt`), as accessing it is currently [extremely slow](https://github.com/microsoft/WSL/issues/4197).
Expand All @@ -93,75 +97,92 @@ You will need to install Git and Python. It's very likely that you already have

Install the QMK CLI by running:

python3 -m pip install --user qmk
```sh
python3 -m pip install --user qmk
```

#### Community Packages

These packages are maintained by community members, so may not be up to date or completely functional. If you encounter problems, please report them to their respective maintainers.

On Arch-based distros you can install the CLI from the official repositories (NOTE: at the time of writing this package marks some dependencies as optional that should not be):

sudo pacman -S qmk
```sh
sudo pacman -S qmk
```

You can also try the `qmk-git` package from AUR:

yay -S qmk-git
```sh
yay -S qmk-git
```

### ** FreeBSD **
==== FreeBSD

#### Installation

Install the FreeBSD package for QMK CLI by running:

pkg install -g "py*-qmk"
```sh
pkg install -g "py*-qmk"
```

NOTE: remember to follow the instructions printed at the end of installation (use `pkg info -Dg "py*-qmk"` to show them again).

<!-- tabs:end -->
:::::

## 3. Run QMK Setup {#set-up-qmk}

<!-- tabs:start -->
::::tabs

### ** Windows **
=== Windows

Open QMK MSYS and run the following command:

qmk setup
```sh
qmk setup
```

In most situations you will want to answer `y` to all of the prompts.

### ** macOS **
=== macOS

Open Terminal and run the following command:

qmk setup
```sh
qmk setup
```

In most situations you will want to answer `y` to all of the prompts.

### ** Linux/WSL **
=== Linux/WSL

Open your preferred terminal app and run the following command:

qmk setup
```sh
qmk setup
```

In most situations you will want to answer `y` to all of the prompts.

?>**Note on Debian, Ubuntu and their derivatives**:
::: info Note on Debian, Ubuntu and their derivatives:
It's possible, that you will get an error saying something like: `bash: qmk: command not found`.
This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) Debian introduced with their Bash 4.4 release, which removed `$HOME/.local/bin` from the PATH. This bug was later fixed on Debian and Ubuntu.
Sadly, Ubuntu reintroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562).
Luckily, the fix is easy. Run this as your user: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc`
:::

### ** FreeBSD **
=== FreeBSD

Open your preferred terminal app and run the following command:

qmk setup
```sh
qmk setup
```

In most situations you will want to answer `y` to all of the prompts.

<!-- tabs:end -->
::::

::: tip
The qmk home folder can be specified at setup with `qmk setup -H <path>`, and modified afterwards using the [cli configuration](cli_configuration#single-key-example) and the variable `user.qmk_home`. For all available options run `qmk setup --help`.
Expand Down
Loading

0 comments on commit dac111e

Please sign in to comment.