Helmut Karlowski wrote:Ok.Thanks.In keyboard_input I've added a break:if ( cfg.eiffel_support && eiffel_wheel((unsigned short)key.raw.conin.scan &0xff)) { if( f_instat(C.KBD_dev) ) continue; else break;(last two lines). This is what I think is correct, it doesn't reflect the original code, but your first version. It avoids wheel-keys go into normalprocessing. Should I add this?Hmmm... That small function begins to look like spaghetti :S
Very true - I had the same thought, but it's not meant to stay there forever anyway.
I don't understand exactly when keyboard_input() is called. When there is exactly one key to read ?
When there is something in the input-buffer.
In that case, there should be no loop
When your first version works perfectly, I'll remove the loop (I don't like it either). Maybe it's because wheel events tend to come in groups.
Or maybe several ones ?
The actual test is in k_main.c#1810 (f_select) which does the same as f_instat for keyboard.
In that case, the loop should always be present (regardless to Eiffel), and f_instat() called after eack key processing, as exit condition.
But as you see it works without the loop. -- Helmut Karlowski