Skip to content

Commit

Permalink
Merge pull request #144 from HaoboGu/feat/vial_config_ble
Browse files Browse the repository at this point in the history
Update default vial config, update display name of BLE keys
  • Loading branch information
HaoboGu authored Nov 13, 2024
2 parents f509508 + 95fd243 commit e76fe3d
Show file tree
Hide file tree
Showing 35 changed files with 326 additions and 176 deletions.
4 changes: 1 addition & 3 deletions docs/src/keyboard_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ RMK provides an easy and accessible way to set up the keyboard with a toml confi
A `toml` file named `keyboard.toml` is used as a configuration file. The following is the spec of `toml` if you're unfamiliar with toml:
- [English](https://toml.io/en/v1.0.0) / [中文](https://toml.io/cn/v1.0.0)

[Here] is an example `keyboard.toml` for stm32 microcontroller, put your `keyboard.toml` at the root of your firmware project.

RMK provides a proc-macro to load the `keyboard.toml`: `#[rmk_keyboard]`, add it to your `main.rs` like:
RMK provides a proc-macro to load the `keyboard.toml` at your projects root: `#[rmk_keyboard]`, add it to your `main.rs` like:

```rust
use rmk::macros::rmk_keyboard;
Expand Down
11 changes: 10 additions & 1 deletion docs/src/wireless.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ You can also refer to [RMK user guide](./user_guide/4_compile_and_flash.md#use-u

## Multiple-profile support

RMK supports at most 8 wireless profiles, profile 0 is activated by default. Vial key `User0` - `User7` are used to switch to specific profile, `User8` and `User9` are switching to next, previous profile, `User10` is clear current profile status.
RMK supports at most 8 wireless profiles, profile 0 is activated by default. Vial user keycode can be configured to operate wireless profiles:

- `User0` - `User7`: switch to specific profile
- `User8`: switch to next profile
- `User9`: switch to previous profile
- `User10`: clear current profile bond info
- `User11`: switch default output between USB/BLE

Vial also provides a way to customize the displayed keycode, see `customKeycodes` in [this example](https://github.com/HaoboGu/rmk/blob/main/examples/use_rust/nrf52840_ble/vial.json). If `customKeycodes` are configured, the `User0` ~ `User11` will be displayed as `BT0`, ..., `Switch\nOutput`.


If you've connected a host for a profile, other devices would not be able to connect to this profile before doing manually clearing.
6 changes: 0 additions & 6 deletions examples/use_config/esp32c3_ble/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/esp32c6_ble/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/esp32s3_ble/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
68 changes: 62 additions & 6 deletions examples/use_config/nrf52832_ble/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,69 @@
"rows": 4,
"cols": 3
},
"customKeycodes": [
{
"name": "BT0",
"title": "Bluetooth Channel 0",
"shortName": "BT0"
},
{
"name": "BT1",
"title": "Bluetooth Channel 1",
"shortName": "BT1"
},
{
"name": "BT2",
"title": "Bluetooth Channel 2",
"shortName": "BT2"
},
{
"name": "BT3",
"title": "Bluetooth Channel 3",
"shortName": "BT3"
},
{
"name": "BT4",
"title": "Bluetooth Channel 4",
"shortName": "BT4"
},
{
"name": "BT5",
"title": "Bluetooth Channel 5",
"shortName": "BT5"
},
{
"name": "BT6",
"title": "Bluetooth Channel 6",
"shortName": "BT6"
},
{
"name": "BT7",
"title": "Bluetooth Channel 7",
"shortName": "BT7"
},
{
"name": "NEXT_BT",
"title": "Switch to the next Bluetooth channel",
"shortName": "Next\nBT"
},
{
"name": "PREV_BT",
"title": "Switch to the previous Bluetooth channel",
"shortName": "Prev\nBT"
},
{
"name": "CLR_BT",
"title": "Clear bond info for current channel",
"shortName": "Clear\nBT"
},
{
"name": "SWITCH",
"title": "Switch default output mode between USB/BLE",
"shortName": "Switch\nOutput"
}
],
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
2 changes: 1 addition & 1 deletion examples/use_config/nrf52840_ble/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 62 additions & 6 deletions examples/use_config/nrf52840_ble/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,69 @@
"rows": 4,
"cols": 3
},
"customKeycodes": [
{
"name": "BT0",
"title": "Bluetooth Channel 0",
"shortName": "BT0"
},
{
"name": "BT1",
"title": "Bluetooth Channel 1",
"shortName": "BT1"
},
{
"name": "BT2",
"title": "Bluetooth Channel 2",
"shortName": "BT2"
},
{
"name": "BT3",
"title": "Bluetooth Channel 3",
"shortName": "BT3"
},
{
"name": "BT4",
"title": "Bluetooth Channel 4",
"shortName": "BT4"
},
{
"name": "BT5",
"title": "Bluetooth Channel 5",
"shortName": "BT5"
},
{
"name": "BT6",
"title": "Bluetooth Channel 6",
"shortName": "BT6"
},
{
"name": "BT7",
"title": "Bluetooth Channel 7",
"shortName": "BT7"
},
{
"name": "NEXT_BT",
"title": "Switch to the next Bluetooth channel",
"shortName": "Next\nBT"
},
{
"name": "PREV_BT",
"title": "Switch to the previous Bluetooth channel",
"shortName": "Prev\nBT"
},
{
"name": "CLR_BT",
"title": "Clear bond info for current channel",
"shortName": "Clear\nBT"
},
{
"name": "SWITCH",
"title": "Switch default output mode between USB/BLE",
"shortName": "Switch\nOutput"
}
],
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
68 changes: 62 additions & 6 deletions examples/use_config/nrf52840_ble_split/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,69 @@
"rows": 4,
"cols": 3
},
"customKeycodes": [
{
"name": "BT0",
"title": "Bluetooth Channel 0",
"shortName": "BT0"
},
{
"name": "BT1",
"title": "Bluetooth Channel 1",
"shortName": "BT1"
},
{
"name": "BT2",
"title": "Bluetooth Channel 2",
"shortName": "BT2"
},
{
"name": "BT3",
"title": "Bluetooth Channel 3",
"shortName": "BT3"
},
{
"name": "BT4",
"title": "Bluetooth Channel 4",
"shortName": "BT4"
},
{
"name": "BT5",
"title": "Bluetooth Channel 5",
"shortName": "BT5"
},
{
"name": "BT6",
"title": "Bluetooth Channel 6",
"shortName": "BT6"
},
{
"name": "BT7",
"title": "Bluetooth Channel 7",
"shortName": "BT7"
},
{
"name": "NEXT_BT",
"title": "Switch to the next Bluetooth channel",
"shortName": "Next\nBT"
},
{
"name": "PREV_BT",
"title": "Switch to the previous Bluetooth channel",
"shortName": "Prev\nBT"
},
{
"name": "CLR_BT",
"title": "Clear bond info for current channel",
"shortName": "Clear\nBT"
},
{
"name": "SWITCH",
"title": "Switch default output mode between USB/BLE",
"shortName": "Switch\nOutput"
}
],
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/nrf52840_usb/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/rp2040/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/rp2040_direct_pin/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/rp2040_split/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/stm32f1/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/stm32f4/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
6 changes: 0 additions & 6 deletions examples/use_config/stm32h7/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"cols": 3
},
"layouts": {
"labels": [
[
"label",
"label2"
]
],
"keymap": [
[
"0,0",
Expand Down
Loading

0 comments on commit e76fe3d

Please sign in to comment.