yurikhan / teck

Truly Ergonomic Computer Keyboard firmware hacking
Other
70 stars 20 forks source link

OSX Volume+/Volume- behave erratically #3

Closed DanMcLaughlin closed 10 years ago

DanMcLaughlin commented 11 years ago

Hi, I'm using the firmware as generated by the version on the TrulyErgonomic site on a couple of 209 keyboards. I (and others) have found that the Vol+/Vol- keys behave erratically. The operating system apparently keeps receiving the keycode, so the volume maxes out or goes to zero. I haven't yet verified if this is the case on Windows. It happens erratically too, sometimes it will work, other times it goes to the end immediately, and it also will do it strangely sometimes.

Dan

yurikhan commented 11 years ago

I have received reports of such behavior. Now that you confirm it, I can investigate. If it won’t reproduce on my machine, will you be able to compile and run a test program that listens for HID events and prints them out?

DanMcLaughlin commented 11 years ago

Hi Yuri,
Sure no problem. I've tried it with two keyboards on two computers. On one is consistently has the issue, on the other isn't as bad, but if I mess around with it enough it will reoccur.

Dan

yurikhan commented 11 years ago

I have reproduced the problem.

When pressing a modifier+key combo such as Fn+F12, you can have two event sequences:

We are taught that key combinations are pressed the first way, but in quick presses the fingers tend to execute the second sequence and in most cases software copes with it.

The firmware sees that physical F12 was pressed while Fn was down and generates a logical Vol+ press event. But, in the latter case, the release of physical F12 happens while Fn is already up, so it is logical F12 that gets released, while logical Vol+ stays down until somehow cleared.

This affects all media (more precisely, media, power, application launch and application control) keys which are placed in the Fn layer, if the OS autorepeats them. (If it doesn’t, the key is still stuck but the effect of the key only occurs once.)

I will think of a way to handle this release sequence. Meanwhile, the workaround is to hold the Fn key a bit longer.

DanMcLaughlin commented 11 years ago

Excellent work Yuri, I'll do some experiments and see if I can reproduce this idea.

DanMcLaughlin commented 10 years ago

Hi Yuri, Is this change pushed to the TrulyErgo website configurator?

Dan

yurikhan commented 10 years ago

Probably not yet; I don’t have push privileges there. But it is live here on Github Pages.

If you have a bookmark with a saved layout, you can just replace the part before the #. (You may need to compose the link in a text editor and paste that into an empty browser tab, not just copy-and-paste the hash over the loaded configurator.)

As a sanity check, the fixed firmware .hex file should be 19485 bytes long.

DanMcLaughlin commented 10 years ago

Finally got around to updating my firmware from the TECK site - works great! Good job on the fix.