mirror of
https://github.com/whowechina/chu_pico.git
synced 2025-02-21 04:16:28 +01:00
NKRO working but keymap is not configurable
This commit is contained in:
parent
196a2f5a60
commit
f63a404083
@ -121,15 +121,14 @@ const uint8_t keycode_table[128][2] = { HID_ASCII_TO_KEYCODE };
|
||||
const char keymap[33] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456";
|
||||
static void gen_nkro_report()
|
||||
{
|
||||
return;
|
||||
for (int i = 0; i < 32; i++) {
|
||||
uint8_t code = keymap[i] - 32;
|
||||
uint8_t code = keycode_table[i + 'A'][1];
|
||||
uint8_t byte = code / 8;
|
||||
uint8_t bit = code % 8;
|
||||
if (slider_touched(i)) {
|
||||
hid_nkro.keymap[byte] &= ~(1 << bit);
|
||||
hid_nkro.keymap[byte] |= (1 << bit);
|
||||
} else {
|
||||
hid_nkro.keymap[byte] |= 1 << bit;
|
||||
hid_nkro.keymap[byte] &= ~(1 << bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user