Skip to content

Commit

Permalink
Add ZMK-style key index defintions
Browse files Browse the repository at this point in the history
- Introduced `RC` function in `key_indexes.h` for ZMK compatibility
  • Loading branch information
obra committed Jan 15, 2025
1 parent 5b92edd commit 1fc1ac5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kaleidoscope/device/key_indexes.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ constexpr uint8_t keyIndex(uint8_t row, uint8_t col) {
return KeyAddr(row, col).toInt() + 1;
}

/* A compat shim to be able to use zmk style key indexes*/
constexpr uint8_t RC(uint8_t row, uint8_t col) {
return keyIndex(row, col);
}

constexpr uint8_t R0C0 = keyIndex(0, 0);
constexpr uint8_t R0C1 = keyIndex(0, 1);
constexpr uint8_t R0C2 = keyIndex(0, 2);
Expand Down

0 comments on commit 1fc1ac5

Please sign in to comment.