solderparty / bbq10kbd_i2c_sw Goto Github PK
View Code? Open in Web Editor NEWThis project forked from arturo182/bbq10kbd_i2c_sw
License: MIT License
This project forked from arturo182/bbq10kbd_i2c_sw
License: MIT License
I'm interfacing the keyboard over I2C from a RP2040 programmed in C. All is working reading the I2C data but I need to be able to send control codes (especially Ctrl-C). Is there any key combination to do this? Nothing is mentioned in any of the docs as far as I can see.
Also, I get no data in the fifo when "sym" is pressed. Is this expected? I was thing of using this key as the ctrl modifier
Thanks
Originally posted by veryalien September 5, 2021
There seems to be a problem that all the buttons under the feathering keyboard screen don't return anything when alt is pressed or NUMLOCK (alt+left-shift) is on.
I'm busily modifying pye_lcd and simpleTerminal to work as a self-contained editor with circuitpython on a keyboard featherwing. I noticed that I couldn't use alt to modify the up, down, left and right joystick buttons.
You can use CFG_REPORT_MODS to get reports of all the individual modifiers being pressed/released left-shift, right-shift, sym and alt.
You can press and hold a modifier for example left-shift and press L1, this returns the L1 code which means you can use the modifiers left-shift, right-shift and sym held down together with the buttons as different soft keys/buttons.
But you can't press for example alt and L1 and get a key returned. Also, when NUMLOCK is on, all those buttons go dead until you get out of NUMLOCK. Which is a little bit confusing, because you can't easily see why the buttons don't work any more.
As far as I can see the problem is in the firmware. I could be wrong but, without actually debugging the featherwing firmware, it looks like this to me. There are no symbol entries for the L1, L2, Joystick, R1 and R2 buttons in the table, only for the bbq10 keboard keys itself, this code from keyboard.c will incorrectly change chr to 0 if alt is pressed at the same time as a button:
default:
{
if (reg_is_bit_set(REG_ID_CFG, CFG_USE_MODS)) {
const bool shift = (self.mods[MOD_SHL] || self.mods[MOD_SHR]) | self.capslock;
const bool alt = self.mods[MOD_ALT] | self.numlock;
if (alt) {
chr = p_entry->symb;
} else if (!shift && (chr >= 'A' && chr <= 'Z')) {
chr = (chr + ' ');
}
}
break;
}
I'm not sure if my logic is right, but something like that must be going wrong when alt and a button are pressed at the same time.
I really don't want to turn off CFG_USE_MODS and do all the keyboard modifier handling myself in my editor. I've used the left and right shift modifiers instead of alt. But,whatever the real problem is, it's still a little bit annoying,
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.