Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework input_pressed_state docs #19267

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions docs/porting_your_keyboard_to_qmk.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,6 @@ The next section of the `info` file deals with your keyboard's matrix. The first

The size of the `matrix_pins.cols` and `matrix_pins.rows` arrays infer the size of the matrix (previously `MATRIX_ROWS` and `MATRIX_COLS`).

## Configuration Options

To invert the keypress logic, configure `input_pressed_state`:

```json
"matrix_pins": {
"input_pressed_state": 1,
},
```

This configures state of the GPIO pins when the key is pressed - `1` for high, `0` for low. Default value is `0`.

Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`.

```json
Expand Down
16 changes: 15 additions & 1 deletion docs/reference_info_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ Example:
}
```

### Additional Options

* `input_pressed_state`
* This configures state of the GPIO pins when the key is pressed - `1` for high, `0` for low
* Default: `0`

Example:

```json
"matrix_pins": {
"input_pressed_state": 1,
},
```

## Non-RGB LED Lighting

This section controls basic 2-pin LEDs, which typically pass through keyswitches and are soldered into the PCB, or are placed in PCB sockets.
Expand Down Expand Up @@ -353,4 +367,4 @@ Example:
"matrix": [0, 0]
},
}
```
```