Skip to content

Commit

Permalink
[docs] Fix code blocks overflowing page width (qmk#23829)
Browse files Browse the repository at this point in the history
Fix code blocks overflowing page width
  • Loading branch information
zvecr authored and nuess0r committed Sep 8, 2024
1 parent 4935eb5 commit 0492995
Showing 16 changed files with 316 additions and 169 deletions.
58 changes: 43 additions & 15 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
@@ -254,15 +254,21 @@ qmk doctor [-y] [-n]

Check your environment for problems and prompt to fix them:

qmk doctor
```
qmk doctor
```

Check your environment and automatically fix any problems found:

qmk doctor -y
```
qmk doctor -y
```

Check your environment and report problems only:

qmk doctor -n
```
qmk doctor -n
```

## `qmk format-json`

@@ -290,15 +296,21 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K

Show basic information for a keyboard:

qmk info -kb planck/rev5
```
qmk info -kb planck/rev5
```

Show the matrix for a keyboard:

qmk info -kb ergodox_ez -m
```
qmk info -kb ergodox_ez -m
```

Show a JSON keymap for a keyboard:

qmk info -kb clueboard/california -km default
```
qmk info -kb clueboard/california -km default
```

## `qmk json2c`

@@ -350,7 +362,9 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K

Do a basic lint check:

qmk lint -kb rominronin/katana60/rev2
```
qmk lint -kb rominronin/katana60/rev2
```

## `qmk list-keyboards`

@@ -789,16 +803,22 @@ qmk pytest [-t TEST]

Run entire test suite:

qmk pytest
```
qmk pytest
```

Run test group:

qmk pytest -t qmk.tests.test_cli_commands
```
qmk pytest -t qmk.tests.test_cli_commands
```

Run single test:

qmk pytest -t qmk.tests.test_cli_commands.test_c2json
qmk pytest -t qmk.tests.test_qmk_path
```
qmk pytest -t qmk.tests.test_cli_commands.test_c2json
qmk pytest -t qmk.tests.test_qmk_path
```

## `qmk painter-convert-graphics`

@@ -835,16 +855,24 @@ options:

Run entire test suite:

qmk test-c
```
qmk test-c
```

List available tests:

qmk test-c --list
```
qmk test-c --list
```

Run matching test:

qmk test-c --test unicode*
```
qmk test-c --test unicode*
```

Run single test:

qmk test-c --test basic
```
qmk test-c --test basic
```
20 changes: 15 additions & 5 deletions docs/cli_configuration.md
Original file line number Diff line number Diff line change
@@ -43,7 +43,9 @@ user.keymap: None -> default

The `qmk config` command is used to interact with the underlying configuration. When run with no argument it shows the current configuration. When arguments are supplied they are assumed to be configuration tokens, which are strings containing no spaces with the following form:

<subcommand|general|default>[.<key>][=<value>]
```
<subcommand|general|default>[.<key>][=<value>]
```

## Setting Configuration Values

@@ -63,19 +65,27 @@ You can read configuration values for the entire configuration, a single key, or

### Entire Configuration Example

qmk config
```
qmk config
```

### Whole Section Example

qmk config compile
```
qmk config compile
```

### Single Key Example

qmk config compile.keyboard
```
qmk config compile.keyboard
```

### Multiple Keys Example

qmk config user compile.keyboard compile.keymap
```
qmk config user compile.keyboard compile.keymap
```

## Deleting Configuration Values

10 changes: 8 additions & 2 deletions docs/cli_development.md
Original file line number Diff line number Diff line change
@@ -192,11 +192,15 @@ We use nose2, flake8, and yapf to test, lint, and format code. You can use the `

### Testing and Linting

qmk pytest
```
qmk pytest
```

### Formatting

qmk format-python
```
qmk format-python
```

## Formatting Details

@@ -212,7 +216,9 @@ Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and i

If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help:

```python
# TODO(unassigned/<your_github_username>): Write <unit|integration> tests
```

We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions.

16 changes: 12 additions & 4 deletions docs/cli_tab_complete.md
Original file line number Diff line number Diff line change
@@ -10,22 +10,30 @@ There are several ways you can setup tab completion.

Add this to the end of your `.profile` or `.bashrc`:

source ~/qmk_firmware/util/qmk_tab_complete.sh
```
source ~/qmk_firmware/util/qmk_tab_complete.sh
```

If you put `qmk_firmware` into another location you will need to adjust this path.

Zsh users will need to load `bashcompinit`. The following can be added to `~/.zshrc` file:

autoload -Uz bashcompinit && bashcompinit
```
autoload -Uz bashcompinit && bashcompinit
```

### System Wide Symlink

If you want the tab completion available to all users of the system you can add a symlink to the `qmk_tab_complete.sh` script:

ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh
```
ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh
```

### System Wide Copy

In some cases a symlink may not work. Instead you can copy the file directly into place. Be aware that updates to the tab complete script may happen from time to time, you will want to recopy the file periodically.

cp util/qmk_tab_complete.sh /etc/profile.d
```
cp util/qmk_tab_complete.sh /etc/profile.d
```
38 changes: 22 additions & 16 deletions docs/feature_audio.md
Original file line number Diff line number Diff line change
@@ -263,31 +263,39 @@ In music mode, the following keycodes work differently, and don't pass through:

The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:

#define PITCH_STANDARD_A 432.0f
```c
#define PITCH_STANDARD_A 432.0f
```
You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
#define NO_MUSIC_MODE
```c
#define NO_MUSIC_MODE
```

### Music Mask

By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
#define MUSIC_MASK keycode != KC_NO
```c
#define MUSIC_MASK keycode != KC_NO
```
Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
For a more advanced way to control which keycodes should still be processed, you can use `music_mask_kb(keycode)` in `<keyboard>.c` and `music_mask_user(keycode)` in your `keymap.c`:
bool music_mask_user(uint16_t keycode) {
switch (keycode) {
case RAISE:
case LOWER:
return false;
default:
return true;
}
```c
bool music_mask_user(uint16_t keycode) {
switch (keycode) {
case RAISE:
case LOWER:
return false;
default:
return true;
}
}
```
Things that return false are not part of the mask, and are always processed.
@@ -329,8 +337,9 @@ Keycodes available:

The feature is disabled by default, to save space. To enable it, add this to your `config.h`:

#define AUDIO_CLICKY

```c
#define AUDIO_CLICKY
```

You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values:

@@ -343,9 +352,6 @@ You can configure the default, min and max frequencies, the stepping and built i
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. |




## MIDI Functionality

See [MIDI](feature_midi)
26 changes: 15 additions & 11 deletions docs/feature_auto_shift.md
Original file line number Diff line number Diff line change
@@ -51,7 +51,9 @@ Yes, unfortunately.

Add to your `rules.mk` in the keymap folder:

AUTO_SHIFT_ENABLE = yes
```
AUTO_SHIFT_ENABLE = yes
```

If no `rules.mk` exists, you can create one.

@@ -372,22 +374,24 @@ completely normal and with no intention of shifted keys.
#### An Example Run
hello world. my name is john doe. i am a computer programmer playing with
keyboards right now.
```
hello world. my name is john doe. i am a computer programmer playing with
keyboards right now.

[PRESS AS_DOWN quite a few times]
[PRESS AS_DOWN quite a few times]

heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
KEYboArDS RiGHT NOw.
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
KEYboArDS RiGHT NOw.

[PRESS AS_UP a few times]
[PRESS AS_UP a few times]

hello world. my name is john Doe. i am a computer programmer playing with
keyboarDs right now.
hello world. my name is john Doe. i am a computer programmer playing with
keyboarDs right now.

[PRESS AS_RPT]
[PRESS AS_RPT]

115
115
```

The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
value. You are now set! Practice on the *D* key a little bit that showed up
Loading

0 comments on commit 0492995

Please sign in to comment.