AFAIK, QMK is primarily targeted to send keypress data through USB HID. I'm not sure if it supports, say, sending key codes through UART/i2c out of the box.
Nevertheless, you can easily override the key processing handler in your keymap code to send key codes through i2c, for instance. There are some existing functions in QMK for performing i2c transactions. You can then use 65c22 with a shift register mode to read serial messages into its internal buffer, and it can generate an interrupt for you once the key code is received. Beware of the shift register bug though though! (Search forums for "6522 bug" or check Garth's primer on 6522.)
Alternatively, instead of using i2c, you can just bit-bang the data from QMK into 65c22's shift register, since i2c feels like an overkill here. This will give you more control over the data that you're sending - e.g. make/break byte, various flags, etc. And in case QMK has SPI functions - you can use them to avoid doing manual bit-banging! SPI works great with shift registers, and you'll only need 2 signal lines: CLK & MOSI (it makes sense to treat keyboard as master here IMO). This won't be "true" SPI and it will be unidirectional, but to me it looks like an efficient solution.
I myself would probably go this route (bitbang or half-SPI) since it seems fun, and I love reinventing the wheel.
_________________
/Andrew
deck65 - 6502 slab with screen and keyboard |
ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) |
leo80 - simple Z80 SBC
nice65 - 6502 assembly linter |
My parts, footprints & 3D models for KiCad/FreeCAD