Ref to KEY_FLAGS in NumPad plugin code


(Shriramana Sharma) #1

What is the purpose of the section || (k.flags != KEY_FLAGS) in this line of the numpad plugin?

IIUC it effectively means that a key is a plain unmodified one that would be available on a common keyboard, but to avoid highlighting what kind of keys is this included here?

Thank you!


(Gergely Nagy) #2

It’s there so it doesn’t highlight OneShots and the like, so that we only highlight keys that - as you figured out - can be found on traditional keyboards, and those only (except for the key that got us here, which we do want to highlight).


(Shriramana Sharma) #3

Hm I don’t get this. This plugin will only ever highlight keys which are actually on the NumPad layer and not any transparent keys. Who’s going to place any oneshots on this layer? This behaviour causes the editing shortcuts I am adding to my numpad layer to not be highlighted…


(Shriramana Sharma) #4