Skip to content
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

Stay in bootloader until prog key is released #4

Open
gedankenexperimenter opened this issue Mar 1, 2018 · 2 comments
Open

Stay in bootloader until prog key is released #4

gedankenexperimenter opened this issue Mar 1, 2018 · 2 comments

Comments

@gedankenexperimenter
Copy link

When a firmware with a printable character on the default layer's prog key (or worse, a malfunctioning firmware) is installed, it can be difficult to flash a new firmware, even when starting with the keyboard unplugged. It would be easier if the keyboard stayed in the bootloader as long as the prog key is held down, so that the user doesn't have to hold down prog, plug in the keyboard, and rush to press enter while hoping the flashing starts before the keyboard's firmware starts up.

@algernon
Copy link
Contributor

algernon commented Mar 5, 2018

I'm not a hundred percent sure how best to do this, but one way would be to change CheckProgrammingKey to set Timeout to zero when the key is held, and call this function from main. This should be minimal increase in code size, and still get the job done.

The side-effect of it, as far as I understand, is that the timeout would start when the boot key is released. That makes sense, in my opinion. On the other hand, we may want to lower the 30 second timeout in this case.

@algernon
Copy link
Contributor

Turns out this is harder than first anticipated, because CheckProgrammingKey doesn't just return a bool. At a first read, I'm not even sure what it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants