UltimateHackingKeyboard / firmware

Ultimate Hacking Keyboard firmware
Other
410 stars 63 forks source link

Per-key tooltip storage #788

Open mondalaci opened 4 days ago

mondalaci commented 4 days ago

This issue is the firmware side of https://github.com/UltimateHackingKeyboard/agent/issues/2289

@kareltucek Can we use the most significant bit of key_action_t.type to store the hasNote flag? The note string would be stored as the last element of key_action_t. I'm asking to ensure I'm not missing anything.

kareltucek commented 4 days ago

Can we use the most significant bit of key_action_t.type to store the hasNote flag?

I think yes.

The note string would be stored as the last element of key_action_t.

We don't want to load it in firmware (into key_action_t), do we?

(I don't want to waste another precious 2*12*4*65 bytes on this.)

mondalaci commented 4 days ago

I only mean the note string to be serialized as suggested and displayed by Agent. But we wouldn't store it in the RAM. The config parser could also disregard the hasNote bit when saving key actions in the RAM, so branching based on key_action_t.type would be faster.

kareltucek commented 4 days ago

Then we are on the same page.