-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard code changes tracking #71
Comments
Here is log for mod taping TAB , released properly
But mod tap mouse button are not released
|
=Thanks for your feedback! I reviewed current mod-tap implementation, there are some issues that I can tell:
|
Thanks for the link, I think PERMISSIVE_HOLD is most natural, and like to get it ported.
Here are changes I needed for reporting code
Current link between action code and report code are hardcoded to one specific usage configuration, also needs two steps: process and then send. This is error prone. consider that both action code and report code will get more complex, I think move report code to a separate module, with keycode between them will make code much easier to maintain If you are going to add trackpad, encoder, then separate report code makes more sense, because now you can reuse the report code. Assuming you are not planning to put everything into the current keyboard module. |
another problem with mouse key, quick click mouse move sends multiple messages. the reason I want mouse key is to move single pixel.
|
I am thinking just remove |
if I understand you correctly, this will cause the sent keyboard report will have only one key in each report. am I right? It will be a report flood and I don't know whether it will cause problems, since the USB host requests hid report in 1khz frequency. Could you please have it a try? I recently don't have a lot of time doing this... if it's good, I'd be happy to change. |
Each key change will send a report. That's what you do currently. You call different functions depends on whether it's the first or last or middle report in order to send. I just simplified the code, and that bug, mouse button tap hold don't release are automatically fixed. This is strange, because standalone mouse button works, and normal tap hold works. complicate code breeds bugs. |
Current implementation register a key while processing, send all registered key after a full scan. |
The reason you want to scan faster is to distinguish which key changes happen earlier. The order of change is important. We don't want multi key changes in one scan. At least very rarely. |
I don't think so. The scan rate is faster than the communication rate. So if we can compress multiple key changes in one scan loop and send it, it's actually faster than send many reports where each report has only one key. Scanning faster and maximizing the bandwidth are both important (for me) |
Because you are scanning very fast, you'll hardly get multiple change in one loop. On the other hand, you can combine change from multiple loops. That's why I want to decouple scan loop and report generation. The change I made is to simplify front end key to action map process. when I am worried about what action to generate, I don't want to worry what actions can be combined into one report. Now, we got the action stream generated correctly; we need to do all kinds of crazy things to transform actions:
how about have a process_keycode folder, like QMK? And finally, when all done, and time to report,
Move these code except BLE under USB folder?
|
I agree that generating action and processing key action to report can be decoupled, and we can move the key processing to a separate module. BUT I also worry about the extra latency added: last time I added the key report channel, the latency increased about 0.5-1ms(Channels are static and introduce lots of mem copy). I think this needs more testing to ensure that this refactoring won't have much negative impact on performance. This is a huge refactoring, I want to make all input/output devices compatible with the new structure, so before we start I'd like to write a design doc that makes everything clear. And when we actually do this, splitting them to many small PRs would be good. As for the keycode issue, I use In my plan, I'm not going to be compatible with all via/vial keycodes(they are different). RMK would have a separate web user interface that works natively with BLE. I choose to support vial just because we don't have it right now. Anyway, there are lots of things to be discussed. If you're interested, you can join the discord channel, I feel chatting on dc can be more casual. |
Following are the problems I am running into, and the change I think need to fix them:
The text was updated successfully, but these errors were encountered: