MCPcopy Create free account
hub / github.com/OpenActionAPI/rust-elgato-streamdeck / flip_key_index

Function flip_key_index

src/util.rs:49–52  ·  view source on GitHub ↗

Flips key index horizontally, for use with Original v1 Stream Deck

(kind: &Kind, key: u8)

Source from the content-addressed store, hash-verified

47
48/// Flips key index horizontally, for use with Original v1 Stream Deck
49pub fn flip_key_index(kind: &Kind, key: u8) -> u8 {
50 let col = key % kind.column_count();
51 (key - col) + ((kind.column_count() - 1) - col)
52}
53
54/// Reads button states, empty vector if no data
55pub fn read_button_states(kind: &Kind, states: &[u8]) -> Vec<bool> {

Callers 2

send_imageMethod · 0.85
read_button_statesFunction · 0.85

Calls 1

column_countMethod · 0.80

Tested by

no test coverage detected