203-Systems / MatrixOS

Matrix OS is a cross-platform operating system that mainly targets grid keyboard controllers.
MIT License
78 stars 13 forks source link

None grid keypad support #8

Open 203Null opened 2 years ago

203Null commented 2 years ago

Each key currently has an assigned xy value; however, x and y can only be integers right now. This blocks support for non grid controller like keyboard.

203Null commented 2 years ago

The proposed approach is that XY will be updated to support (a non-existing yet) fraction class as X and Y value,

203Null commented 1 year ago

Updated solution, force devices to put all keys into a grid. This is to ensure UI still function normally. Add a separate function that converts Key ID into a real XY.

KeyID -> a number referencing the Key, a key could have multiple KeyID SystemXY -> Position used by the OS to generate UI RealXY -> Real life position of the key on the device.

The LED will need to update similar to this:

For real life corrected rendering. The Application will need to iterate though the ID and get their RealXY (Since the first LEDIDs are index in the buffer) until the device API returns a invalid.

Then for each of those RealXY, render them. (Note: Application can render to any SystemXY they want, it might not exist therefore not doing anything. Application can not render to RealXY, only via LEDID or SystemXY)