arturo182 / bbq10kbd_i2c_sw Goto Github PK
View Code? Open in Web Editor NEWRepository moved to https://github.com/solderparty/bbq10kbd_i2c_sw
License: MIT License
Repository moved to https://github.com/solderparty/bbq10kbd_i2c_sw
License: MIT License
I use the keyboard on the Keyboard FeatherWing with Circuit Python.
I wanted to know when the ALT key is pressed (and maybe other key like left shift, right shift and SYM) so that it can act as a keyboard and be used as a USB HID.
The problem is that to use as a real keyboard, I would need to be able to do CTRL+C and CTRL+D (and maybe a few other).
So I added the folowing missing constant:
CFG_REPORT_MODS = const(1 << 6)
CFG_USE_MODS = const(1 << 7)
And enhanced the init to set the register to the default value + CFG_REPORT_MODS (notice that reset is done first, then the config register is modified):
self.reset()
with self._i2c as i2c:
self._buffer[0] = _REG_CFG | _WRITE_MASK
self._buffer[1] = CFG_OVERFLOW_INT | CFG_KEY_INT | CFG_USE_MODS | CFG_REPORT_MODS
i2c.write(self._buffer, end=2)
The problem is that "left shift" and "right shift" are indistinguishable at the software level. I hope they are distinguishable at the hardware level and the software could be fix. One shift key could be used as a CTRL replacement or something like that.
Can this be fixed?
Arturo - I am a bit of a neophyte in relation with programming QFN chips. Any suggestions on how one can upload the code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.