Closed Meptl closed 1 year ago
There is no such example to my knowledge.
You can do this in several ways. I can imagine a few:
map
on the layout.keycodes()
call.I implemented your 2nd option as follows (with cortex-m-rtic 1.1.4). Click the bullet points for code sample.
I was finding calling layout.event(Event::Release(4,0));
or Event::Press every tick to not work, hence the need for the num_lock_state Local variable. But maybe I just had a bug.
Is there an example of having a layer that is tied to the numlock state?
I'm creating a keypad and would like to customize the behaviour of keys whilst NumLock is disabled. e.g. Kp2 behaves like the down arrow key whilst NumLock is disabled and I'd like it to behave like the up arrow key.